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

Deleting an entry causes NPE exception #3584

Closed
Siedlerchr opened this issue Dec 28, 2017 · 1 comment
Closed

Deleting an entry causes NPE exception #3584

Siedlerchr opened this issue Dec 28, 2017 · 1 comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs

Comments

@Siedlerchr
Copy link
Member

Delete an entry in the current master 64c774b

SEVERE: Exception thrown by subscriber method listen(org.jabref.model.database.event.EntryRemovedEvent) on subscriber org.jabref.gui.BasePanel$EntryRemovedListener@600cdad9 when dispatching event: org.jabref.model.database.event.EntryRemovedEvent@3850ee8f
java.lang.NullPointerException
	at org.jabref.gui.BasePanel$EntryRemovedListener.listen(BasePanel.java:2092)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:108)
	at com.google.common.eventbus.EventBus.post(EventBus.java:212)
	at org.jabref.model.database.BibDatabase.removeEntry(BibDatabase.java:252)
	at org.jabref.model.database.BibDatabase.removeEntry(BibDatabase.java:236)
	at org.jabref.gui.BasePanel.delete(BasePanel.java:803)
	at org.jabref.gui.BasePanel.lambda$7(BasePanel.java:369)
@Siedlerchr
Copy link
Member Author

@tobiasdiez Seems to be a followup error from your recent changes:

   BibEntry previewEntry = selectionListener.getPreview().getEntry();

getPreview returns null

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Dec 28, 2017
Siedlerchr added a commit that referenced this issue Jan 2, 2018
* upstream/master:
  Remove dependency to jgoodies-looks (#3458)
  Add simple gui test (#3399)
  Library properties: no change but.. (issue #3562) (#3579)
  Initialize previe before MainPanel to prevent NPEs on delete Fixes #3584
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
None yet
Development

No branches or pull requests

2 participants