After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 106583 - ( <Delete> ) crashes gcalctool.
( <Delete> ) crashes gcalctool.
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other All
: Normal major
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2003-02-20 02:40 UTC by Rich Burridge
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch to fix GTK-CRITICAL messages. (1.10 KB, patch)
2003-02-20 07:05 UTC, Dennis Cranston
none Details | Review

Description Rich Burridge 2003-02-20 02:40:55 UTC
Reported against v4.2.52. Start up gcalctool. Enter:

( <Delete> )

i.e. left parenthis, delete then right parenthesis.

You will get two:

(gcalctool:10872): Gtk-CRITICAL **: file gtktextbuffer.c: line 548:
assertion `g_utf8_validate (text, len, NULL)' failed

Followed by a SEGV:

Program received signal SIGSEGV, Segmentation fault.
0x2cff8 in mpstr (x=0xfffffffc, y=0x57914) at mp.c:4226
4226        j = x[1];
(gdb) where
  • #0 mpstr
    at mp.c line 4226
  • #1 process_stack
    at graphics.c line 90
  • #2 process_parens
  • #3 do_paren
    at functions.c line 706
  • #4 do_pending
    at functions.c line 762
  • #5 button_proc
    at gtk.c line 472
  • #6 g_cclosure_marshal_VOID__VOID
    from /CSUN/dist/gnome2.0/lib/libgobject-2.0.so.0
  • #7 g_closure_invoke
    from /CSUN/dist/gnome2.0/lib/libgobject-2.0.so.0
  • #8 signal_emit_unlocked_R
  • #32 g_main_context_dispatch
    from /CSUN/dist/gnome2.0/lib/libglib-2.0.so.0
  • #33 g_main_context_iterate
    from /CSUN/dist/gnome2.0/lib/libglib-2.0.so.0
  • #34 g_main_loop_run
    from /CSUN/dist/gnome2.0/lib/libglib-2.0.so.0
  • #35 gtk_main
    from /CSUN/dist/gnome2.0/lib/libgtk-x11-2.0.so.0
  • #36 start_tool
    at gtk.c line 1896
  • #37 do_calctool
    at calctool.c line 1915
  • #38 main
    at gtk.c line 267
$1 = (int *) 0xfffffffc
(gdb) print x[1]
Cannot access memory at address 0x0
(gdb)
Comment 1 Dennis Cranston 2003-02-20 07:03:42 UTC
Rich,

Here is a patch to clean up the Gtk-CRITICAL messages. 

(gcalctool:10872): Gtk-CRITICAL **: file gtktextbuffer.c: line 548:
assertion `g_utf8_validate (text, len, NULL)' failed

-- Dennis
Comment 2 Dennis Cranston 2003-02-20 07:05:04 UTC
Created attachment 14460 [details] [review]
A patch to fix GTK-CRITICAL messages.
Comment 3 Dennis Cranston 2003-02-20 07:25:33 UTC
Rich,

Also, make the below utf8 change in get_display().

Thanks,
Dennis


Index: gtk.c
===================================================================
RCS file: /cvs/gnome/gcalctool/gcalctool/gtk.c,v
retrieving revision 1.65
diff -u -p -r1.65 gtk.c
--- gtk.c	19 Feb 2003 22:32:56 -0000	1.65
+++ gtk.c	20 Feb 2003 07:27:28 -0000
@@ -1218,7 +1218,7 @@ get_display()              /* The Copy f
     if (v->shelf != NULL) {
         free(v->shelf);
     }
-    v->shelf = g_strdup(string);
+    v->shelf = g_locale_from_utf8(string, strlen(string), NULL, NULL,
NULL);
 
Comment 4 Rich Burridge 2003-02-20 18:05:46 UTC
  Thanks Dennis. Those changes nicely fix the error messages.
  The crash was caused by the paren_disp() function in display.c not
  correctly checking for when a Delete character was entered.
  Fixed in v4.2.55.