Trying to Open File with 5.1 Saved with Master Provides Error

Thomas Baumgart thb at net-bembel.de
Sun Aug 2 16:33:29 BST 2020


On Sonntag, 2. August 2020 17:02:41 CEST Joel Madero wrote:

> I'll try to get this anonymized. I was able to build master again and
> the file opens and can be edited without an issue. 5.1 still crashes. I
> have tens of thousands of entries so a visual check would be near
> impossible.

Yes, that is impossible. What would I do in this scenario? Run the program
under debugger control and set a breakpoint to the line in question. While
checking for that, I find the following:

kmymoney/mymoney/mymoneytransaction.cpp line 53 does not deal with XML.

I found the line in kmymoney/plugins/xml/mymoneystoragexml.cpp line 532.
Set the breakpoint to that line and wait until it stops. Then check where it
comes from and which element triggers the problem. This might not be obvious.

One more thing: make sure to use the right library and plugin versions. If you
mix master and 5.1 in this respect, you may encounter erratic results. Why do I
mention that:

The error message is kept in kmymoney/mymoney/mymoneytransaction.cpp around line 53
in KMyMoney 4.8 and before. Don't confuse things and make sure to setup a clean
environment. You cannot mix KMyMoney 4.x and KMyMoney 5.x parts. One is based on Qt4
while the other works on Qt5.

Just my 0.02

Thomas

> On 8/2/20 2:50 AM, Thomas Baumgart wrote:
> > Joel,
> >
> > On Sonntag, 2. August 2020 11:11:39 CEST Thomas Baumgart wrote:
> >
> >> On Sonntag, 2. August 2020 01:09:22 CEST Joel Madero wrote:
> >>
> >>> Hi All,
> >>>
> >>> Due to investments being totally broken in master build I decided to go
> >>> back to 5.1 to update my account. I know about the general "do not use
> >>> master for production" but I do so knowing the risk in order to fully
> >>> provide QA for open source software.
> >>>
> >>> When I try to do anything with my saved kmymoney file in 5.1 (saved
> >>> using the master build) I get the following error:
> >>>
> >>> Uncaught error. Please report the details to the developers
> >>>
> >>> Node was not TRANSACTION in file
> >>> /build/kmymoney-8Tb1zm/kmymoney-5.0.1/kmymoney/mymoney/mymoneytransaction.cpp
> >>> line 53
> >> While loading the TRANSACTIONS, it reads a node that is not a TRANSACTION.
> >>
> >>> If this is a planned non-backward-compatibility bug I think that
> >>> KMyMoney devs really should put a massive warning on savings files using
> >>> the master build. If it's unintentional, I'm happy to help debug
> >>> provided instructions.
> >> No, this is not planned at all. 
> >>
> >> Debug instructions:
> >>
> >> Depending on the size of your file (number of transactions) you can take the
> >> visual approach by making the file human readable
> >> (see https://docs.kde.org/stable5/en/extragear-office/kmymoney/details.formats.html
> >> for possible formats - if you did not do anything special, it is gzip compressed).
> >> For this case, here are the commands
> >>
> >>   % zcat your-file.kmy > your-file.xml
> >>
> >> then use any editor to look at your-file.xml. Investigate the <TRANSACTIONS> sections
> >> which must contain a node that is not of type <TRANSACTION>.
> >>
> >> If you don't find anything like that, check the <SCHEDULES> section. A <SCHEDULED_TX>
> >> should also have an embedded <TRANSACTION>.
> >>
> >> In case you don't find anything, you can send me an anonymized version of your file
> >> via private e-mail. See https://docs.kde.org/stable5/en/extragear-office/kmymoney/details.formats.anonymous.html
> >> how to create such a file. You would have to create the file using the master version.
> >> Check that the file does not contain sensitive information before sending it out.
> >> Use gzip to compress it (resulting filename does not matter).
> >>
> >> Hope that helps.
> > I just tried to duplicate the problem with no success. Here's what I did using
> > today's master and 5.1 versions:
> >
> > a) start 5.1 and save my production data file
> > b) uninstall 5.1 and install master
> > c) load production file using master
> > d) save as a temp file with master
> > e) uninstall master and install 5.1
> > f) load temp file
> >
> > no problem. That does not mean, that there is no problem, but in general it should work.
> >
> > Testing can only prove the presence of bugs, not their absence.
> >  -- Edsger W. Dijkstra, 1969
> >
> 
> 

-- 

Regards

Thomas Baumgart

https://www.signal.org/       Signal, the better WhatsApp
-------------------------------------------------------------
Windows: It's not pretty. It's not ugly. But it's pretty ugly.
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 868 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20200802/6935c2e6/attachment.sig>


More information about the KMyMoney-devel mailing list