GNOME Bugzilla – Bug 599630
Crashing after xml loading.
Last modified: 2018-06-29 22:30:05 UTC
Gnucash is crashing after loading xml. Trace log in attachment.
Created attachment 146250 [details] Crash after loading xml.
Thanks for taking the time to report this bug. This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a description of how to reproduce this bug. You'll also need to add a stack trace; please see http://wiki.gnucash.org/wiki/Stack_Trace for more information about how to do so. Thanks in advance!
Ok, firstly I think it's connected to that I've created my accounts plan in earlier gnucash version. In https://bugzilla.gnome.org/show_bug.cgi?id=599151 described it. Phil Longstaff wrote a solution how to migrate to newer version and then is a xml crash. Steps to Reproduce: 1) File -> Save as -> xml file 2) Close gnucash 3) Run gnucas 4) Gnucash crashes after run. Actual Results: The application crashed. Expected Results: Standard application view after loading accounts plan. Build Date & Platform: svn r18372 2009-10-06 Windows XP Stacktrace: "I'm sorry, but I encountered this problem only on Windows and your wiki page says it's impossible to obtain stack traces there" ;) I still could do this: http://wiki.gnucash.org/wiki/Windows#Debugging_with_gdb but really I don't have time for it (busy days). So, If you won't be able to reproduce this bug I will try to find some time. At this time there is very important question for me. Will there be any solution for this or should I try to copy all transaction one by one to newer file started in gnucash 2.3.7 ??? Thanks for replaying. It's very important for me if I will be able to rely on gnucash.
Created attachment 146291 [details] gnucash crash
Hi, Without a stack trace and without a step-by-step guide to reproduce this we cannot guess where the issue might be. I understand how important GnuCash is to you, but unfortunately you haven't provided enough information. note that you CAN still obtain a stack trace on Windows. It's more challenging, but it's possible. unfortunately without it we can't do anything.
Created attachment 146364 [details] Stack trace
Hi, I wrote step-by-step yesterday, there is nothing more to write about. Look also to connected bugs, maybe it will help. I just uploaded an attachment with stack trace, hope it will help.
Aha! The stack trace is great. In particular it points to:
+ Trace 218625
which is this line: PWARN (" split=\"%s\" account=\"%s\" commodity=\"%s\"", split->memo, xaccAccountGetName(split->acc), gnc_commodity_get_mnemonic(xaccAccountGetCommodity(split->acc))); I suspect that one of these strings is NULL causing a failure in the PWARN.
Will it be fixed?
This may be related to bug 599151. My guess is that you started with an earlier version of 2.3.X. At around 2.3.4, the schema changed and I suggested you save the file to XML, delete the db, then recreate it with the new version of gnucash. This, unfortunately, also carried some db data problems forward. For example, it was possible to have multiple instances of the currency commodity (e.g. EUR), so that some accounts and other objects would lose their commodity. If this was carried into the XML file, then there might be an account with no commodity, leading to the problems being seen. I think the XML file can be manually repaired.
Phill, if I understand you correctly, the original poster likely got into this situation by 1. using the SQL backend with GC < 2.3.4, 2. then having to convert his data to a more recent schema after 2.3.4, where you suggested a way to do this in bug 599151 3. But this conversion was not complete due to some problems with the original db schema. The only solution is to manually fix the xml file and continue from there. The fix consists of searching for accounts and other objects that don't have a commodity anymore, and re-add it. Is that correct ? If this is indeed the case, then there is no bug to fix here anymore and this issue can be closed. przemmaj, Have you tried to fix your XML file as Phil propsed ? And did it work ?
Yes, that is what I am saying.
Yest, it worked so the bug can be closed. Thanks.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=599630. Please update any external references or bookmarks.