Re: json-glib problem
Emmanuele Bassi <[email protected]> Thu, 23 May 2013 10:43:23 +0100
| Newsgroups | gmane.comp.gnome.devel |
|---|---|
| Message-ID | <CALnHYQFqpe39ABjvzrLErko5_2t_yZzC6aVp3g2hMz9K68EwBA@mail.gmail.com> |
hi; On 23 May 2013 10:14, Aldrich Niklaus <[email protected]> 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/