Skip to content

Database corruption due to incorrect adding and deleting subgroups in a group if their number exceeds 15 #2600

@ph0boss

Description

@ph0boss

JabRef version on 3.8.2

Steps to reproduce:

  1. Create an empty database
  2. Create a group (no need to add anything to it)
  3. Add 16 subgroups to this group. The first 15 subgroups are added without a problem. After adding the 16 subgroup you will notice a visual bug - an empty space above the 16 subgroup.
  4. Remove the 16th subgroup.
  5. The database is broken and jabref will not start, trying to open this database.
  6. Console output when starting jabref after the database became corrupt is below.
    Please, help me restore my database, I've been working on it for 4 months.

java -jar '/home/ph0boss/portablesoftlinux/Jabref/JabRef-3.8.2.jar'
13:43:22.015 [AWT-EventQueue-0] INFO net.sf.jabref.logic.importer.OpenDatabase - Opening: /home/ph0boss/Downloads/temp/arst.bib
13:43:22.104 [AWT-EventQueue-0] ERROR net.sf.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[AWT-EventQueue-0,6,main]
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_121]
at net.sf.jabref.logic.importer.util.GroupsParser.importGroups(GroupsParser.java:51) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.util.MetaDataParser.parse(MetaDataParser.java:63) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.util.MetaDataParser.parse(MetaDataParser.java:33) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(BibtexParser.java:218) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.fileformat.BibtexParser.parse(BibtexParser.java:150) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(BibtexImporter.java:70) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.Importer.importDatabase(Importer.java:65) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.fileformat.BibtexImporter.importDatabase(BibtexImporter.java:62) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.OpenDatabase.loadDatabase(OpenDatabase.java:64) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.importer.OpenDatabase.loadDatabase(OpenDatabase.java:43) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.JabRefGUI.openLastEditedDatabases(JabRefGUI.java:210) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.JabRefGUI.openWindow(JabRefGUI.java:94) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.JabRefGUI.(JabRefGUI.java:63) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.JabRefMain.lambda$start$1(JabRefMain.java:128) ~[JabRef-3.8.2.jar:?]
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) ~[?:1.8.0_121]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) ~[?:1.8.0_121]
at java.awt.EventQueue.access$500(EventQueue.java:97) ~[?:1.8.0_121]
at java.awt.EventQueue$3.run(EventQueue.java:709) ~[?:1.8.0_121]
at java.awt.EventQueue$3.run(EventQueue.java:703) ~[?:1.8.0_121]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) ~[?:1.8.0_121]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) ~[?:1.8.0_121]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_121]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_121]

Example of a broken database

% Encoding: UTF-8

@comment{jabref-meta: databaseType:bibtex;}

@comment{jabref-meta: groupstree:
0 AllEntriesGroup:;
1 ExplicitGroup:12;0;;
2 ExplicitGroup:1;0;;
2 ExplicitGroup:2;0;;
2 ExplicitGroup:3;0;;
2 ExplicitGroup:4;0;;
2 ExplicitGroup:5;0;;
2 ExplicitGroup:6;0;;
2 ExplicitGroup:7;0;;
2 ExplicitGroup:8;0;;
2 ExplicitGroup:9;0;;
2 ExplicitGroup:10;0;;
2 ExplicitGroup:11;0;;
2 ExplicitGroup:12;0;;
2 ExplicitGroup:13;0;;
2 ExplicitGroup:14;0;;
2 ExplicitGroup:15;0;;
0 ExplicitGroup:16;0;;
2 ExplicitGroup:17;0;;
}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions