Modify

Opened 7 weeks ago

Closed 2 weeks ago

Last modified 2 weeks ago

#19114 closed defect (irreproducible)

JavaFX crash (Mapillary dependency)

Reported by: anonymous Owned by: jpietri
Priority: normal Milestone:
Component: Plugin mapillary Version: latest
Keywords: javafx Cc: taylor.smock, Don-vip

Description

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-04-17 21:45:35 +0200 (Fri, 17 Apr 2020)
Revision:16330
Build-Date:2020-04-18 01:30:45
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (16330 de) Linux Ubuntu 20.04 LTS
Memory Usage: 297 MB / 6144 MB (180 MB allocated, but free)
Java version: 13.0.2+8-Ubuntu-2, Private Build, OpenJDK 64-Bit Server VM
Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1
fonts-noto: fonts-noto:-
VM arguments: [-Djosm.home=<josm.pref>]
Dataset consistency test: No problems found

Plugins:
+ Mapillary (1.5.21)
+ apache-commons (35362)
+ apache-http (35092)
+ javafx-unixoid (35375)
+ jna (35092)
+ utilsplugin2 (35405)

Last errors/warnings:
- W: Erweiterungen aktualisieren - Sie haben JOSM aktualisiert. Zur Vermeidung von Problemen sollten die Erweiterungen ebenfalls aktualisiert werden.  Erweiterungen jetzt aktualisieren?
- E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libfxplugins.so: libgstreamer-lite.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-54.so: libgstreamer-lite.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-ffmpeg-56.so: libgstreamer-lite.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-ffmpeg-58.so: libgstreamer-lite.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-ffmpeg-57.so: libgstreamer-lite.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-56.so: libavcodec.so.56: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.pref>/plugins/javafx/libavplugin-57.so: libavcodec.so.57: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: Handled by bug report queue: java.lang.NullPointerException


=== STACK TRACE ===
Thread: JavaFX Application Thread (179) of main
java.lang.NullPointerException
	at com.sun.javafx.text.PrismTextLayout.addTextRun(PrismTextLayout.java:770)
	at com.sun.javafx.text.GlyphLayout.breakRuns(GlyphLayout.java:322)
	at com.sun.javafx.text.PrismTextLayout.buildRuns(PrismTextLayout.java:785)
	at com.sun.javafx.text.PrismTextLayout.layout(PrismTextLayout.java:1036)
	at com.sun.javafx.text.PrismTextLayout.ensureLayout(PrismTextLayout.java:223)
	at com.sun.javafx.text.PrismTextLayout.getBounds(PrismTextLayout.java:246)
	at javafx.scene.text.Text.getLogicalBounds(Text.java:432)
	at javafx.scene.text.Text.getYRendering(Text.java:1101)
	at javafx.scene.text.Text$TextAttribute$11.computeValue(Text.java:1824)
	at javafx.scene.text.Text$TextAttribute$11.computeValue(Text.java:1816)
	at javafx.beans.binding.ObjectBinding.get(ObjectBinding.java:151)
	at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:49)
	at com.sun.javafx.binding.ExpressionHelper.addListener(ExpressionHelper.java:53)
	at javafx.beans.binding.ObjectBinding.addListener(ObjectBinding.java:71)
	at javafx.beans.property.ObjectPropertyBase.bind(ObjectPropertyBase.java:174)
	at javafx.scene.text.Text$TextAttribute.caretShapeProperty(Text.java:1832)
	at javafx.scene.text.Text.caretShapeProperty(Text.java:955)
	at javafx.scene.control.skin.TextFieldSkin.<init>(TextFieldSkin.java:251)
	at javafx.scene.control.TextField.createDefaultSkin(TextField.java:276)
	at javafx.scene.control.Control.doProcessCSS(Control.java:897)
	at javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
	at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
	at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
	at javafx.scene.Parent.doProcessCSS(Parent.java:1400)
	at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
	at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
	at com.sun.javafx.scene.control.ControlHelper.superProcessCSSImpl(ControlHelper.java:63)
	at com.sun.javafx.scene.control.ControlHelper.superProcessCSS(ControlHelper.java:55)
	at javafx.scene.control.Control.doProcessCSS(Control.java:900)
	at javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
	at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
	at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
	at javafx.scene.Parent.doProcessCSS(Parent.java:1400)
	at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
	at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
	at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
	at javafx.scene.Node.processCSS(Node.java:9542)
	at javafx.scene.Scene.doCSSPass(Scene.java:569)
	at javafx.scene.Scene.preferredSize(Scene.java:1781)
	at javafx.scene.Scene$2.preferredSize(Scene.java:393)
	at com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66)
	at javafx.stage.Window$12.invalidated(Window.java:1086)
	at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
	at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
	at javafx.stage.Window.setShowing(Window.java:1174)
	at javafx.stage.Window.show(Window.java:1189)
	at com.sun.javafx.stage.EmbeddedWindow.show(EmbeddedWindow.java:71)
	at javafx.embed.swing.JFXPanel.setSceneImpl(JFXPanel.java:326)
	at javafx.embed.swing.JFXPanel.setScene(JFXPanel.java:296)
	at org.openstreetmap.josm.plugins.javafx.gui.JavaFxWrapper.initFX(JavaFxWrapper.java:71)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:830)

Attachments (1)

19114.better_error_reporting.patch (1.3 KB) - added by taylor.smock 7 weeks ago.
JavaFX: Submit a FutureTask to Platform.runLater in order to perform a get on the FutureTask and get a usable stack trace

Download all attachments as: .zip

Change History (19)

comment:1 Changed 7 weeks ago by simon04

Cc: taylor.smock added
Component: CorePlugin mapillary
Keywords: javafx added
Owner: changed from team to jpietri

comment:2 Changed 7 weeks ago by taylor.smock

This is going to be fun to reproduce. :(

For Mapillary v1.5.21, the only instantiations of JavaFxWrapper specify DatePicker.class.

When I wrote the JavaFxWrapper class, I did catch various exceptions in the constructor, but I'm not seeing anything in the last errors/warnings that would indicate that DatePicker wasn't instantiated.

@anonymous: If you check this bug again, can you reliably reproduce? And if so, how?

comment:3 Changed 7 weeks ago by anonymous

I tried again, now I only get the "UnsatisfiedLinkError" errors, no "NullPointerException".

comment:4 Changed 7 weeks ago by highflyer74

Hello!

I am not the anonymous above, but can confirm the issue. OSM Data ist loading fine, thereafter error message "Eine unvorhergesehene Fehlersituation trat auf, die die Erweiterung "javafx-unixoid" ausgelöst haben könnte."

My data:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-04-06 02:17:07 +0200 (Mon, 06 Apr 2020)
Revision:16239
Build-Date:2020-04-06 00:18:43
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (16239 de) Linux Manjaro Linux
Memory Usage: 311 MB / 2048 MB (56 MB allocated, but free)
Java version: 13.0.2+8, N/A, OpenJDK 64-Bit Server VM
Screen: :0.0 3840x2160
Maximum Screen Size: 3840x2160
VM arguments: [--add-reads=java.base=ALL-UNNAMED,java.desktop, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,jdk.jsobject, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --patch-module=jdk.jsobject=/usr/share/icedtea-web/jsobject.jar, -Dicedtea-web.bin.name=javaws, -Dicedtea-web.bin.location=/usr/share/icedtea-web/bin/javaws]
Dataset consistency test: No problems found

Plugins:
+ Mapillary (1.5.21)
+ PolygonCutOut (v0.7)
+ apache-commons (35362)
+ apache-http (35092)
+ buildings_tools (35405)
+ gridify (1577091848)
+ imagery_offset_db (35405)
+ javafx-unixoid (35375)
+ jna (35092)
+ pt_assistant (2.1.10-79-gb14a159)
+ reverter (35409)
+ tageditor (35258)
+ terracer (35327)
+ turnlanes-tagging (283)
+ utilsplugin2 (35405)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/Healthcare&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Community_Centre&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Crafts&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1

Validator rules:
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/MissingWeekdays&zip=1

Last errors/warnings:
- E: java.lang.UnsatisfiedLinkError: <josm.userdata>/plugins/javafx/libavplugin-57.so: libavcodec.so.57: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.userdata>/plugins/javafx/libavplugin-56.so: libavcodec.so.56: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.userdata>/plugins/javafx/libavplugin-54.so: libavcodec.so.54: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.userdata>/plugins/javafx/libavplugin-ffmpeg-57.so: libavcodec.so.57: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: java.lang.UnsatisfiedLinkError: <josm.userdata>/plugins/javafx/libavplugin-ffmpeg-56.so: libavcodec-ffmpeg.so.56: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
- E: Handled by bug report queue: java.lang.NoClassDefFoundError: jdk/swing/interop/SwingInterOpUtils. Ursache: java.lang.ClassNotFoundException: jdk.swing.interop.SwingInterOpUtils
- E: Handled by bug report queue: java.lang.NoClassDefFoundError: jdk/swing/interop/SwingInterOpUtils
- E: Handled by bug report queue: java.lang.NoClassDefFoundError: jdk/swing/interop/SwingInterOpUtils
- E: Handled by bug report queue: java.lang.NoClassDefFoundError: jdk/swing/interop/SwingInterOpUtils
- E: Handled by bug report queue: java.lang.NoClassDefFoundError: jdk/swing/interop/SwingInterOpUtils


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: JavaFX Application Thread (93) of JOSM
java.lang.NoClassDefFoundError: jdk/swing/interop/SwingInterOpUtils
	at com.sun.javafx.embed.swing.newimpl.JFXPanelInteropN.postEvent(JFXPanelInteropN.java:36)
	at javafx.embed.swing.JFXPanel.invokeOnClientEDT(JFXPanel.java:930)
	at javafx.embed.swing.JFXPanel$HostContainer.setEmbeddedScene(JFXPanel.java:972)
	at com.sun.javafx.tk.quantum.EmbeddedScene.setStage(EmbeddedScene.java:122)
	at com.sun.javafx.tk.quantum.GlassStage.setScene(GlassStage.java:94)
	at com.sun.javafx.tk.quantum.EmbeddedStage.setScene(EmbeddedStage.java:62)
	at javafx.stage.Window$12.invalidated(Window.java:1085)
	at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
	at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
	at javafx.stage.Window.setShowing(Window.java:1174)
	at javafx.stage.Window.show(Window.java:1189)
	at com.sun.javafx.stage.EmbeddedWindow.show(EmbeddedWindow.java:71)
	at javafx.embed.swing.JFXPanel.setSceneImpl(JFXPanel.java:326)
	at javafx.embed.swing.JFXPanel.setScene(JFXPanel.java:296)
	at org.openstreetmap.josm.plugins.javafx.gui.JavaFxWrapper.initFX(JavaFxWrapper.java:71)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.ClassNotFoundException: jdk.swing.interop.SwingInterOpUtils
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
	at org.openstreetmap.josm.plugins.PluginClassLoader.loadClass(PluginClassLoader.java:73)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 22 more

comment:5 Changed 7 weeks ago by taylor.smock

@highflyer74: Your problem appears to be #19044, which is an IcedTea (open source WebStart) related bug. I'll see if I throw a workaround for that in Mapillary (I fixed a similar issue in #19106). The only issue with your issue is that the ClassNotFoundException occurs in a different thread, which complicates matters a bit.

@anonymous: I'm sorry to hear that you cannot reproduce the issue. The stack trace tells me where the problem is occurring, but the problem is occurring in the JavaFX java library (external to JOSM). The problem is probably somewhere in the Mapillary/JavaFx plugin code, but due to threading, the stacktrace is not terribly helpful. :(

Last edited 7 weeks ago by taylor.smock (previous) (diff)

comment:6 Changed 7 weeks ago by highflyer74

@taylor.smock: thanks for explanation and good luck!

comment:7 Changed 7 weeks ago by taylor.smock

Cc: Don-vip added

@Don-vip: I'm attaching a patch that will produce better error logs if something in the JavaFxWrapper errors out during JavaFx platform initialization.

Changed 7 weeks ago by taylor.smock

JavaFX: Submit a FutureTask to Platform.runLater in order to perform a get on the FutureTask and get a usable stack trace

comment:8 Changed 7 weeks ago by Klumbumbus

There are also Mapillary Plugin incompatibilities and Shortcut Warnings on jenkins which seems related.
https://josm.openstreetmap.de/jenkins/job/JOSM-Integration/4543/warnings3Result/
https://josm.openstreetmap.de/jenkins/job/JOSM-Integration/4543/warnings5Result/

comment:9 Changed 7 weeks ago by taylor.smock

@Klumbumbus: I'm not certain about the shortcut warning (Shortcut.registerShortcut(tr(ACTION_NAME), tr(TOOLTIP), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE) is the code in question). From what I understood, KeyEvent.CHAR_UNDEFINED and Shortcut.NONE were supposed to be used so that a shortcut could be defined, but that there was no default. Did I misread the documentation?

As far as (most) of those "plugin incompatibilities", it looks like most of them are a result of JavaFxWrapper.getNode calls for a datepicker. In a branch that I'm waiting on a review for, I made an interface for a date picker class, and then implemented that with two other classes. It looks like Jenkins is picking up the potential for an NPE from the getNode call (which should _always_ not be null -- I need to look into ensuring that it cannot be null, but due to try/catch, it doesn't look like I can "ensure" that the object is not null).

comment:10 Changed 2 weeks ago by taylor.smock

Resolution: irreproducible
Status: newclosed

Unfortunately, I haven't been able to reproduce the original issue. And the Jenkins issues have been resolved.

comment:12 Changed 2 weeks ago by taylor.smock

I thought I had fixed that. There is still one plugin incompatibility (1), but it was significantly decreased from 10 or something.

I'm going to try to change the shortcuts so that I am not using a variable from elsewhere in the code, and see if that fixes the issue.

(1) I think the incompatibility due to using an initializer that may throw an error.

comment:13 in reply to:  12 ; Changed 2 weeks ago by stoecker

I'm going to try to change the shortcuts so that I am not using a variable from elsewhere in the code, and see if that fixes the issue.

Yeah, that's nothing the parser does understand. It's limited. It understands constant variables in the same java file thought (out of necessity, because people starting using this too often :-)

If changing code is not possible, you can add description like here: trunk/src/org/openstreetmap/josm/actions/MoveAction.java. I.e. defining with /* SHORTCUT() */ and disabling with /* NO_SHORTCUT */.

You'll see errors much faster here: DevelopersGuide/ShortcutsList (at the end).

comment:14 in reply to:  13 ; Changed 2 weeks ago by taylor.smock

Replying to stoecker:

Yeah, that's nothing the parser does understand. It's limited. It understands constant variables in the same java file thought (out of necessity, because people starting using this too often :-)

Good to know. So I didn't have to replace my private static final VARIABLE declarations. :(

If changing code is not possible, you can add description like here: trunk/src/org/openstreetmap/josm/actions/MoveAction.java. I.e. defining with /* SHORTCUT() */ and disabling with /* NO_SHORTCUT */.

You'll see errors much faster here: DevelopersGuide/ShortcutsList (at the end).

I've seen it. I just don't like making commits to see if it fixes the shortcuts.
Is the parser in the source code somewhere?

comment:15 in reply to:  14 Changed 2 weeks ago by stoecker

Replying to taylor.smock:

You'll see errors much faster here: DevelopersGuide/ShortcutsList (at the end).

I've seen it. I just don't like making commits to see if it fixes the shortcuts.
Is the parser in the source code somewhere?

No. That's in the unreleased server code and actually that part is really ugly perl hacking with lots of exceptions and side-cases (which today probably would be better solved with code comments like above). I'm not sure if I want to show you this code :-)

The final check in most cases is this: /^Shortcut\.registerShortcut\( *"([^"]+)", *"([^"]+)" *, *KeyEvent\.(?:VK|CHAR)_([A-Z0-9_]+) *, *(Shortcut.[0-9a-zA-Z+_. ]+)\)/. That should match in your case, except the ACTION_NAME.

Replacement Strings are detecting this way (only in the same file and if stated before replacement):

if($line =~ /String ([a-zA-Z_]+) = ("[^"]+"(?:\+count)?);/)
elsif($line =~ /String ([a-zA-Z_]+) = I18n.marktr\(("[^"]+")\);/)

What's shown in the error message is already cleaned code, so it is easier to see which part is breaking the detection.

comment:16 Changed 2 weeks ago by stoecker

Hmm, your code looks ok on first view. I'll check the parser.

comment:17 Changed 2 weeks ago by stoecker

Improved parser (and let it link to GitHub now as well). But note: MapObjectLayerAction.java is missing the tr() for ACTION_NAME.

comment:18 Changed 2 weeks ago by taylor.smock

I noticed that when I was making changes to try and please the parser. I just haven't pushed/merged yet.

Thanks for the heads up.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain jpietri.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.