Re: json-glib problem



hi;

On 23 May 2013 10:14, Aldrich Niklaus <aldrichnjit gmail com> wrote:
after I entering bt,the gdb says "no stack"

if I run ./all ,I receive the message as follows,

Starting program: /home/fenghelong/open-source/RenrenSDK/json/all
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6dbacba in _IO_vfprintf_internal (s=0x7fffffffdf70,
    format=0x400cfa "error is %s\n", ap=0x7fffffffe0e8) at vfprintf.c:1623

you forgot to initialize GError here:

        GError *error;

you should set it to NULL:

  GError *error = NULL;

before passing it to json_parser_load_from_file();

ciao,
 Emmanuele.

--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/


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