GNOME Bugzilla – Bug 92779
Crash when editing an SX
Last modified: 2018-06-29 20:17:19 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.
+ Trace 27089
Thread 1024 (LWP 12403)
Steps to reproduce: Open Gnucash, Open SX editor Try to edit an SX. This is with CVS build from 8/21/02
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.
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) ); } }
Created attachment 11079 [details] [review] Change g_assert to a more reasonable test
Fixed in 2002.09.15 commit.
Created attachment 11099 [details] [review] Looks like new committ didn't quite work, new patch file
This has been fixed [in the form of the second attachment].
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.