GNOME Bugzilla – Bug 795031
3.0 Crashes on loading when opening 2.6.19 file
Last modified: 2018-06-30 00:07:27 UTC
Created attachment 370588 [details] Trace File Generated Loading 2.6.19 file I have a problem loading my 2.6.19 file in 3.0. The program goes through the startup and then crashes when attempting to load the file. I have attached the trace file. I am able to create a new 3.0 file, save and reopen it.
So it's breaking on opening an invoice. How many invoices are in your file?
I have about 100 invoices over a couple of year period. Is it just one invoice or invoices in general?
It looks from the tracefile you posted that it's crashing on the first one, but the question was about how many you have. If you're up for a little experimentation, you can try editing your file. If it's saved compressed, open it in 2.6.19 and turn off compression on the Preferences General tab, then do a save-as to make a file to play with. Quit GnuCash. Make a couple of copies of the test file. Open each in a plain text editor--Notepad will do if you don't have something else that you prefer--and edit each as follows: From one, delete all of the invoices. From another, delete all but the first invoice. From the third, delete only the first invoice. Invoices are of the form <gnc:Entry>...</gnc:Entry>. Be sure that your deletions are balanced so that they begin and end with those tags. Now open each in turn: The ideal case would be that GnuCash loads the first and third and crashes on the second. The worst case would be that it crashes on all three, because that means that something else is (maybe also) the problem.
Sounds like a worthwhile experiment. Will give it a try and post results.
My file has the entries as </gnc:GncEntry>. Assume that's not a problem.
gnc:GncEntry vs. gnc:Entry is my mistake, sorry. I'm a little concerned about your just having an end tag in your question. Oh, and I forgot a step: There's also some counters, <gnc:count-data cd:type="gnc:GncEntry">1</gnc:count-data> <gnc:count-data cd:type="gnc:GncInvoice">1</gnc:count-data> <gnc:count-data cd:type="gnc:GncVendor">1</gnc:count-data> You need to adjust the counts after deleting the sections. There are also gnc:GncInvoice elements, so if clearing the gnc:GncEntry records doesn't fix it you can try deleting the gnc:GncInvoices as well. Note that GncEntries keep the guid of a GncInvoice, so you can delete a GncEntry without deleting the corresponding GncInvoice, but not the other way around.
You'll find this interesting. First I deleted all the GncEntry's. When I attempted to load the file in 3.0, it crashed. Then I deleted all of the GncInvoices. The file loaded successfully. I then created an invoice, saved the file and closed the program. Unfortunately, I was able to reopen the file now with one invoice. But, when I tried to view the invoice, the program crashed. Looks like invoicing, at least in my file, is a problem.
Created attachment 370617 [details] Trace File - Crash finding invoice
I uploaded the trace log file.
There's a nightly build at https://wiki.gnucash.org/builds/win32/maint/gnucash-3.0-2018-04-16-git-3.0-75-g87f94abc8+.setup.exe that includes a change to the date parser that might prevent the crash. Can you give it a try?
I'll try it and let you know.
Program crashed with message libfribidi-0.dll was not found. I uploaded a screen grab.
Created attachment 371008 [details] Error Message Missing dll Here is the screen capture of the error message.
Thanks.
I have just now created a new installer to fix the missing dll: https://wiki.gnucash.org/builds/win32/maint/gnucash-3.0-2018-04-17-git-3.0-75-g87f94abc8+.setup.exe Please test with that one and report back.
Created attachment 371109 [details] Gnucash v3 test failed I installed the test file you provided. No problem with installation. I created a new file, added a customer and invoice. When I attempted to "find" the invoice, gnucash crashed. I've attached a zip file with the log file and the test account file for you. Please let me know if you are able to diagnose the problem. I am happy to run further tests if needed.
The "Find" invoice crash looks like bug 795040 which I'm working on. I hope tomorrow's nightly build will fix it.
I should add that my 2.6.21 file with 100 invoices crashed on loading, the original problem. I'll wait to rerun when next build is available. Keeping fingers crossed for success. Also many thanks for your effort!
It wasn't completely clear from your comment which nightly you had run tyour 1000 invoice file test on. The most recent one is this: https://code.gnucash.org/builds/win32/maint/gnucash-3.0-2018-04-19-git-3.0-84-g451bbd53d+.setup.exe If you didn't try yet with that nightly, can you do so ? The fix I included there unfortunately did not solve the search issue from bug 795040, but it did solve a startup crash on a book with unposted invoices in my setup.
I'll give 2018-04-19 build a try. The build I used for my test was gnucash-3.0-2018-04-17-git-3.0-75-g87f94abc8+.setup.exe.
Created attachment 371180 [details] Crash loading with v3.0 build 4-19 I ran the 2018-04-19 build, program loaded but crashed attempting to load my 2.6.21 file. The file has 100 invoices and loads without problem in 2.6.21. I've attached the log file.
An update: I've had some trouble getting a build of gnucash on windows I could debug on. Now that I have one, I see several issues with how dates in invoices are handled which could indeed lead to a crash (In fact I can reproduce at least the search one). Do you have invoices open in the book that fails to load ? Or more to the point - did you have invoices open the first time you opened it with gnucash 3.0 ? If so, I want to ask you to do the following experiment: * Via a Windows explorer navigate to %APPDATA%\GnuCash * There will be a directory called books. Rename this to books-save * Start gnucash 3.0 => Does it still crash on startup (that is, when attempting to load your 2.6.21 file) ?
I don't have open invoices in my 2.6.21 file nor do I recall having had any open the first time I used 3.0. I believe all of my invoices were posted when I first used 3.0 I can do the experiment. Just to be clear what version of gnucash do you want me to use for this?
Harold, I meant open in the sense that they display in a tab or separate window when starting gnucash. Though I see your confusion with invoices being unposted. You can use the most recent nightly build for the experiment.
Created attachment 371406 [details] v3.0 error log after deleting book directory and data file. I installed and ran gnucash-3.0-2018-04-24-git-3.0-88-gc44316073+.setup version after deleting the Book directory. I was initially able to find the invoice without crashing the program. I then posted the invoice and created a new invoice without problem. I did not post the new invoice. I closed the program. When I reopened the program and file, no problem. However when I attempted to "find" the new invoice it crashed. The attached zip file contains the gnucash data file and the error log. Hope this helps with your diagnosis.
Thanks. I have just committed a number of fixes regarding invoice date handling which I hope should fix this bug. Can you test again with tomorrow's nightly build ?
I will test it with the Friday nightly build.
WE MAY HAVE SUCCESS! I installed gnucash-3.0-2018-04-27-git-3.0-94-g74fd6e046+.setup.exe. I was able to open and successfully find the one invoice in my small test file. I was also able to create a new invoice and find it after closing and reopening the file. I tested posting without problem as well. One item for you to test: when I first opened the small test file and tried to create an invoice, I was unable to do so until I added billing terms. When I closed and reopened the file everything worked just fine. Now for the big test. I was able to successfully open my 2.6.21 file!! I also successfully found invoices. Looks like your hard work has paid off. I will continue to use 2.6.21 until you release a v3 production version but all looks good so far.
Wonderful :) I have tried to reproduce the smaller issue you mention in comment 28 but apparently I can't - at least not on my Fedora system. I created a new file, selected Common and Business accounts. Then proceeded directly to Business->Vendor->New bill... There I had to select vendor to create a new vendor. Added minimal information. Proceeded to create the bill. That went fine. I could even post it. If you still see this after you switch to 3.1 feel free to open a new bug report with exact details of what you did. I realize you may never see it as you start from an existing book though. This issue will be fixed for 3.1, hopefully to be released soon.
*** Bug 795084 has been marked as a duplicate of this bug. ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=795031. Please update any external references or bookmarks.