GNOME Bugzilla – Bug 354730
crash in Calculator: running 3x10^38 using bi...
Last modified: 2007-10-06 14:02:55 UTC
What were you doing when the application crashed? running 3x10^38 using binary notation, in scientific view, with 'sci format' (i think) on.. Distribution: Ubuntu 6.10 (edgy) Gnome Release: 2.16.0 2006-09-04 (Ubuntu) BugBuddy Version: 2.15.92 Memory status: size: 36569088 vsize: 0 resident: 36569088 share: 0 rss: 13889536 rss_rlim: 0 CPU usage: start_time: 1157611669 rtime: 0 utime: 336 stime: 0 cutime:322 cstime: 0 timeout: 14 it_real_value: 0 frequency: 0 Backtrace was generated from '/usr/bin/gcalctool' (no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1224340992 (LWP 21009)] 0xffffe410 in __kernel_vsyscall ()
+ Trace 71777
Thread 1 (Thread -1224340992 (LWP 21009))
I'm not reproducing this, so could you please do the following: 1/ Tell me what version of gcalctool this is. Help->About should give you that information. 2/ Give me step-by-step details of what you typed in, just before it crashed. Thanks.
open gcalctool enter scientific mode select 'dec' select 'fix' enter the following (clicking on the buttons) 3 (three) * (times) 10x (the button, 10 to the power of) 3 8 (thirty eight) select 'bin' = (equals) get a 'no undo history' warning in status bar at bottom select 'dec' = (equals again) crash. refile bug as http://bugzilla.gnome.org/show_bug.cgi?id=354730 to make sure the (probably useless) stacktrace is there. Terminal output: kgoetz@Rommel - Thu Sep 28 - 18:27:44 :~$ gcalctool gcalctool: functions.c:143: new_state: Assertion `!v->h.e[v->h.current].expression' failed. ** (bug-buddy:9804): WARNING **: Couldn't load icon for Epiphany Web Bookmarks ** (bug-buddy:9804): WARNING **: Couldn't load icon for Open Folder Package version: kgoetz@Rommel - Thu Sep 28 - 18:31:41 :~$ apt-cache show gcalctool Package: gcalctool Priority: optional Section: math Installed-Size: 5200 Maintainer: Sebastien Bacher <seb128@debian.org> Architecture: i386 Version: 5.8.24-0ubuntu1 Replaces: gnome-utils (<< 2.4) Depends: libatk1.0-0 (>= 1.12.1), libc6 (>= 2.4-1), libgconf2-4 (>= 2.13.5), libglib2.0-0 (>= 2.12.0), libgnome2-0 (>= 2.14.1), libgnomeui-0 (>= 2.13.0), libgtk2.0-0 (>= 2.10.0), liblaunchpad-integration0 (>= 0.0patch26), gconf2 (>= 2.12.1-4ubuntu1) Conflicts: gnome-utils (<< 2.4) Filename: pool/main/g/gcalctool/gcalctool_5.8.24-0ubuntu1_i386.deb Size: 654352 MD5sum: e4bb4a52564d3458469e68afec9d1cd2 Description: A GTK2 desktop calculator gcalctool is a powerful graphical calculator with financial, logical and scientific modes. It uses a multiple precision package to do its arithmetic to give a high degree of accuracy. Bugs: mailto:ubuntu-users@lists.ubuntu.com Origin: Ubuntu Task: ubuntu-desktop, edubuntu-desktop Sorry it took a while to respond.
*** Bug 358103 has been marked as a duplicate of this bug. ***
Thanks Karl. Confirmed. gcalctool is terminating because it's thrown an assertion: Assertion failed: !v->h.e[v->h.current].expression, file functions.c, line 143 It simply shouldn't do that. It doesn't in no arithmetic operator precedence mode. Sami, please take a look at this and adjust it to put an error message in the status area if needed. In fact, if you have any other assertions, please remove them and adjust accordingly. Thanks.
Created attachment 73592 [details] [review] The Fix. Fixed 1. The erronous message about undo history. 2. Crash
There are situations where gcalctool must be exited because the error is unrecoverable (critical software bug detected). Such places are asserted. This was a case where gcalctool detected corrupted data structure and protected itself from possible (future) NULL pointer reference. However in this case, a quick fix was to remove the check because currently the routines are likely to handle the NULL pointer. This is because empty expression currently has two presentation forms: char *syntax = "" char *syntax = NULL; I am planning to make latter invalid in the future.
Committed the fix to the CVS HEAD.
Yesterday I also generated a gcalctool v5.8.25 tarball with this fix in. Hopefully Linux distros will pick this up soon so we can stop the plaugue of bugs reported in GNOME 2.16 because of this problem.
*** Bug 369035 has been marked as a duplicate of this bug. ***
*** Bug 370207 has been marked as a duplicate of this bug. ***
*** Bug 373371 has been marked as a duplicate of this bug. ***
*** Bug 375183 has been marked as a duplicate of this bug. ***
*** Bug 375335 has been marked as a duplicate of this bug. ***
*** Bug 368885 has been marked as a duplicate of this bug. ***
*** Bug 371243 has been marked as a duplicate of this bug. ***
*** Bug 362469 has been marked as a duplicate of this bug. ***
*** Bug 366340 has been marked as a duplicate of this bug. ***
*** Bug 377426 has been marked as a duplicate of this bug. ***
*** Bug 377430 has been marked as a duplicate of this bug. ***
*** Bug 378955 has been marked as a duplicate of this bug. ***
*** Bug 379575 has been marked as a duplicate of this bug. ***
*** Bug 381161 has been marked as a duplicate of this bug. ***
*** Bug 381518 has been marked as a duplicate of this bug. ***
*** Bug 382417 has been marked as a duplicate of this bug. ***
*** Bug 382749 has been marked as a duplicate of this bug. ***
*** Bug 384451 has been marked as a duplicate of this bug. ***
*** Bug 384987 has been marked as a duplicate of this bug. ***
*** Bug 386343 has been marked as a duplicate of this bug. ***
*** Bug 386686 has been marked as a duplicate of this bug. ***
*** Bug 388247 has been marked as a duplicate of this bug. ***
*** Bug 390905 has been marked as a duplicate of this bug. ***
*** Bug 391077 has been marked as a duplicate of this bug. ***
*** Bug 397897 has been marked as a duplicate of this bug. ***
*** Bug 398139 has been marked as a duplicate of this bug. ***
*** Bug 399339 has been marked as a duplicate of this bug. ***
*** Bug 401224 has been marked as a duplicate of this bug. ***
*** Bug 402112 has been marked as a duplicate of this bug. ***
*** Bug 402105 has been marked as a duplicate of this bug. ***
*** Bug 404586 has been marked as a duplicate of this bug. ***
*** Bug 404788 has been marked as a duplicate of this bug. ***
*** Bug 404797 has been marked as a duplicate of this bug. ***
*** Bug 404826 has been marked as a duplicate of this bug. ***
*** Bug 406065 has been marked as a duplicate of this bug. ***
*** Bug 406418 has been marked as a duplicate of this bug. ***
*** Bug 406954 has been marked as a duplicate of this bug. ***
*** Bug 407843 has been marked as a duplicate of this bug. ***
*** Bug 409031 has been marked as a duplicate of this bug. ***
*** Bug 409599 has been marked as a duplicate of this bug. ***
*** Bug 410973 has been marked as a duplicate of this bug. ***
*** Bug 413762 has been marked as a duplicate of this bug. ***
*** Bug 416172 has been marked as a duplicate of this bug. ***
*** Bug 416183 has been marked as a duplicate of this bug. ***
*** Bug 418100 has been marked as a duplicate of this bug. ***
*** Bug 418561 has been marked as a duplicate of this bug. ***
*** Bug 418890 has been marked as a duplicate of this bug. ***
*** Bug 421655 has been marked as a duplicate of this bug. ***
*** Bug 424550 has been marked as a duplicate of this bug. ***
*** Bug 427351 has been marked as a duplicate of this bug. ***
*** Bug 428147 has been marked as a duplicate of this bug. ***
*** Bug 429150 has been marked as a duplicate of this bug. ***
*** Bug 430316 has been marked as a duplicate of this bug. ***
*** Bug 430948 has been marked as a duplicate of this bug. ***
*** Bug 432050 has been marked as a duplicate of this bug. ***
*** Bug 432550 has been marked as a duplicate of this bug. ***
*** Bug 435470 has been marked as a duplicate of this bug. ***
*** Bug 436777 has been marked as a duplicate of this bug. ***
*** Bug 437029 has been marked as a duplicate of this bug. ***
*** Bug 440648 has been marked as a duplicate of this bug. ***
*** Bug 449379 has been marked as a duplicate of this bug. ***
*** Bug 470583 has been marked as a duplicate of this bug. ***
*** Bug 477560 has been marked as a duplicate of this bug. ***
*** Bug 484045 has been marked as a duplicate of this bug. ***