PureBasic Forum
https://www.purebasic.fr/english/

TailBite v1.4.11 for Windows
https://www.purebasic.fr/english/viewtopic.php?f=26&t=40936
Page 1 of 2

Author:  ABBKlaus [ Tue Feb 02, 2010 12:51 am ]
Post subject:  TailBite v1.4.11 for Windows

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=TailBite_Installer.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

Quote:
[55] SEP 24th 2013 TailBite v1.4.11
- removed switch /INLINEASM when PBVersion >=5.20 is installed

Author:  Droopy [ Tue Feb 02, 2010 11:14 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

Thanks for us

Author:  mpz [ Sat Feb 20, 2010 11:59 am ]
Post subject:  Re: TailBite v1.4.3 for Windows

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

Author:  lexvictory [ Sat Feb 20, 2010 1:23 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

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

Author:  mpz [ Mon Feb 22, 2010 12:16 am ]
Post subject:  Re: TailBite v1.4.3 for Windows

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

Author:  lexvictory [ Mon Feb 22, 2010 10:04 am ]
Post subject:  Re: TailBite v1.4.3 for Windows

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)

Author:  ABBKlaus [ Wed Feb 24, 2010 10:50 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

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

Code:
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

Author:  mpz [ Thu Feb 25, 2010 12:03 am ]
Post subject:  Re: TailBite v1.4.3 for Windows

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

Author:  lexvictory [ Thu Feb 25, 2010 6:00 am ]
Post subject:  Re: TailBite v1.4.3 for Windows

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)

Author:  mpz [ Thu Feb 25, 2010 8:40 am ]
Post subject:  Re: TailBite v1.4.3 for Windows

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

Author:  ABBKlaus [ Thu Feb 25, 2010 12:12 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

would be interesting to know which memory buffer succeeded :P

Author:  lexvictory [ Thu Feb 25, 2010 12:20 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

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

Author:  ABBKlaus [ Thu Feb 25, 2010 12:30 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

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 :)

Author:  lexvictory [ Thu Feb 25, 2010 12:40 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

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)

Author:  ABBKlaus [ Fri Feb 26, 2010 6:46 pm ]
Post subject:  Re: TailBite v1.4.3 for Windows

just uploaded a bugfixed version, please redownload ;-)

Page 1 of 2 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/