[gnome-db] Libgda4.0.6 warnings and segfault

Dear all,

I'm using libgda4.0.6 in debian lenny 64 bits and I'm having some strange 
behaviour. The code compiles fine but there are some problems:

I'm getting the "assignment makes pointer from integer without a cast" warning 
when I try to do:

  GdaSqlParser *parser = gda_sql_parser_new ();

So I tried this: 
  parser = (GdaSqlParser *) gda_sql_parser_new ();

But then it shows the warning: "cast to pointer from integer of different 

This warning doesn't appears when I do:
    parser = gda_connection_create_parser (conn);
    parser = (GdaSqlParser *) gda_connection_create_parser (conn);

So, when I do this later:
   GdaStatement *stmt = gda_sql_parser_parse_string (parser, buffer, &remain, 

It segfaults and gdb shows an assertion:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f95b017a770 (LWP 29995)]
0x00007f95afa3a36a in gda_connection_statement_execute_select (cnc=0x851380, 
stmt=0x207784c0, params=0x0, error=0x7fff2f0a14b8) at gda-connection.c:1842
1842            g_return_val_if_fail (GDA_IS_STATEMENT (stmt), NULL);

So, it seems that those cast problems has something to do with this. It seems 
that the parser is not right created, and then the statement is not fine, and 
then when I try to run the query, it fails.

I've reviewed the src code of libgda4.0.6 and I found that (obviously, as the 
documentation and the examples says it) the gda_sql_parser_new() function 
returns GdaSqlParser, so I'm a bit confused about what could be the problem. 

Do you have some ideas about this or where to take a look?

Thanks and best regards,.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]