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

External changes are not reported due to JavaFX threading issue #4242

Closed
tobiasdiez opened this issue Jul 30, 2018 · 2 comments
Closed

External changes are not reported due to JavaFX threading issue #4242

tobiasdiez opened this issue Jul 30, 2018 · 2 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs ui
Milestone

Comments

@tobiasdiez
Copy link
Member

tobiasdiez commented Jul 30, 2018

Modify the bib file externally and get the following error:

java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Not on FX application thread; currentThread = JabRef LowPriorityCachedThreadPool
  at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_181]
  at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_181]
  at org.jabref.JabRefExecutorService.executeInterruptableTaskAndWait(JabRefExecutorService.java:108) ~[classes/:?]
  at org.jabref.gui.collab.DatabaseChangeMonitor.fileUpdated(DatabaseChangeMonitor.java:80) ~[classes/:?]
  at java.lang.Iterable.forEach(Iterable.java:75) [?:1.8.0_181]
  at org.jabref.gui.util.DefaultFileUpdateMonitor.notifyAboutChange(DefaultFileUpdateMonitor.java:67) [classes/:?]
  at org.jabref.gui.util.DefaultFileUpdateMonitor.run(DefaultFileUpdateMonitor.java:55) [classes/:?]
  at org.jabref.JabRefExecutorService$NamedRunnable.run(JabRefExecutorService.java:162) [classes/:?]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
  at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Caused by: java.lang.IllegalStateException: Not on FX application thread; currentThread = JabRef LowPriorityCachedThreadPool
  at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:279) ~[jfxrt.jar:?]
  at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:423) ~[jfxrt.jar:?]
  at javafx.scene.web.WebEngine.checkThread(WebEngine.java:1243) ~[jfxrt.jar:?]
  at javafx.scene.web.WebEngine.<init>(WebEngine.java:879) ~[jfxrt.jar:?]
  at javafx.scene.web.WebEngine.<init>(WebEngine.java:868) ~[jfxrt.jar:?]
  at javafx.scene.web.WebView.<init>(WebView.java:273) ~[jfxrt.jar:?]
  at org.jabref.gui.PreviewPanel.<init>(PreviewPanel.java:83) ~[classes/:?]
  at org.jabref.gui.collab.EntryDeleteChangeViewModel.<init>(EntryDeleteChangeViewModel.java:47) ~[classes/:?]
  at org.jabref.gui.collab.ChangeScanner.createBibEntryDiff(ChangeScanner.java:171) ~[classes/:?]
  at org.jabref.gui.collab.ChangeScanner.lambda$run$7(ChangeScanner.java:140) ~[classes/:?]
  at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_181]
  at org.jabref.gui.collab.ChangeScanner.run(ChangeScanner.java:140) ~[classes/:?]
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
  at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
  ... 3 more

While the symptoms might be easy to fix, a bit more work should be invested to make EntryDeleteChangeViewModel free of JavaFX controls...

@tobiasdiez tobiasdiez added the bug Confirmed bugs or reports that are very likely to be bugs label Jul 30, 2018
@tobiasdiez tobiasdiez added this to the v5.0 milestone Jul 30, 2018
@Siedlerchr Siedlerchr added the ui label Aug 12, 2018
@Siedlerchr
Copy link
Member

Well, in fact it's related to the conversion of the ChangeScanner to javafx.

The thing is that these ChangeViewModels operate on a Swing TreeNode (DefaultMutuableTreeNode) as logic. First thing would be to extract logic and display of messages and the rendered preview panel.

@Siedlerchr
Copy link
Member

Fixed by #4693

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 ui
Projects
Archived in project
Development

No branches or pull requests

2 participants