Geany exits out while searching for "%size" in any file, blank or otherwise. (I haven't switched to 0.4, can anyone who is using 0.4 confirm this?) Ali
Ali Shah wrote:
Geany exits out while searching for "%size" in any file, blank or otherwise. (I haven't switched to 0.4, can anyone who is using 0.4 confirm this?) Ali
I get the same problem with Geany 0.4.
I think the problem is line 144-145 of src/dialogs.c: dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, string);
If 'string' contains a % character e.g. %s then gtk_message_dialog_new looks for another string argument on the stack, causing a segfault.
I have a quick backtrace:
Program received signal SIGSEGV, Segmentation fault. 0x442f0c7b in strlen () from /lib/tls/libc.so.6 (gdb) bt #0 0x442f0c7b in strlen () from /lib/tls/libc.so.6 #1 0x442c5155 in vfprintf () from /lib/tls/libc.so.6 #2 0x442e2216 in vasprintf () from /lib/tls/libc.so.6 #3 0x4a5cc311 in g_vasprintf () from /usr/lib/libglib-2.0.so.0 #4 0x4a5bdd25 in g_strdup_vprintf () from /usr/lib/libglib-2.0.so.0 #5 0x4a89367f in gtk_message_dialog_new () from /usr/lib/libgtk- x11-2.0.so.0 #6 0x08073c65 in dialogs_show_not_found () #7 0x080845f4 in document_find_next () #8 0x080993d9 in on_toolbutton18_clicked ()
Hi,
Geany exits out while searching for "%size" in any file, blank or otherwise. (I haven't switched to 0.4, can anyone who is using 0.4 confirm this?) Ali
I get the same problem with Geany 0.4.
I think the problem is line 144-145 of src/dialogs.c: dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, string);
If 'string' contains a % character e.g. %s then gtk_message_dialog_new looks for another string argument on the stack, causing a segfault.
Yes, I just committed a fixed version of dialogs.c into CVS(should appear within the next 5 hours). So, please give it a try and report if it works or not, because I can't reproduce the bug(no idea why, on my system Geany didn't crash).
Thanks, Enrico
Enrico Troeger wrote:
Yes, I just committed a fixed version of dialogs.c into CVS(should appear within the next 5 hours).
Hi, I just tried the dialogs.c from CVS and for me it fixes the 'not found' dialog segfault with % strings.
BTW I think you can do: dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", string);
instead of using NULL and gtk_message_dialog_set_markup - avoiding Pango Markup formatting - but it doesn't matter too much for the 'not found' dialog :)
Thanks, Nick
Nick Treleaven schrieb am 29.12.2005 00:15:
Enrico Troeger wrote:
Yes, I just committed a fixed version of dialogs.c into CVS(should appear within the next 5 hours).
Hi, I just tried the dialogs.c from CVS and for me it fixes the 'not found' dialog segfault with % strings.
BTW I think you can do: dialog = gtk_message_dialog_new(GTK_WINDOW(app->window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", string);
Done. ;-)
Thanks, Enrico