[Gambas-user] Debugging Gambas (again)
kicking177 at gmail.com
Sat Apr 27 14:08:11 CEST 2019
again, thankyou all. just for ref here is the backtrace from current dev
system if it has any value, remember it is from 3.8.4
#0 0x0806d8d3 in STRING_new (src=0x0, len=2) at gbx_string.c:311
#1 0x0806dc06 in STRING_new_temp_value (value=0xb7447a80, src=0x0,
len=2) at gbx_string.c:459
#2 0x0806d058 in NUMBER_int_to_string (nbr=0, prec=0, base=10,
value=0xb7447a80) at gbx_number.c:491
#3 0x0804dc92 in VALUE_convert (value=0xb7447a80, type=9) at
#4 0x08061272 in SUBR_conv (code=26377) at gbx_subr_conv.c:108
#5 0x0807f282 in EXEC_loop () at gbx_exec_loop.c:510
#6 0x080510e2 in EXEC_function_loop () at gbx_exec.c:931
#7 0x08051765 in EXEC_function_real () at gbx_exec.c:895
#8 0x08052420 in EXEC_public_desc (class=0x80ac99c, object=0x0,
desc=0x80c8834, nparam=0) at gbx_exec.c:1616
#9 0x0804b4fc in main (argc=1, argv=0xbffff3c4) at gbx.c:416
Could you elaborate on what you define as
assuming you don't mean functions defined in other gambas modules or
classes from the source folder, then the only thing that possibly stands
out is the gb.ncurses component?
Yes I realise source code would help, and preferably a stripped down
version that replicates the issue, but the former is rather large and
frankly a mess from a rushed attempt to port from PowerBasic and the
latter would take some time and could go a few different tacks, i.e. I
could look to do this without ncurses to try and rule that out, but a
console app is preferred so that effort if narrows it down to gb.ncurses
is going to be thrown away and still leaves the issue to resolve.
I will try to find time to create a stripped down version to replicate
the issue, which suspicion is currently around a class with a number of
variables defined at top before any Sub or Function along with an
Ncurses window excerpt is:
Private $hText As Window
Private sProductCode as String
Private sProductDescription as String
Private fPrice as Float
When the current code fails it is when it enters a routine to fetch data
from a data file to populate the above variables which are then
displayed via $hText.Print.
This works multiple times until the screen needs to scroll the content
which it does all that and calls a routine to reset the data variables
for the last line which performs the following
sProductCode = Space$(10)
sProductDescription = Space$(30)
fPrice = 0
and displays that to the screen via $hText.Print, still all okay.
But when it calls the routine to read from the data file that it
SegFaults, currently on one my TraceLog calls.
So I will be trying to craft a cut down version around the above, though
I would like to do that with a more recent version of Gambas Source.
Where should I pull the source from?
More information about the User