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 92779 - Crash when editing an SX
Crash when editing an SX
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Scheduled Transactions
git-master
Other Linux
: Normal critical
: ---
Assigned To: Josh Sled
Josh Sled
Depends on:
Blocks:
 
 
Reported: 2002-09-08 13:56 UTC by Tim Wunder
Modified: 2018-06-29 20:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change g_assert to a more reasonable test (858 bytes, patch)
2002-09-15 01:03 UTC, Tim Wunder
none Details | Review
Looks like new committ didn't quite work, new patch file (1.01 KB, patch)
2002-09-16 01:04 UTC, Tim Wunder
none Details | Review

Description Tim Wunder 2002-09-08 13:56:20 UTC
Gnucash CVS crashes when attemptiong to edit an SX with the following:

** ERROR **: file gnc-dense-cal.c: line 1413 (gnc_dense_cal_mark):
assertion failed: (doc < dcal->numMarks)
aborting...

Program received signal SIGABRT, Aborted.

Thread 1024 (LWP 12403)

  • #0 __kill
    from /lib/libc.so.6
  • #1 raise
    from /lib/libc.so.6
  • #2 abort
    from /lib/libc.so.6
  • #3 g_logv
    from /opt/gnome/lib/libglib-1.2.so.0
  • #4 g_log
    from /opt/gnome/lib/libglib-1.2.so.0
  • #5 gnc_dense_cal_mark
    at gnc-dense-cal.c line 1413
  • #6 gnc_sxed_update_cal
    at dialog-scheduledxaction.c line 2216
  • #7 schedXact_editor_populate
    at dialog-scheduledxaction.c line 1539
  • #8 gnc_ui_scheduled_xaction_editor_dialog_create
    at dialog-scheduledxaction.c line 1290
  • #9 edit_button_clicked
    at dialog-scheduledxaction.c line 1592
  • #10 gtk_marshal_NONE__NONE
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #11 gtk_handlers_run
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #12 gtk_signal_real_emit
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #13 gtk_signal_emit
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #14 gtk_button_clicked
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #15 gtk_real_button_released
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #16 gtk_marshal_NONE__NONE
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #17 gtk_signal_real_emit
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #18 gtk_signal_emit
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #19 gtk_button_released
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #20 gtk_button_button_release
    from /usr/X11R6/lib/libgtk-1.2.so.0
  • #21 gtk_marshal_BOOL__POINTER
    from /usr/X11R6/lib/libgtk-1.2.so.0

Steps to reproduce:
Open Gnucash, 
Open SX editor
Try to edit an SX.

This is with CVS build from 8/21/02
Comment 1 Tim Wunder 2002-09-09 18:06:12 UTC
This crash only appears to happen when editing SX's that recur at
least biweekly. Editing monthly and less frequent SX's don't cause the
crash.
Comment 2 Tim Wunder 2002-09-12 18:09:03 UTC
Fixed by changing for loop in gnc_dense_cal_mark() in gnc-dense-cal.c
to this:
for ( i=0; i<size; i++ ) {
     d = dateArray[i];
     doc = gdc_get_doc_offset( dcal, d );
     if ( doc < 0 ) {
        continue;
     }
     if ( doc >= dcal->numMarks ) {
     /* It's not going to get any better, so just stop */
        break;
     }
     dcal->marks[doc] = g_list_append( dcal->marks[doc], newMark );
     newMark->ourMarks = g_list_append( newMark->ourMarks,
                                            GINT_TO_POINTER(doc) );
     }
}
Comment 3 Tim Wunder 2002-09-15 01:03:41 UTC
Created attachment 11079 [details] [review]
Change g_assert to a more reasonable test
Comment 4 Josh Sled 2002-09-16 00:44:53 UTC
Fixed in 2002.09.15 commit.
Comment 5 Tim Wunder 2002-09-16 01:04:31 UTC
Created attachment 11099 [details] [review]
Looks like new committ didn't quite work, new patch file
Comment 6 Josh Sled 2002-09-29 20:48:49 UTC
This has been fixed [in the form of the second attachment].
Comment 7 John Ralls 2018-06-29 20:17:19 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=92779. Please update any external references or bookmarks.