TailBite v1.4.11 for Windows

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

TailBite v1.4.11 for Windows

Post by ABBKlaus »

small update to TailBite for Windows :wink:

Most of the work was done by lexvictory

TailBite supports the following versions of PureBasic:
- PureBasic V4.02 (only if preferences found in TailBite-folder / separate install)
- PureBasic V4.10 (only if preferences found in TailBite-folder / separate install)
- PureBasic V4.20 (with restrictions in string handling - see this thread http://www.purebasic.fr/english/viewtopic.php?t=30840)
- PureBasic V4.3x
- PureBasic V4.4x
- PureBasic V4.5x
- PureBasic V4.6x
- PureBasic V5.00
- PureBasic V5.10
- PureBasic V5.20

Download it here : http://www.tailbite.com/?download=TailB ... taller.exe

Onlinehelp : http://www.tailbite.com/help/index.html

Sources : http://www.tailbite.com/?download=src.pack

old Sources can be found here : http://www.tailbite.com/downloads
[55] SEP 24th 2013 TailBite v1.4.11
- removed switch /INLINEASM when PBVersion >=5.20 is installed
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Re: TailBite v1.4.3 for Windows

Post by Droopy »

Thanks for us
mpz
Enthusiast
Enthusiast
Posts: 494
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: TailBite v1.4.3 for Windows

Post by mpz »

Hi ABBKlaus,

i have test the new version with my PB 4.41, but i got an error message and i don't know to solve it. The Tailbite Version 1.4.2 works fine with my 20k Sourcecode. If i use 1.4.3 with the tailbite Manager and the Funktion "check for errors", no error apears. If i choose "Tailbite!" he start to compile, ask fo the help file and then an error appears:

FAsm: MP3D_LibrarShared.asm Out of Memory.

I don't find the file MP3D_LibrarShared.asm. Do you have an idea what happens and what i can do?

Thanks,

Michael
Working on - MP3D Library - PB 5.73 version ready for download
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Re: TailBite v1.4.3 for Windows

Post by lexvictory »

It would appear to be due to the integration of Fasm into tailbite. Fasm seems to need more than 8mb for that shared asm file.
Replace your tailbite.exe with this one and see if it fixes it (it will allocate up to 256mb - by doubling the buffer size each try)
Your won't need fasm.dll any more if it's there either
https://sourceforge.net/projects/tailbi ... e/download
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
mpz
Enthusiast
Enthusiast
Posts: 494
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: TailBite v1.4.3 for Windows

Post by mpz »

Hi lexvictory,

thanks for your help. The programm starts now with the "compile asm code...", but the next error appears then:

Line:55
C:\Users\lex}Documents\pb\Tailbite\tailbite-svn\inc_fasm.pb
Stack overflow
Exit program

Yes or no button to push

i hope you have ans suggestion or idea? Tailbite 1.4.2 work fine with the same file....

Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Re: TailBite v1.4.3 for Windows

Post by lexvictory »

