Cannot open .eaf file anymore

Hello,

I have been working with ELAN for quite a while, and no problem so far. Just today after finishing working on a file, I exported it (as usual) to FLEx, no problem. When I wanted to open the .eaf file again, the window stayed blank. Restarting the computer didn’t help. The log file (see below) contains several errors, but I don’t know how to fix them because I can’t actually access the file.

Questions:
Is there any way to restore the file?
What can I do to make sure that this doesn’t happen again?
Is it worth working on the imported file in FLEx in the meantime or should I get it fixed first?

Thanks in advance!

Best,
Daniel

Log file:
Feb 14, 2019 6:30:05 PM mpi.eudico.client.annotator.prefs.PreferencesReader parse
INFO: Reading preferences: C:\Users\c3289737.elan_data\elan.pfsx
External updater thread started
Feb 14, 2019 6:30:06 PM mpi.eudico.client.annotator.prefs.PreferencesReader parse
WARNING: Preferences file does not exist: C:\Users\c3289737.elan_data\shortcuts.pfsx
Feb 14, 2019 6:30:06 PM mpi.eudico.client.annotator.commands.ShortcutsUtil readCurrentShortcuts
INFO: Could not load the keyboard shortcut preferences file. The file does not exist or is not valid.
Error: cvc-id.2: There are multiple occurrences of ID value ‘a31’.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 184
Column: 99
Error: cvc-attribute.3: The value ‘a31’ of attribute ‘ANNOTATION_ID’ on element ‘ALIGNABLE_ANNOTATION’ is not valid with respect to its type, ‘ID’.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 184
Column: 99
Error: cvc-identity-constraint.4.2.2: Duplicate key value [a31] declared for identity constraint “alignAnnotationIdKey” of element “ANNOTATION_DOCUMENT”.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 184
Column: 99
Error: cvc-id.2: There are multiple occurrences of ID value ‘a63’.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 316
Column: 99
Error: cvc-attribute.3: The value ‘a63’ of attribute ‘ANNOTATION_ID’ on element ‘ALIGNABLE_ANNOTATION’ is not valid with respect to its type, ‘ID’.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 316
Column: 99
Error: cvc-identity-constraint.4.2.2: Duplicate key value [a63] declared for identity constraint “alignAnnotationIdKey” of element “ANNOTATION_DOCUMENT”.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 316
Column: 99
Error: cvc-id.2: There are multiple occurrences of ID value ‘a95’.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 448
Column: 70
Error: cvc-attribute.3: The value ‘a95’ of attribute ‘ANNOTATION_ID’ on element ‘REF_ANNOTATION’ is not valid with respect to its type, ‘ID’.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 448
Column: 70
Error: cvc-identity-constraint.4.2.2: Duplicate key value [a95] declared for identity constraint “prevAnnoKey” of element “ANNOTATION_DOCUMENT”.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 448
Column: 70
Error: cvc-identity-constraint.4.2.2: Duplicate key value [a95] declared for identity constraint “refAnnotationIdKey” of element “ANNOTATION_DOCUMENT”.
System id: file:///C:/Users/c3289737/Documents/Wagiman/ELAN%20originals/1997-01-11-PHB2.eaf
Public id: null
Line: 448
Column: 70
(and then a lot of Javascript stuff)

I can’t explain how this could have happened, but it seems there are now several annotations in the file with the same ID (which shouldn’t the case).

This might be relatively easy to solve by editing the XML (EAF is an XML format) in a text editor (preferably an XML editor), although this can sometimes be tricky if there are dependent annotations.
If you don’t have a recent back up and are not too familiar with XML, you can send the file to me (han.sloetjes AT mpi.nl), then I can have a look.

Hi Han,

Thanks for your reply! Neither can I. I didn’t do anything different from other times. What’s weird is that the line says “There are multiple occurrences of ID value ‘a31’”, but when I search for the annotation IDs in the XML file, I can find the ID a31 only once. I don’t know where to start fixing this. I’ll send it to you and maybe you could post the solution here for other people who might experience the same.

Best,
Daniel

There were actually three duplicate annotation id’s (a31, a63 and a95). A validating XML editor (I used oXygen) will not fail to highlight the duplicates.
In this case the solution was to give them unique id’s (by continuing the numbering from the highest value) because the annotations had unique time references (so they were not complete copies of other annotations).
The cause of this error is not clear.