portfolio icon indicating copy to clipboard operation
portfolio copied to clipboard

Invalid XML Format after saving with 0.51.2 with Mac OSX 11.2.3

Open do3meli opened this issue 3 years ago • 4 comments

Describe the bug After Closing and re opening a Portfolio Performance .xml File i get a corrupt xml file. The following error is shown:

Screenshot 2021-03-17 at 16 34 03

having a closer look at the xml it really seems to be not in a good shape somehow. see lines around 12268 in the xml:

        <price t="2012-05-21" v="119045000000"/>
        <price t="2012-05-22" v="119388000000"/>
        <price t="2012-05-23" v="119285000000"/>
        <price t="2012-05-24" v="119488000000"/>
        <price t="2012-05-25" v="119621000000"/>
        <price t="2012-05-29" v="120276000000"/>
        <price t="2012-05-30" v="120039000000"/>
        <price t="2012-0   <price t="2019-08-02" v="149300000000"/>
        <price t="2019-08-05" v="147404000000"/>
        <price t="2019-08-06" v="147577000000"/>
        <price t="2019-08-07" v="147565000000"/>
        <price t="2019-08-08" v="148773000000"/>
        <price t="2019-08-09" v="148507000000"/>
        <price t="2019-08-12" v="148016000000"/>
        <price t="2019-08-13" v="148394000000"/>
        <price t="2019-08-14" v="147099000000"/>
        <price t="2019-08-16" v="147989000000"/>
     />
        <price t="2012-05-02" v="122518000000"/>
        <price t="2012-05-03" v="122228000000"/>
        <price t="2012-05-04" v="121559000000"/>
        <price t="2012-05-07" v="121568000000"/>
        <price t="2012-05-08" v="121206000000"/>

To Reproduce Steps to reproduce the behavior:

  1. Save File
  2. Open File again

Expected behavior It should never happen that invalid xml is written. The saved file should be opened again without any errors.

Desktop

  • OS: Mac OSX 11.2.3
  • Version 0.51.2

do3meli avatar Mar 17 '21 15:03 do3meli

You're right, this should not happened but the rout caus is still unclear. So this could happen in rare randomly cases. Only chance to recover is to use those backup files which are created in the same folder where the target file is stored.

ghost avatar Mar 17 '21 17:03 ghost

Seems like a chunk of the file got lost somehow.

chirlu avatar Mar 17 '21 17:03 chirlu

i have done some further testing and i was able to constantly reproduce this while the file was sitting on an smb share. whenever opened from local disk i was not able to reproduce it at all. It might also has something todo with the way changes got written after the quotes updater ran. for example: i have another portfolio performance file sitting in the same smb folder that does not auto update quotes. this file can be opened, saved and closed without any issue.

do3meli avatar Mar 18 '21 20:03 do3meli

When i'm connected through VPN onto my NAS at home, the save operation lasts about 2-10minutes. I dont know why but this is reproduceable everytime when i'm connected through vpn no matter how fast my internet connection is. The portfolio-file on my side is about 4.2Mbyte large. When i copy another file (with similar size) through a normal file-copy-operation in explorer, it is way faster. Once the copy operation failed because i disconnected too early and i had a similar broken xml file on my nas -> i had to recover the backup file.

maybe there is another, faster way to save the file over poor network connections?

seehma avatar Aug 03 '22 10:08 seehma