JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.66k stars 2.59k forks source link

Cannot invoke "javafx.geometry.Point2D.distance(double, double)" because "this.dragStartLocation" is null #11869

Open ryan-carpenter opened 2 months ago

ryan-carpenter commented 2 months ago

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

openSUSE Tumbleweed with KDE Plasma 6.0.5

Checked with the latest development build (copy version output from About dialog)

Steps to reproduce the behaviour

  1. Copy a DOI from a PDF, where the copied string includes a line break and some extraneous characters to the left of the DOI
  2. Click "Import by ID" and paste the DOI + extraneous text into the input field.
  3. Attempt to select and delete the extraneous characters => Exception
  4. Repeat steps to check for reproducibility => No exception.
  5. Repeat steps again, this time clicking and selecting multiple times/location within the "Import by ID" input field => Exception
  6. Try a few more times testing different locations in the input and with different inputs. I got the exception a few times consecutively, then no exception with just the DOI as input but also no exception when I returned to the previous input. In other words, it isn't clear that the error is related to the input.
  7. Attempt to reproduce by dragging selected text within the "Import by ID" field => No exception

Form of the input data.

Journal 2005;19(2):e123–4. https://doi.org/10.1234/ABC.
0000000000000123

The line break is 0xa

Appendix

...

Log File ``` java.lang.NullPointerException: Cannot invoke "javafx.geometry.Point2D.distance(double, double)" because "this.dragStartLocation" is null at org.jabref.merged.module@6.0.6325/impl.org.controlsfx.skin.PopOverSkin.lambda$new$7(Unknown Source) at javafx.base@23/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source) at javafx.base@23/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source) at javafx.base@23/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source) at javafx.base@23/javafx.event.Event.fireEvent(Unknown Source) at javafx.graphics@23/javafx.scene.Scene$MouseHandler.process(Unknown Source) at javafx.graphics@23/javafx.scene.Scene.processMouseEvent(Unknown Source) at javafx.graphics@23/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source) at javafx.graphics@23/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at javafx.graphics@23/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics@23/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source) at javafx.graphics@23/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source) at javafx.graphics@23/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source) at javafx.graphics@23/com.sun.glass.ui.View.handleMouseEvent(Unknown Source) at javafx.graphics@23/com.sun.glass.ui.View.notifyMouse(Unknown Source) at javafx.graphics@23/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at javafx.graphics@23/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) ```
ryan-carpenter commented 2 months ago

An unresolved example of the same exception: https://github.com/mkpaz/atlantafx/issues/66 Documentation on javafx.geometry.Point2D.distance: https://openjfx.io/javadoc/11/javafx.graphics/javafx/geometry/Point2D.html#distance(javafx.geometry.Point2D) Object is not initialized?: https://stackoverflow.com/questions/19738407/point2d-returning-nan-nullpointer

xDido commented 2 months ago

is someone working on that issue ? I see 2 tasks done.

Siedlerchr commented 2 months ago

@xDido This issue needs refinement and verification first. And it's likely to be caused by external isssues. If you want to take another issue look through the good first issues https://github.com/orgs/JabRef/projects/5

ryan-carpenter commented 2 months ago

And it's likely to be caused by external isssues.

Note: This was in a Kwin Wayland session, if it matters.