TailBite 1.4.2 uses fasm.exe from the pb directory, TailBite 1.4.3 uses fasm as a procedure (it's statically linked - or as a dll in the released version, i added the static link after 1.4.3 was released)
1.4.3 also has a couple of speed improvements that shouldn't affect the asm, but could (hence the 2nd step below)

Two things that might help:
1: download debugview (http://technet.microsoft.com/en-us/sysi ... 96647.aspx) and run it, then tailbite your lib, then post the debug output here
2: compile the lib with the 'dont build library, only source files' and 'keep source files' (/DONT and /KEEP on the command line), use fasm.exe in your compilers dir and make sure that the shared asm still compiles

Until then, you can use the above mentioned command line options in conjunction with 'create build batch file' and then run the batch file to make the lib.

(Tailbite manager option labels are inside ' ' because I'm working off the top of my head)
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: TailBite v1.4.3 for Windows

Post by ABBKlaus »

i don´t see any tryno+1 :wink: i would use static instead.

Code: Select all

Procedure.s CompileAsmFasm(file.s, out.s)
Static tryno=0
;Debug file 
;debug out
Protected *newbuf
  If tryno
    fasm_memSize = fasm_memSize*2
    OutputDebugString_("trying to allocate new membuf of MB: "+Str(fasm_memSize/1024/1024))
    *newbuf= ReAllocateMemory(*membuf, fasm_memSize)
    If *newbuf
      *membuf = *newbuf
      OutputDebugString_("new mem buf succeeded")
    Else 
      fasm_memSize / 2;since it didnt work
      ProcedureReturn ("Out of memory")
    EndIf
  EndIf 
  Protected res = fasm_AssembleFile(file, *membuf, fasm_memSize, 100, cons)
  Select res
    Case #FASM_OK
      ;debug "yes"
      Protected ofile = CreateFile(#PB_Any, out)
      If ofile
        WriteData(ofile, *membuf\output_data, *membuf\output_length)
        CloseFile(ofile)
        OutputDebugString_("Ok, "+Str(*membuf\output_length)+" bytes.")
        ProcedureReturn ("Ok, "+Str(*membuf\output_length)+" bytes.")
      Else
        OutputDebugString_("Could not create obj file to write data to")
        ProcedureReturn ("Could not create obj file to write data to")
      EndIf 
    Case #FASM_ERROR	; FASM_STATE contains error code
      OutputDebugString_("Error")
      ProcedureReturn ("Error"+#CRLF$+"Line no: "+Str(*membuf\error_line\line_number)+#CRLF$+"Error code: "+Str(*membuf\error_code)+#CRLF$+"Error String: "+ErrorCodeToString(*membuf\error_code))
    Case #FASM_INVALID_PARAMETER	
      ProcedureReturn ("Invalid Parameter")
    Case #FASM_OUT_OF_MEMORY	
      If tryno = 5;6 tries max - 256mb ram...
        ProcedureReturn ("Out of memory")
      Else
        tryno+1
        ProcedureReturn CompileAsmFasm(file.s, out.s)
      EndIf
    Case #FASM_STACK_OVERFLOW	;	 = -3
      ProcedureReturn ("Stack Overflow")
    Case #FASM_SOURCE_NOT_FOUND;= -4
      ProcedureReturn ("Source not found")
    Case #FASM_UNEXPECTED_END_OF_SOURCE	; = -5
      ProcedureReturn ("Unexpected end of source")
    Case #FASM_CANNOT_GENERATE_CODE	; = -6
      ProcedureReturn ("Cannot Generate Code")
    Case #FASM_FORMAT_LIMITATIONS_EXCEDDED ;= -7
      ProcedureReturn ("Format Limitations Exceeded")
    Case #FASM_WRITE_FAILED		; = -8
      ProcedureReturn ("Write Failed")
    Default
      OutputDebugString_("Unhandled Error: "+Str(res))
      ProcedureReturn ("Unhandled Error: "+Str(res))
  EndSelect
EndProcedure
mpz
Enthusiast
Enthusiast
Posts: 494
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: TailBite v1.4.3 for Windows

Post by mpz »

Hi,

1) First step:

i have activated

'dont build library, only source files'
'keep source files'
Generate build batch file

If i start the bachtfile, no error appears and the lib is written

2) Second Step, Debug View
the log file stops at point 430, after 33 Seconds the error Message appears, an the last log info comes. This look like a never endeing repeating and the stack overflow will come after 33 second

00000000 0.00000000 [1104] Ok, 171 bytes.
00000001 0.01018872 [1104] Ok, 6488 bytes.
00000002 0.01233034 [1104] Ok, 768 bytes.
00000003 0.01430238 [1104] Ok, 783 bytes.
00000004 0.01625262 [1104] Ok, 780 bytes.

....

00000425 0.86608857 [1104] Ok, 405 bytes.
00000426 0.86834359 [1104] Ok, 1269 bytes.
00000427 0.86984295 [1104] Ok, 458 bytes.
00000428 0.87128085 [1104] Ok, 396 bytes.
00000429 0.87355489 [1104] Ok, 364 bytes.
00000430 0.87552440 [1104] Ok, 1732 bytes.
00000431 33.46620560 SetContentId drmRights.CopyProtect=0


best regards
Michael
Working on - MP3D Library - PB 5.73 version ready for download
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Re: TailBite v1.4.3 for Windows

Post by lexvictory »

ABBKlaus wrote:i don´t see any tryno+1 :wink:
D'oh!

mpz: i uploaded a fix (as ABBKluas pointed out, it was my coding error meaning it was recursively calling the function, without actually increasing the memory buffer size)
download link is the same (https://sourceforge.net/projects/tailbi ... e/download)
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
mpz
Enthusiast
Enthusiast
Posts: 494
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: TailBite v1.4.3 for Windows

Post by mpz »

Hi lexvictory,

you got it. Now the Tailbite 1.4.3 version create the lib fast. No problems detected and the created lib works fine :)

Thanks you
Michael
Working on - MP3D Library - PB 5.73 version ready for download
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: TailBite v1.4.3 for Windows

Post by ABBKlaus »

would be interesting to know which memory buffer succeeded :P
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Re: TailBite v1.4.3 for Windows

Post by lexvictory »

Do you mean what method I solved it with?
Or adding extra debug info?
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: TailBite v1.4.3 for Windows

Post by ABBKlaus »

lexvictory wrote:Do you mean what method I solved it with?
Or adding extra debug info?
yes, i meant the tailbite logfile.
Adding this info would be good for reproducing those bugs without the need to send huge source codes :)
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Re: TailBite v1.4.3 for Windows

Post by lexvictory »

I was just working from mpz's info, I knew where the error was coming from, and added in a fix, then got mpz to test it.
I don't have a sourcecode big enough to cause it. (hence why I missed tryno not being incremented)
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: TailBite v1.4.3 for Windows

Post by ABBKlaus »

just uploaded a bugfixed version, please redownload ;-)
Post Reply