Mon 02 Mar 2009 10:50:09 AM UTC, comment #11:
I believe the ultimate cause of this should now be fixed.
|
Fri 27 Feb 2009 10:04:21 PM UTC, comment #10:
Thanks for persuing this Michel.
I guess however that until glib-2.20 is released, this is still going to be a potential problem for pspp. So we should fix any possibly null strings we encouter.
|
Fri 27 Feb 2009 05:11:06 PM UTC, comment #9:
The trunk version of glib has the patch. I've use it and works.
So I guess that the problem was solved.
|
Fri 27 Feb 2009 12:02:18 PM UTC, comment #8:
The glib team apply a patch who fix this. I guess that in next version it will be avaible.
|
Fri 27 Feb 2009 05:23:39 AM UTC, comment #7:
Fri Feb 27 05:00:59 2009, comment #5:
Seems like gnulib guys already talk about this issue:
http://bugzilla.gnome.org/show_bug.cgi?id=167569
Sorry about that. Those are the GLIB guys, not GNULIB.
|
Fri 27 Feb 2009 05:22:40 AM UTC, comment #6:
Gcc folks also talk about this:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15685
|
Fri 27 Feb 2009 05:00:59 AM UTC, comment #5:
Seems like gnulib guys already talk about this issue:
http://bugzilla.gnome.org/show_bug.cgi?id=167569
|
Fri 27 Feb 2009 04:53:31 AM UTC, comment #4:
>I've always expected printf("%s", NULL) to print the string
>"(null)" but it seems that under Mingw it just crashes....
>Does anyone know what POSIX says about null vs %s ?
The behavior of printf("%s", NULL) is formally undefined. Many C libraries are kind enough to print something like "(null)" or "(nil)", but they are not obliged to.
|
Fri 27 Feb 2009 03:52:31 AM UTC, comment #3:
I've always expected printf("%s", NULL) to print the string "(null)" but it seems that under Mingw it just crashes. I'm wondering if we should report this as a bug to glib and/or mingw.
Does anyone know what POSIX says about null vs %s ?
|
Fri 27 Feb 2009 03:37:02 AM UTC, comment #2:
I finally was able to use gdb to debug psppire under linux. Seems like I've found the problem. Look:
b psppire_window_set_filename
r -q teste.sav
and on psppire-data-window.c:310
gchar *uri = g_filename_to_uri (fine_name,NULL,NULL);
p file_name
$10 = 0x110479 "teste.sav"
p uri
$12 = (gchar *) 0x0
Then, on line 312 I got the first error:
gtk_recent_manager_remove_item(manager,item,NULL);
Gtk-CRITICAL **: gtk_recent_manager_remove_item: assertion 'uri != NULL` failed
This error repeats on line 314, and on line 315 I've got a segfault.
g_warning("Could not add item %s to recent list\n",uri);
Seems like g_warning doesn't like of receive a null string as argument.
|
Wed 25 Feb 2009 09:52:56 PM UTC, comment #1:
> Debuging it I've found that the problem is on gl/argp-parse.c:232:
err = (*group->parser)(key, arg, state);
This should call parse_non_options in psppire.c and from there psppire_data_window_load_file in psppire-data-window.c
Can you try to localise the problem a bit further.
|
Wed 25 Feb 2009 09:05:52 PM UTC, original submission:
The last master git version crashes if receive a file name as argument. It works if I pass any internal flags, like "-q"
and even if I pass an filename that doesn't exists psppire opens and tells me that those file don't exist. And if I pass any other file, like a txt or a binary, psppire opens and tells me that those file isn't a portable or system file.
But if I pass an existing file it crashes. Debuging it I've found
that the problem is on gl/argp-parse.c:232:
err = (*group->parser)(key, arg, state);
If I comment this line, the program works, but doesn't load the file. Putting this line:
printf("%p,%d,%s,%p\n",*group->parser,key, arg, state);
before the problem line I've got:
00412FCE,0,teste.sav,007AFD40
|