GNOME Bugzilla – Bug 330760
Crash with "GC missed a reference" when opening my 1.8.x data file
Last modified: 2018-06-29 20:57:28 UTC
Steps to reproduce: 1. Start gnucash 2. File -> Open -> choose my 1.8.x data file (2 different ones actually) 3. Gnucash crashes Stack trace: gnucash: [W] "failure loading ""/home/frost/beth/.gnucash/books/%2Fhome%2Ffrost%2Fbeth%2Fletters%2Ffinances%2FgnucashRecords%2Ffinances2005personal.gnucash" Backtrace: In unknown file: ?: 0* [gnc:report-name #<freed cell 0x8428f50; GC missed a reference>] In /opt/gnucash-1.9.0/share/gnucash/scm/report.scm: 303: 1* (let ((opt #)) (if opt (gnc:option-value #) #f)) 303: 2* [gnc:report-options #<freed cell 0x8428f50; GC missed a reference>] In unknown file: ?: 3 (and (eq? (quote #) (record-type-descriptor obj)) (struct-ref obj 2)) ?: 4* [eq? #<record-type <report>> ... ?: 5* [record-type-descriptor #<freed cell 0x8428f50; GC missed a reference>] ?: 6 (if (struct? obj) (struct-vtable obj) (error (quote not-a-record) obj)) ... ?: 7 [scm-error misc-error #f ...] <unnamed port>: In procedure scm-error in expression (scm-error (quote misc-error) #f ...): <unnamed port>: not-a-record #<freed cell 0x8428f50; GC missed a reference> [1] Exit 2 /opt/gnucash-1.9.0/bin/gnucash Other information: I did have some saved custom reports open in that file. I'm sorry I can't sanitize the file and give it to you just yet. To do so would likely take me a month of free time, but I thought I'd report the bug because I didn't see it when I searched. Someone else had the exact same error on Xchat, so it's not unique to me.
Thanks for reporting this. Obviously we haven't noticed that problem so far but we'd certainly like to fix it. We would need some more information to track down this bug: which distribution is this? Which guile and slib versions do you have installed? Regarding the custom reports, there are two potential sources of error: One is the "saved reports" in the "Custom" menu, which are saved in the file ~/.gnucash/saved-reports-1.8 . The other are those reports which are left open when closing gnucash -- these are saved in the file ~/.gnucash/config-1.8.auto plus a reference to the report number in ~/.gnome/GnuCash. Is there any chance you could attach all three of these files here in the bug report? You can look through the files with a text editor first to make sure they don't contain sensitive information, but usually they don't, as they only contain the datafile-internal ID number of the accounts but none of the actual account balances and/or transactions.
I think the most helpful info for debugging this woudl be the file: /home/frost/beth/.gnucash/books/%2Fhome%2Ffrost%2Fbeth%2Fletters%2Ffinances%2FgnucashRecords%2Ffinances2005personal.gnucash That should contain the settings for any custom reports.
My thinking on this bug is that it's due to the change from load-reports-from-scheme to load-reports-from-C.. I suspect we're not properly protecting a SCM object reference from the C code.
Actually, I think Chris just fixed this in r13223. Unfortunately he didn't mention that in the changeset log message or here. Could you retest?
(In reply to comment #4) > Actually, I think Chris just fixed this in r13223. Unfortunately he didn't > mention that in the changeset log message or here. Could you retest? > The svn version doesn't crash. It does show some errors. This bug should probably be closed and another one opened. I'll post the terminal output of the svn version here for reference.
Here's my output with the same file and environment for the svn version. There is some sort of scm trace in the middle, and it opened up way too many reports (one for each of my expenses) and my multicolumn report was broken. It had two custom reports in it, one that was "Expenses 04" and another that was "Expenses 05" --Beth beth@oasis [10:47pm] /opt/gnucash-1.9.svn/bin/gnucash This is a development version. It may or may not work. Report bugs and other problems to gnucash-devel@gnucash.org. You can also lookup and file bug reports at http://bugzilla.gnome.org The last stable version was GnuCash 1.8.12 The next stable version will be GnuCash 2.0 gnucash: [M] "Found Finance::Quote version "1.08 gnucash: [W] "failure loading ""/home/frost/beth/.gnucash/books/%2Fhome%2Ffrost%2Fbeth%2Fletters%2Ffinances%2Fgnuc ashRecords%2Ffinances2005personal.gnucash" gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar x_order_2: colinear! x_order_2: colinear! x_order_2: colinear! x_order_2: colinear! colinear! colinear! object_found: 1 gnucash: [E] "Null document title" gnucash: [E] "Null document title" gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" gnucash: [E] "Null document title" gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 In /opt/gnucash-1.9.svn/share/gnucash/scm/report.scm: 409: 14* (set! doc (if template (let* # # # ...) #f)) 409: 15* (if template (let* # # # ...) #f) 410: 16 (let* (# # # ...) (gnc:html-document-set-style-sheet! doc stylesheet) ...) 412: 17* [render-view #] In /opt/gnucash-1.9.svn/share/gnucash/guile-modules/gnucash/report/view-column.scm: 72: 18 (let* (# # # # ...) (let # # #) (for-each # reports) ...) 88: 19* (let ((new-reports #)) (for-each (lambda # #) reports) ...) 89: 20* [for-each #<procedure #f (report-info)> ((92 1 1 #f) (91 1 1 #f))] In unknown file: ?: 21* [#<procedure #f (report-info)> (92 1 1 #f)] In /opt/gnucash-1.9.svn/share/gnucash/guile-modules/gnucash/report/view-column.scm: 91: 22* (let (# # # #) (if # #) (set! new-reports #)) 95: 23* (if (not callback) (begin (set! callback #) (set! report-info #))) 96: 24 (begin (set! callback #) (set! report-info #)) 97: 25* (set! callback (make-child-options-callback report #)) 98: 26* [make-child-options-callback # #f] 60: 27 (let* ((view-opts #) (child-opts #) (id #)) id) 61: 28* [gnc:report-options #f] In unknown file: ?: 29 (and (eq? (quote #) (record-type-descriptor obj)) (struct-ref obj 2)) ?: 30* [eq? #<record-type <report>> ... ?: 31* [record-type-descriptor #f] ?: 32 (if (struct? obj) (struct-vtable obj) (error (quote not-a-record) obj)) ... ?: 33 [scm-error misc-error #f "~A ~S" (not-a-record #f) #f] <unnamed port>: In procedure scm-error in expression (scm-error (quote misc-error) #f ...): <unnamed port>: not-a-record #f gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar x_order_2: colinear! x_order_2: colinear! object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar x_order_2: colinear! x_order_2: colinear! colinear! colinear! x_order_2: colinear! x_order_2: colinear! x_order_2: colinear! object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar x_order_2: colinear! colinear! colinear! x_order_2: colinear! object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar x_order_2: colinear! object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar x_order_2: colinear! object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-bar object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1 gnucash: [E] "Null document title" requesting object classid: gnc-guppi-pie object_found: 1
Okay, I'm closing this bug. Most of the output is debugging output. There's the one stack trace which is important, but that should get copied into a new bug report. Thanks for testing, Beth!
The stack trace is probably not a bug per se. The way it's supposed to work is that if there's something wrong with the report, the C code will catch the error, print a stack trace and continue with the other reports. I figured some users might want to know _why_ their old report wasn't opening, and the stack trace might help. OTOH, opening one report for each expense is not what I'd expect. That might be the bug for a new report.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=330760. Please update any external references or bookmarks.