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 599630 - Crashing after xml loading.
Crashing after xml loading.
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Backend - XML
2.3.x
Other Windows
: High critical
: ---
Assigned To: Andreas Köhler
Andreas Köhler
Depends on:
Blocks:
 
 
Reported: 2009-10-26 09:19 UTC by przemmaj
Modified: 2018-06-29 22:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Crash after loading xml. (755 bytes, application/octet-stream)
2009-10-26 09:21 UTC, przemmaj
Details
gnucash crash (45.30 KB, image/jpeg)
2009-10-26 20:06 UTC, przemmaj
Details
Stack trace (2.69 KB, text/plain)
2009-10-27 19:29 UTC, przemmaj
Details

Description przemmaj 2009-10-26 09:19:38 UTC
Gnucash is crashing after loading xml. 
Trace log in attachment.
Comment 1 przemmaj 2009-10-26 09:21:34 UTC
Created attachment 146250 [details]
Crash after loading xml.
Comment 2 Christian Stimming 2009-10-26 19:36:07 UTC
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!
Comment 3 przemmaj 2009-10-26 20:01:00 UTC
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.
Comment 4 przemmaj 2009-10-26 20:06:29 UTC
Created attachment 146291 [details]
gnucash crash
Comment 5 Derek Atkins 2009-10-27 17:37:52 UTC
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.
Comment 6 przemmaj 2009-10-27 19:29:49 UTC
Created attachment 146364 [details]
Stack trace
Comment 7 przemmaj 2009-10-27 19:31:48 UTC
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.
Comment 8 Derek Atkins 2009-10-27 22:30:20 UTC
Aha!  The stack trace is great.  In particular it points to:

  • #7 xaccTransScrubCurrency
    at ../../../repos/src/engine/Scrub.c line 611

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.
Comment 9 przemmaj 2009-10-28 08:28:44 UTC
Will it be fixed?
Comment 10 Phil Longstaff 2009-11-10 02:28:16 UTC
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.
Comment 11 Geert Janssens 2010-02-02 13:46:19 UTC
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 ?
Comment 12 Phil Longstaff 2010-02-02 14:18:48 UTC
Yes, that is what I am saying.
Comment 13 przemmaj 2010-02-02 14:21:52 UTC
Yest, it worked so the bug can be closed. Thanks.
Comment 14 John Ralls 2018-06-29 22:30:05 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=599630. Please update any external references or bookmarks.