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

Uncaught exception when opening file that no longer exists from the "Recent libraries" list #5334

Closed
sauliusg opened this issue Sep 20, 2019 · 4 comments · Fixed by #5338
Closed
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs
Projects

Comments

@sauliusg
Copy link
Contributor

sauliusg commented Sep 20, 2019

JabRef version 5.0-dev (commit db96f88 master) on Ubuntu-16.04 x86_64

[x ] I have tested the latest development version from * master db96f88 Fix problem with search and switching between libraries (#5326) from https://github.com/JabRef/jabref.git and the problem persists

java.lang.NullPointerException is raised (thrown) when a file is selected for opening from the "Recent libraries" list, and this file no longer exists.

Note: Options|Preferences|File|Open last edited libraries at startup is unchecked in my configuration.

Steps to reproduce the behavior:

  1. Start the JabRef: build/image/bin/JabRefMain &
  2. Navigate through "File|Open library" and open any library, say "test1.bib"
  3. Exit JabRef
  4. Rename or remove the library, e.g. mv test1.bib test2.bib
  5. Start the JabRef again: : build/image/bin/JabRefMain &
  6. Navigate to "File|Recent libraries". Find the removed file, "test1.bib", and click its name.
    An unhandled Java exception is reported by the GUI:
    Screenshot from 2019-09-20 14-53-30
@Siedlerchr Siedlerchr added this to Needs triage in Bugs via automation Sep 20, 2019
@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Sep 20, 2019
@Siedlerchr Siedlerchr self-assigned this Sep 20, 2019
@AEgit
Copy link

AEgit commented Sep 21, 2019

JabRef 5.0-dev
Linux 5.0.0-29-generic amd64
Java 11.0.4

Can confirm for the current dev version. The exception stacktrace is:

java.lang.NullPointerException at org.jabref/org.jabref.gui.menus.FileHistoryMenu.openFile(Unknown Source) at org.jabref/org.jabref.gui.menus.FileHistoryMenu.lambda$addItem$0(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at org.jabref.merged.module/javafx.event.Event.fireEvent(Unknown Source) at org.jabref.merged.module/javafx.scene.control.MenuItem.fire(Unknown Source) at org.jabref.merged.module/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source) at org.jabref.merged.module/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at org.jabref.merged.module/javafx.event.Event.fireEvent(Unknown Source) at org.jabref.merged.module/javafx.scene.Scene$MouseHandler.process(Unknown Source) at org.jabref.merged.module/javafx.scene.Scene$MouseHandler.access$1200(Unknown Source) at org.jabref.merged.module/javafx.scene.Scene.processMouseEvent(Unknown Source) at org.jabref.merged.module/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source) at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Native Method) at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source) at org.jabref.merged.module/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source) at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source) at org.jabref.merged.module/com.sun.glass.ui.View.handleMouseEvent(Unknown Source) at org.jabref.merged.module/com.sun.glass.ui.View.notifyMouse(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) at java.base/java.lang.Thread.run(Unknown Source)

Bugs automation moved this from Needs triage to Closed Sep 21, 2019
@tobiasdiez
Copy link
Member

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

@AEgit
Copy link

AEgit commented Sep 21, 2019

JabRef 5.0-dev
Linux 5.0.0-29-generic amd64
Java 11.0.4

I can confirm that this issue has been fixed in the current dev snap version. Cheers!

@sauliusg
Copy link
Contributor Author

The issue is solved also in my installation, confirmed by starting the application as ./build/image/bin/JabRefMain &

Thanks for the instant fix!

koppor pushed a commit that referenced this issue Mar 29, 2021
e1acabe Upload Styles (#5351)
d9cbf08 Update and rename journal-of-eta-maritime-science.csl to dependent/journal-of-eta-maritime-science.csl (#5353)
988ecca Update clinical-and-translational-immunology.csl (#5348)
1691078 Update molecular-plant-pathology.csl (#5349)
932a5bf Create neurospine.csl (#5334)
d663ffc Update sylwan.csl (#5341)
b7be05d Update pakistan-journal-of-agricultural-sciences.csl (#5343)
d742832 Please rename to Tijdschrift-voor-geneeskunde-en-gezondheidszorg (#5344)
6c6be4d Update et-al settings for journal-of-the-american-society-of-nephrology.csl (#5333)
0263204 Correct citation format of numeric AOSIS styles (#5335)
e4cd348 Create the-horticulture-journal.csl (#5327)
5804a6f Add AOSIS dependents (#5332)
2b4510b Create natura-croatia.csl (#5328)
03c6789 Create groundwater.csl (#5329)
e08fa09 Create hystrix-the-italian-journal-of-mammalogy.csl (#5330)
1d730aa update page-range-format for Anglia (#5331)
9bb8724 Sort American Physiological Society citation style according to updated author instructions (#5305)
a8b53ca Create african-online-scientific-information-systems-vancouver.csl (#5326)
c7d8f90 Update yozgat-bozok-universitesi-fen-bilimleri-enstitusu.csl (#5319)
87dc0eb Update and rename tijdschrift-voor-geneeskunde.csl to tijdschrift-voo… (#5325)
89e07b0 Create university-of-gothenburg-apa7-swedish-legislations (#5316)
4582cb6 Create chinese-law-journals.csl (#5314)
6412083 Create stellenbosch-law-review.csl (#5322)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: e1acabe
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
Projects
Archived in project
Bugs
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants