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

Opening a PDF blocks JabRef (under Ubuntu/Linux) #5942

Closed
1 task done
ytzemih opened this issue Feb 13, 2020 · 17 comments · Fixed by #5945
Closed
1 task done

Opening a PDF blocks JabRef (under Ubuntu/Linux) #5942

ytzemih opened this issue Feb 13, 2020 · 17 comments · Fixed by #5945

Comments

@ytzemih
Copy link

ytzemih commented Feb 13, 2020

JabRef 5.0-beta.419--2020-02-12--3859620
Linux 5.4.19-050419-generic amd64
Java 13.0.2

Steps to reproduce the behavior:

  1. Click on the symbol to open a PDF linked to a bib entry (or use F4 or use the "Open menu" command from the context menu).
  2. The PDF viewer (in my case MasterPDFEditor is associated with application/pdf) opens.
  3. JabRef can only be used after the PDF viewer is closed again (in the screenshot JabRef is not properly rendered because the whole application is blocked).

jabref-3

I first thought this only happens in my i3/Gnome Flashback environment. But switching to plain Ubuntu 19.10 Gnome desktop, exactly the same behaviour can be observed.

This phenomenon didn't appear for me (with highly similar settings) in JabRef 4.x.

I am seeing this exception on the console after closing JabRef, though this might not result from having called an external program (I suppose):

Log File Exception in Application stop method ERROR FallbackExceptionHandler Uncaught exception occurred in Thread[main,5,main] java.lang.RuntimeException: Exception in Application stop method at org.jabref.merged.module/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source) at org.jabref.merged.module/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalAccessError: class kong.unirest.JsonObjectMapper (in module org.jabref.merged.module) cannot access class com.google.gson.Gson (in module com.google.gson) because module org.jabref.merged.module does not read module com.google.gson at org.jabref.merged.module/kong.unirest.JsonObjectMapper.(Unknown Source) at org.jabref.merged.module/kong.unirest.Config.(Unknown Source) at org.jabref.merged.module/kong.unirest.Unirest.(Unknown Source) at org.jabref/org.jabref.Globals.stopBackgroundTasks(Unknown Source) at org.jabref/org.jabref.JabRefMain.stop(Unknown Source) at org.jabref.merged.module/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$10(Unknown Source) at org.jabref.merged.module/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source) at org.jabref.merged.module/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.jabref.merged.module/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at org.jabref.merged.module/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at org.jabref.merged.module/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at org.jabref.merged.module/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source) ... 1 more
@Siedlerchr
Copy link
Member

@tobiasdiez You recently added this gson to the module info. Do we need to add it to the gradle file somehow?

@AEgit
Copy link

AEgit commented Feb 13, 2020

Might be a duplicate of (or connected to):
#5882

@ytzemih
Copy link
Author

ytzemih commented Feb 13, 2020

@AEgit, can be. However, in my case, I can work with the PDF and once I close the reader, JabRef continues to work perfectly. Also, in the meanwhile, CPU load is not going up. It merely looks like a blocking system call (external process call) to me, instead of a non-blocking call.

@Siedlerchr
Copy link
Member

Have you tried opening with another pdf editor as default?

@ytzemih
Copy link
Author

ytzemih commented Feb 13, 2020

Yep, just done that with 5 different applications that can open PDF (via changing the mime-type through the Nautilus file manager):

  1. It works (i.e. it open asynchronously) with Evince (default Ubuntu viewer) and with Firefox.
  2. It doesn't work (i.e. it opens blocking) with MasterPDFEditor, Zathura (another PDF viewer), and LibreOffice.

The three apps in 2 must have something in common in the way they are called via JabRef based on the mime-type settings.

@Siedlerchr
Copy link
Member

@ytzemih I tried a simple addition to the existing code, redirecting the process output. Could you please test this version here?
https://builds.jabref.org/pull/5945/merge/

@ytzemih
Copy link
Author

ytzemih commented Feb 13, 2020

@Siedlerchr, thx. Installed JabRef 5.0-pull-5945-merge.421--2020-02-13--6cddf64.
Unfortunately, nothing has changed. Actually, it got worse: Now, only Firefox works, but Zathura, LibreOffice, MasterPDFEditor, and Evince open in a blocking mode. Can there be an interference with Java 13.0.2 being part of JabRef (as by the credentials) and openjdk version "11.0.6" 2020-01-14 installed in my system?

@ytzemih
Copy link
Author

ytzemih commented Feb 14, 2020

Adding another screenshot to show that the problem also arises when using the context menu in the File field of the General tab to open the PDF.
jabref-3
In that case, my whole desktop environment is blocked. The only way to get out is Ctrl-Q to quit Evince. Maybe that helps further pinpointing the problem.

@Siedlerchr
Copy link
Member

Thanks for the hint. I will try to wrap this in a new Thread this evening

@Siedlerchr
Copy link
Member

Could you please try again with the new version? https://builds.jabref.org/pull/5945/merge/

@Siedlerchr
Copy link
Member

Siedlerchr commented Feb 14, 2020

The gson error should also be fixed in this branch + master

@AEgit
Copy link

AEgit commented Feb 14, 2020

JabRef 5.0-beta.421--2020-02-14--ec93ad3
Linux 5.3.0-28-generic amd64
Java 13.0.2

I am afraid, as far as I can tell, this issue persists (and this one persists as well: #5882).

@ytzemih
Copy link
Author

ytzemih commented Feb 15, 2020

JabRef 5.0-beta.421--2020-02-14--ec93ad3
Linux 5.4.19-050419-generic amd64
Java 13.0.2

Good news, gson error/exception is gone, no more Zombie jobs left.

Bad news: Can confirm @AEgit , opening still blocks for me.

@Siedlerchr
Copy link
Member

@ytzemih Could you please test again with the new version from today? https://builds.jabref.org/pull/5945/merge/

@ytzemih
Copy link
Author

ytzemih commented Feb 19, 2020

@Siedlerchr Done. I can't reproduce the error anymore. Open file is now non-blocking. Thanks for the fix.

@AEgit
Copy link

AEgit commented Feb 20, 2020

JabRef 5.0-beta.432--2020-02-19--c768697
Linux 5.3.0-40-generic amd64
Java 13.0.2

Cannot confirm for the current master version. Since I am now pretty confident that this issue is a duplicate of #5882, you can find my error report here:
#5882 (comment)

@ytzemih
Copy link
Author

ytzemih commented Feb 20, 2020

@AEgit I tested it only with
JabRef 5.0-pull-5945-merge.440--2020-02-19--fcaeef1
Linux 5.4.19-050419-generic amd64
Java 13.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants