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

Customize Keybinding View Does Not Open #2881

Closed
LinusDietz opened this issue Jun 2, 2017 · 3 comments
Closed

Customize Keybinding View Does Not Open #2881

LinusDietz opened this issue Jun 2, 2017 · 3 comments
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs ui

Comments

@LinusDietz
Copy link
Member

JabRef 4.0.0-dev, f5386b2
Linux 4.4.70-1-manjaro amd64
Java 1.8.0_121

Steps to reproduce:

  1. Start JabRef
  2. Click: Options -> Customize Keybinding
Log File
File: keybindingsdialog.fxml not found, attempting with camel case
17:02:03.192 [JavaFX Application Thread] ERROR org.jabref.gui.DefaultInjector - Cannot instantiate dependency: interface org.jabref.preferences.PreferencesService
java.lang.InstantiationException: org.jabref.preferences.PreferencesService
  at java.lang.Class.newInstance(Class.java:427) ~[?:1.8.0_121]
  at org.jabref.gui.DefaultInjector.createDependency(DefaultInjector.java:40) ~[main/:?]
  at com.airhacks.afterburner.injection.Injector.instantiateModelOrService(Injector.java:114) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.injectMembers(Injector.java:147) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.injectMembers(Injector.java:132) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.injectAndInitialize(Injector.java:125) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.registerExistingAndInject(Injector.java:105) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.instantiatePresenter(Injector.java:57) ~[afterburner.fx-1.7.0.jar:?]
  at org.jabref.gui.DefaultInjector.instantiatePresenter(DefaultInjector.java:55) ~[main/:?]
  at com.airhacks.afterburner.views.FXMLView.lambda$loadSynchronously$1(FXMLView.java:96) ~[afterburner.fx-1.7.0.jar:?]
  at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:929) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:971) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:744) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) ~[jfxrt.jar:?]
  at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:99) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.views.FXMLView.initializeFXMLLoader(FXMLView.java:125) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.views.FXMLView.getView(FXMLView.java:137) ~[afterburner.fx-1.7.0.jar:?]
  at org.jabref.gui.AbstractView.getView(AbstractView.java:22) ~[main/:?]
  at org.jabref.gui.keyboard.KeyBindingsDialogView.show(KeyBindingsDialogView.java:16) ~[main/:?]
  at org.jabref.gui.keyboard.KeyBindingAction.lambda$actionPerformed$0(KeyBindingAction.java:25) ~[main/:?]
  at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295) ~[jfxrt.jar:?]
  at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
  at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294) ~[jfxrt.jar:?]
  at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) ~[jfxrt.jar:?]
  at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) ~[jfxrt.jar:?]
  at com.sun.glass.ui.gtk.GtkApplication.lambda$null$5(GtkApplication.java:139) ~[jfxrt.jar:?]
  at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.NoSuchMethodException: org.jabref.preferences.PreferencesService.<init>()
  at java.lang.Class.getConstructor0(Class.java:3082) ~[?:1.8.0_121]
  at java.lang.Class.newInstance(Class.java:412) ~[?:1.8.0_121]
  ... 30 more
17:02:03.205 [JavaFX Application Thread] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[JavaFX Application Thread,5,main]
java.lang.IllegalStateException: Cannot load org.jabref.gui.keyboard.keybindingsdialog
  at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:101) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.views.FXMLView.initializeFXMLLoader(FXMLView.java:125) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.views.FXMLView.getView(FXMLView.java:137) ~[afterburner.fx-1.7.0.jar:?]
  at org.jabref.gui.AbstractView.getView(AbstractView.java:22) ~[main/:?]
  at org.jabref.gui.keyboard.KeyBindingsDialogView.show(KeyBindingsDialogView.java:16) ~[main/:?]
  at org.jabref.gui.keyboard.KeyBindingAction.lambda$actionPerformed$0(KeyBindingAction.java:25) ~[main/:?]
  at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295) ~[jfxrt.jar:?]
  at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
  at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294) ~[jfxrt.jar:?]
  at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) ~[jfxrt.jar:?]
  at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) ~[jfxrt.jar:?]
  at com.sun.glass.ui.gtk.GtkApplication.lambda$null$5(GtkApplication.java:139) ~[jfxrt.jar:?]
  at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: javafx.fxml.LoadException: 
/home/ldietz/git/jabref/build/resources/main/org/jabref/gui/keyboard/KeyBindingsDialog.fxml:11

  at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) ~[jfxrt.jar:?]
  at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:99) ~[afterburner.fx-1.7.0.jar:?]
  ... 12 more
Caused by: java.lang.NullPointerException
  at com.airhacks.afterburner.injection.Injector.injectMembers(Injector.java:131) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.injectAndInitialize(Injector.java:125) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.instantiateModelOrService(Injector.java:114) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.injectMembers(Injector.java:147) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.injectMembers(Injector.java:132) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.injectAndInitialize(Injector.java:125) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.registerExistingAndInject(Injector.java:105) ~[afterburner.fx-1.7.0.jar:?]
  at com.airhacks.afterburner.injection.Injector.instantiatePresenter(Injector.java:57) ~[afterburner.fx-1.7.0.jar:?]
  at org.jabref.gui.DefaultInjector.instantiatePresenter(DefaultInjector.java:55) ~[main/:?]
  at com.airhacks.afterburner.views.FXMLView.lambda$loadSynchronously$1(FXMLView.java:96) ~[afterburner.fx-1.7.0.jar:?]
  at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:929) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:971) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:744) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) ~[jfxrt.jar:?]
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) ~[jfxrt.jar:?]
  at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:99) ~[afterburner.fx-1.7.0.jar:?]
  ... 12 more
@LinusDietz LinusDietz added bug Confirmed bugs or reports that are very likely to be bugs ui labels Jun 2, 2017
@LinusDietz LinusDietz self-assigned this Jun 2, 2017
@LinusDietz
Copy link
Member Author

LinusDietz commented Jun 2, 2017

bisected, fails the first time in a9e2066

quite interesting, the problem seems to be the merge commit itself, the other commits are fine.

@tobiasdiez, can you check back, if you can spot the error in the three-way merge between
472ca3c (base commit of branch, good)
51ce1ec (last commit of branch, good)
cbd6844 (last commit of master before merge, good)
resulting in
a9e2066 (master after merge, bad)

I have tried, but did not spot the problem :/

@LinusDietz LinusDietz assigned tobiasdiez and unassigned LinusDietz Jun 2, 2017
@Siedlerchr
Copy link
Member

Ah I found the bug!, it was just one line in the DefaultInjector:


 } else if (clazz == JabRefPreferences.class) {
            return Globals.prefs;
    } else {
            try {
                return clazz.newInstance();

Here the PreferencesService.class had to be used, because as the if did not match anything, the else part executed and tried to instantiate an interface (which is of course not possible)

@lenhard
Copy link
Member

lenhard commented Jun 4, 2017

Fixed by #2882

@lenhard lenhard closed this as completed Jun 4, 2017
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
None yet
Development

No branches or pull requests

4 participants