Bug 256323 - more than 2 synonyms corrupt the file
Summary: more than 2 synonyms corrupt the file
Status: RESOLVED FIXED
Alias: None
Product: parley
Classification: Applications
Component: general (show other bugs)
Version: 0.9.3
Platform: Debian stable Linux
: NOR major
Target Milestone: ---
Assignee: parley bug tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-07 19:09 UTC by timothy_truckle
Modified: 2014-01-07 07:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
minimum word list to reproduce the problem (6.30 KB, text/plain)
2010-11-07 19:09 UTC, timothy_truckle
Details

Note You need to log in before you can comment on or make changes to this bug.
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.