Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JabRef 5.10 breaks CLI export #10380

Closed
2 tasks done
kingaa opened this issue Sep 14, 2023 · 6 comments · Fixed by #10383
Closed
2 tasks done

JabRef 5.10 breaks CLI export #10380

kingaa opened this issue Sep 14, 2023 · 6 comments · Fixed by #10383
Labels
bug Confirmed bugs or reports that are very likely to be bugs preferences

Comments

@kingaa
Copy link

kingaa commented Sep 14, 2023

JabRef version

5.10 (latest release)

Operating system

GNU / Linux

Details on version and operating system

Ubuntu 22.04.3 LTS, shell is GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

Calling jabref -n -i <bibfile>,bibtex -o <htmlfile>,tablerefsabsbib on the command line hangs indefinitely under linux.
By contrast, under version 5.9, it works perfectly.

The following is a transcript using JabRef 5.11 as downloaded from https://builds.jabref.org/main/JabRef-5.11-portable_linux.tar.gz on 2023-09-14, 14:00UTC. The behavior is the same as under JabRef 5.10.

kingaa@saure:~/logos/biblios$ jabref5.11 -n -i biblios.bib,bibtex -o biblios.html,tablerefsabsbib
Messages are not initialized before accessing key: Display help on command line options
2023-09-14 10:08:28 [main] org.jabref.logic.protectedterms.ProtectedTermsLoader.update()
WARN: New protected terms resource '/protectedterms/computer_science.terms' is available and enabled by default.
2023-09-14 10:08:28 [main] org.jabref.preferences.JabRefPreferences.getFetcherKeysFromKeyring()
WARN: JabRef could not open the key store
Importing: biblios.bib
2023-09-14 10:08:30 [main] org.jabref.logic.cleanup.FieldFormatterCleanups.getFormatterFromString()
INFO: Formatter identity not found.
Exporting: biblios.html
2023-09-14 10:08:30 [main] org.jabref.cli.Launcher.main()
ERROR: Unexpected exception: java.lang.NullPointerException: Cannot invoke "org.jabref.gui.maintable.ColumnPreferences.getColumnSortOrder()" because "this.mainTableColumnPreferences" is null
        at org.jabref@5.11.142/org.jabref.preferences.JabRefPreferences.getSelfContainedTableSaveOrder(Unknown Source)
        at org.jabref@5.11.142/org.jabref.preferences.JabRefPreferences.getSelfContainedExportConfiguration(Unknown Source)
        at org.jabref@5.11.142/org.jabref.preferences.JabRefPreferences.getCustomExportFormats(Unknown Source)
        at org.jabref@5.11.142/org.jabref.preferences.JabRefPreferences.getExportPreferences(Unknown Source)
        at org.jabref@5.11.142/org.jabref.logic.exporter.ExporterFactory.create(Unknown Source)
        at org.jabref@5.11.142/org.jabref.cli.ArgumentProcessor.exportFile(Unknown Source)
        at org.jabref@5.11.142/org.jabref.cli.ArgumentProcessor.processArguments(Unknown Source)
        at org.jabref@5.11.142/org.jabref.cli.ArgumentProcessor.<init>(Unknown Source)
        at org.jabref@5.11.142/org.jabref.cli.Launcher.main(Unknown Source)

The call does not return (i.e., it hangs).

Here is the behavior under JabRef 5.9:

jabref5.9 -n -i biblios.bib,bibtex -o biblios.html,tablerefsabsbib
Importing: biblios.bib
Exporting: biblios.html

The resulting HTML file is as expected.

In case it is important, the biblios.bib BibTeX file here has been opened and saved in JabRef 5.10.

Appendix

No response

@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs preferences labels Sep 14, 2023
@github-project-automation github-project-automation bot moved this to Normal priority in Prioritization Sep 14, 2023
@Siedlerchr
Copy link
Member

Refs #10294

@koppor
Copy link
Member

koppor commented Sep 14, 2023

A fix is available at https://builds.jabref.org/pull/10383/merge/. Please try out.

JabRef should not hang forever after the export. Here, it hang about 10 seconds, which is OKish for me. To shorten that time even more, a major refactoring of JabRef would be necessary.

@kingaa
Copy link
Author

kingaa commented Sep 15, 2023

Thanks very much for the fast response! With the fixed version, I see

kingaa@saure:~/logos/biblios$ time jabref5.11 -n -i biblios.bib,bibtex -o biblios.html,tablerefsabsbib
Messages are not initialized before accessing key: Display help on command line options
2023-09-15 08:59:11 [main] org.jabref.logic.protectedterms.ProtectedTermsLoader.update()
WARN: New protected terms resource '/protectedterms/computer_science.terms' is available and enabled by default.
2023-09-15 08:59:11 [main] org.jabref.preferences.JabRefPreferences.getFetcherKeysFromKeyring()
WARN: JabRef could not open the key store
Importing biblios.bib
2023-09-15 08:59:13 [main] org.jabref.logic.cleanup.FieldFormatterCleanups.getFormatterFromString()
INFO: Formatter identity not found.
Exporting biblios.html

real    1m7.698s
user    0m18.249s
sys     0m0.724s

So, yes, it completes, and the output looks good, though it takes 67 sec as compared to 8 sec for JabRef 5.9.

Just out of curiosity, I wonder what changes from 5.9 to this development version do you think might be responsible for such a slowdown?

@koppor
Copy link
Member

koppor commented Sep 15, 2023

Maybe, it's because the new JDK behaves differently. Would need to compile a test version using the "old" JDK19 or JDK20. However, this cannot be simply done with the current version as we rely on JDK21's features.

@kingaa kingaa closed this as completed Sep 15, 2023
@github-project-automation github-project-automation bot moved this from Normal priority to Done in Prioritization Sep 15, 2023
@koppor
Copy link
Member

koppor commented Sep 15, 2023

@kingaa I tried another "workaround" with current JDK. The build should be available in 30 Minutes. You can see it as soon as new comment is added below #10383 (comment). Maybe you can try, too then?

@kingaa
Copy link
Author

kingaa commented Sep 15, 2023

Yep, that did the trick. Timing is now comparable with that of 5.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs preferences
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants