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 512841 - Crash in expression parser on nullary functions, like pmt()
Crash in expression parser on nullary functions, like pmt()
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Engine
2.2.x
Other All
: High critical
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: backport
 
 
Reported: 2008-01-29 17:14 UTC by Mauro Leibelt
Modified: 2018-06-29 22:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
First try (957 bytes, patch)
2008-01-30 00:25 UTC, Andreas Köhler
committed Details | Review

Description Mauro Leibelt 2008-01-29 17:14:35 UTC
What were you doing when the application crashed?
Typed pmt() in the transaction amount


Distribution: Unknown
Gnome Release: 2.21.2 2007-11-13 (GNOME.Org)
BugBuddy Version: 2.20.1

System: Linux 2.6.23.8 #1 PREEMPT Mon Nov 19 14:13:22 PST 2007 i686
X Vendor: The X.Org Foundation
X Vendor Release: 70100000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: gnome

Memory status: size: 88133632 vsize: 88133632 resident: 55812096 share: 16322560 rss: 55812096 rss_rlim: 4294967295
CPU usage: start_time: 1201626173 rtime: 1424 utime: 836 stime: 588 cutime:0 cstime: 14 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/gnucash'

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1232345408 (LWP 10632)]
[New Thread -1264948336 (LWP 10634)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1232345408 (LWP 10632))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 IA__g_spawn_sync
    at gspawn.c line 369
  • #3 IA__g_spawn_command_line_sync
    at gspawn.c line 677
  • #4 run_bug_buddy
    at gnome-breakpad.cc line 213
  • #5 check_if_gdb
    at gnome-breakpad.cc line 283
  • #6 google_breakpad::ExceptionHandler::InternalWriteMinidump
    at ../google-breakpad/src/client/linux/handler/exception_handler.cc line 225
  • #7 google_breakpad::ExceptionHandler::HandleException
    at ../google-breakpad/src/client/linux/handler/exception_handler.cc line 196
  • #8 <signal handler called>
  • #9 func_op
    at gnc-exp-parser.c line 356
  • #10 primary_exp
    at expression_parser.c line 1201
  • #11 multiply_divide_op
    at expression_parser.c line 1016
  • #12 assignment_op
    at expression_parser.c line 956
  • #13 parse_string
  • #14 gnc_exp_parser_parse_separate_vars
  • #15 gnc_exp_parser_parse
  • #16 gnc_price_cell_parse
    at pricecell.c line 144
  • #17 gnc_price_cell_leave
    at pricecell.c line 177
  • #18 gnc_table_leave_update
    at table-allgui.c line 1176
  • #19 gnucash_sheet_deactivate_cursor_cell
    at gnucash-sheet.c line 212
  • #20 gnucash_sheet_cursor_move
    at gnucash-sheet.c line 288
  • #21 gnucash_sheet_key_press_event
    at gnucash-sheet.c line 1751
  • #22 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 84
  • #23 g_type_class_meta_marshal
    at gclosure.c line 567
  • #24 IA__g_closure_invoke
    at gclosure.c line 490
  • #25 signal_emit_unlocked_R
    at gsignal.c line 2478
  • #26 IA__g_signal_emit_valist
    at gsignal.c line 2209
  • #27 IA__g_signal_emit
    at gsignal.c line 2243
  • #28 gtk_widget_event_internal
    at gtkwidget.c line 4675
  • #29 IA__gtk_window_propagate_key_event
    at gtkwindow.c line 4935
  • #30 gtk_window_key_press_event
    at gtkwindow.c line 4965
  • #31 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 84
  • #32 g_type_class_meta_marshal
    at gclosure.c line 567
  • #33 IA__g_closure_invoke
    at gclosure.c line 490
  • #34 signal_emit_unlocked_R
    at gsignal.c line 2478
  • #35 IA__g_signal_emit_valist
    at gsignal.c line 2209
  • #36 IA__g_signal_emit
    at gsignal.c line 2243
  • #37 gtk_widget_event_internal
    at gtkwidget.c line 4675
  • #38 IA__gtk_propagate_event
    at gtkmain.c line 2293
  • #39 IA__gtk_main_do_event
    at gtkmain.c line 1539
  • #40 gdk_event_dispatch
    at gdkevents-x11.c line 2351
  • #41 IA__g_main_context_dispatch
    at gmain.c line 2061
  • #42 g_main_context_iterate
    at gmain.c line 2694
  • #43 IA__g_main_loop_run
    at gmain.c line 2898
  • #44 IA__gtk_main
    at gtkmain.c line 1146
  • #45 gnc_ui_start_event_loop
    at gnc-gnome-utils.c line 450
  • #46 inner_main
    at gnucash-bin.c line 489
  • #47 invoke_main_func
    at init.c line 367
  • #48 c_body
    at continuations.c line 350
  • #49 scm_c_catch
    at throw.c line 204
  • #50 scm_i_with_continuation_barrier
    at continuations.c line 326
  • #51 scm_c_with_continuation_barrier
    at continuations.c line 368
  • #52 scm_i_with_guile_and_parent
    at threads.c line 695
  • #53 scm_with_guile
    at threads.c line 683
  • #54 scm_boot_guile
    at init.c line 350
  • #55 main
    at gnucash-bin.c line 623
  • #0 __kernel_vsyscall


----------- .xsession-errors (3772 sec old) ---------------------
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
PluralForm.jsm: Index #1 of '' for value 0 is invalid -- plural rule #1
"/usr/bin/gnucash": not in executable format: File format not recognized
--------------------------------------------------
Comment 1 Andreas Köhler 2008-01-30 00:24:44 UTC
Nice bug, big thanks!

I suppose this is due to an expression parser bug that regards pmt() as a unary function with a NULL parameter.  It seems to me that the following patch could resolve this issue.  Jsled, what do you think?
Comment 2 Andreas Köhler 2008-01-30 00:25:15 UTC
Created attachment 103998 [details] [review]
First try
Comment 3 Andreas Köhler 2008-03-09 20:39:27 UTC
Well, applied to trunk as r17021.
Marking for backport to 2.2.
Comment 4 Andreas Köhler 2008-04-26 16:53:01 UTC
Applied to branches/2.2 as r17129 for GnuCash 2.2.5.
Comment 5 John Ralls 2018-06-29 22:00:18 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=512841. Please update any external references or bookmarks.