Bug 256323

Summary: more than 2 synonyms corrupt the file
Product: [Applications] parley Reporter: timothy_truckle
Component: generalAssignee: parley bug tracker <parley-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: amarvir.ammu.93, cordlandwehr, timothy_truckle
Priority: NOR    
Version: 0.9.3   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: minimum word list to reproduce the problem

Description timothy_truckle 2010-11-07 19:09:12 UTC
Created attachment 53227 [details]
minimum word list to reproduce the problem

Version:           0.9.3 (using KDE 4.4.2) 
OS:                Linux



Reproducible: Always

Steps to Reproduce:
1. open attached file synonym-bug.kvtml
2. select german word "Kiste"
3. select german word "Schachtel"
4. click on "Schachtel and Kiste are synonyms" in the synonyms panel
5. save in to a new file via "save as..." 
6. on the command line check the <synonym> part : tail -n 24 *.kvtml

Actual Results:  
synonyms part in file is corrupt: first <pair> entry has only one <entry> child:
 <synonym>
    <pair>
      <entry id="1">
        <translation id="1"/>
      </entry>
    </pair>
    <pair>
      <entry id="0">
        <translation id="1"/>
      </entry>
      <entry id="2">
        <translation id="1"/>
      </entry>
    </pair>
    <pair>
      <entry id="1">
        <translation id="1"/>
      </entry>
      <entry id="2">
        <translation id="1"/>
      </entry>
    </pair>
  </synonym>


Expected Results:  
 <synonym>
    <pair>
      <entry id="0">
        <translation id="1"/>
      </entry>
      <entry id="1">
        <translation id="1"/>
      </entry>
    </pair>
    <pair>
      <entry id="0">
        <translation id="1"/>
      </entry>
      <entry id="2">
        <translation id="1"/>
      </entry>
    </pair>
    <pair>
      <entry id="1">
        <translation id="1"/>
      </entry>
      <entry id="2">
        <translation id="1"/>
      </entry>
    </pair>
  </synonym>


Theres no way to save immediatly after adding synonym associations, therfor "save as" must be used to distinguish this bug from interfearece with other editig operations.
Comment 1 timothy_truckle 2010-11-07 19:25:22 UTC
Having a longer word list leads to accidental synonym accosiacions.

bye
Thomas
Comment 2 timothy_truckle 2010-11-07 20:26:41 UTC
The problem occures when saving the file to disk:
procedure:
1. correct the file with the expected result
2. run a test 
3. save the file.

again the file is inconsistent

bye
TT
Comment 3 Amarvir Singh 2014-01-06 22:13:10 UTC
I guess this bug is fixed. Tried the instructions in the original post and it did produced the expected result.
Comment 4 Andreas Cord-Landwehr 2014-01-07 07:20:09 UTC
Timothy, please reopen the bug if you can still reproduce it with a recent Parley.