[Gambas-user] Debugging Gambas (again)
g4mba5 at gmail.com
Sat Apr 27 03:25:51 CEST 2019
Le 26/04/2019 à 18:53, KKing a écrit :
> So I'm back to trying to establish why a large application ported from
> powerbasic is failing with a segmentation fault.
> Please note I am not looking for anyone to tell me the problem with my
> code, I am looking for guidance on how to go about debugging a Gambas
> I found this link
> And have been following the section titled Debug Signal #11
> for reference when I do
> $ gdb gbx3
> GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
> The program is an order entry system with multiple ordering lines to be
> entered, after a certain number of entries the program fails, under gdb
> it gives
> Program received signal SIGSEGV, Segmentation fault.
> 0x0806d8d3 in STRING_new (src=0x0, len=2) at gbx_string.c:311elAddr
> 311 str = alloc_string(len);
As Tobias said, provide the stack backtrace of the crash. And to really
get useful information, you have to recompile gambas with debugging
information enabled first.
But without the source code and without knowing what you do exactly (for
example do you use external functions and all the unsafe functions
associated with them?), it will difficult to track the possible big.
If possible, you should try to isolate the bug as much as possible.
More information about the User