[Gambas-user] Signal 11 from programming error

Jussi Lahtinen jussi.lahtinen at ...626...
Sat Aug 14 19:55:43 CEST 2010


Hi!
I had error in way I calculated position in array, and it revealed
error in it's handling.
Way to reproduce problem:

Private aa As New Integer[]

Public Sub Form_Open()
aa.Fill(1, -1, 1)
End

gdb outputs:

(gdb) run
Starting program: /usr/local/bin/gbx3 -p
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00000000004072d0 in VALUE_write (value=0x659518, addr=0x0, type=4)
    at gbx_value.c:816
816		*((int *)addr) = value->_integer.value;


(gdb) bt
#0  0x00000000004072d0 in VALUE_write (value=0x659518, addr=0x0, type=4)
    at gbx_value.c:816
#1  0x000000000042884a in CARRAY_fill (_object=0x782508,
    _param=<value optimised out>) at gbx_c_array.c:776
#2  0x000000000040988d in EXEC_native () at gbx_exec.c:1241
#3  0x000000000042f789 in EXEC_loop () at gbx_exec_loop.c:970
#4  0x0000000000409db6 in EXEC_function_loop () at gbx_exec.c:858
#5  0x000000000040a809 in EXEC_function_real () at gbx_exec.c:845
#6  0x000000000041c20c in raise_event (observer=<value optimised out>,
    object=<value optimised out>, func_id=<value optimised out>,
    nparam=6657304) at gbx_api.c:483
#7  0x000000000041c9e7 in GB_Raise (object=0x77fa28,
    event_id=<value optimised out>, nparam=0) at gbx_api.c:583
#8  0x00007ffff6b44d73 in gMainWindow::emitOpen (this=0x77faf0)
    at gmainwindow.cpp:417
#9  0x00007ffff6b45ca4 in gMainWindow::setVisible (this=0x77faf0, vl=false)
    at gmainwindow.cpp:442
#10 0x000000000040988d in EXEC_native () at gbx_exec.c:1241
#11 0x000000000040b32d in EXEC_public_desc (class=0x659518, object=0x0,
    desc=0x4, nparam=<value optimised out>) at gbx_exec.c:1485
#12 0x0000000000421d2e in main (argc=1, argv=<value optimised out>)
    at gbx.c:359


Gambas 3 revision 3109 @ Ubuntu 10.04 64bit

Jussi




More information about the User mailing list