[Gambas-user] GB.StoreVariant

Daniel daniel at ...889...
Thu Jun 9 17:41:22 CEST 2005


hi
i make the small driver for firebird and i have problem with this code
(i use gambas 1.9.9)
(with gambas 1.9.5 this code work)

#########

typedef map<int, GB_VARIANT> GB_ROW;
typedef map<int, GB_ROW> GB_ROWS;


class FBResult{
  public:
    GB_ROWS gb_table;
.
.
.
etc ...
}

static void query_fill(DB_RESULT result, int  ...
{
FBResult *res;
res=(FBResult *)result;
int i;
  if(res->st1->AffectedRows()>0){
    for (i=0; i < res->st1->Columns(); i++){
      GB.StoreVariant(&res->gb_table[pos][i], &buffer[i]);      
<<<<<<<<<<< the problem <<<<<<<<<<<<<<<<<
    }
  }
}

#########

this code raising signal #11
i don't no wai the code jump in GB_StoreObject at line #1 and no 
GB_StoreVariant

############### the gdb output ########################

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 24161)]
GB_Ref (object=0x4) at gbx_api.c:530
530         OBJECT_REF(object, "GB_Ref");
(gdb) bt
#0  GB_Ref (object=0x4) at gbx_api.c:530
#1  0x0805ba9e in GB_StoreObject (src=0x4, dst=0x80d4098) at gbx_api.c:913
#2  0x40ce602f in query_fill (result=0x80dbd60, pos=0, buffer=0x80d4098, 
next=0) at main.cpp:906
#3  0x4001d85f in load_buffer (_object=0x80d4038, vpos=0) at CResult.c:140
#4  0x4001db5a in DB_MakeResult (conn=0x80d1298, mode=0, table=0x0, 
query=0x1 <Address 0x1 out of bounds>)
    at CResult.c:274
#5  0x4001bc64 in CCONNECTION_exec (_object=0x80d1298, _param=0x8071a60) 
at CConnection.c:313
#6  0x0804d908 in EXEC_call_native (exec=0x4001bbfe <CCONNECTION_exec>, 
object=0x80d1298, type=4,
    param=0x8071a60) at gbx_exec.c:657
#7  0x0804db8b in EXEC_native () at gbx_exec.c:769
#8  0x0804f8c8 in EXEC_loop () at gbx_exec_loop.c:1089
#9  0x0804d764 in EXEC_function_real (keep_ret_value=1 '\001') at 
gbx_exec.c:557
#10 0x0805b537 in GB_Raise (event_id=4, nparam=0) at gbx_api.c:440
#11 0x401cdc0a in MyMainWindow::showActivate (this=0x80b5860) at 
CWindow.cpp:1251
#12 0x401cccbb in CFORM_main (_object=0x0, _param=0x80719f0) at 
CWindow.cpp:342
#13 0x0804d908 in EXEC_call_native (exec=0x401ccc90 <CFORM_main(void*, 
void*)>, object=0x0, type=4,
    param=0x80719f0) at gbx_exec.c:657
#14 0x0804db8b in EXEC_native () at gbx_exec.c:769
#15 0x0805e799 in main (argc=1, argv=0xbffff904) at gbx.c:271
(gdb)

#########################################

daniel





More information about the User mailing list