duderstadt-lab / mars-fx

BSD 2-Clause "Simplified" License
3 stars 1 forks source link

Sporadic NullPointerException from prism #40

Open karlduderstadt opened 3 years ago

karlduderstadt commented 3 years ago

Prism is used for rendering the markdown comments. This NullPointerException seems to occur during rendering but doesn't really cause any problems for users. Just pops up occasionally. Also, it doesn't occur when in the markdown comments panel, which is the big puzzle about how it occurs.

javafx webview error

karlduderstadt commented 3 years ago

This appears to be a bug in javafx that was reported here https://bugs.openjdk.java.net/browse/JDK-8090178

Seems the solution is to try and figure out which Canvas is being added with a width of more than 8192 which appears to tigger the bug. Will test the minimal code provided to see if I can reproduce.

karlduderstadt commented 3 years ago

Here is a stack overflow comment about it https://stackoverflow.com/questions/53908235/how-to-catch-this-javafx-nullpointerexception-that-occurs-once-a-canvas-gets-too

karlduderstadt commented 3 years ago

still happening.

Screenshot 2021-11-06 at 10 48 12

..

karlduderstadt commented 2 years ago

Maybe this issue was related to using JFXPanel in a JFrame. In https://github.com/duderstadt-lab/mars-fx/commit/cabffc4ad079cecf317c98cb6fad249b44a2d59b and several others we switched to using a Stage and a Frame wrapper for interactions with ImageJ. Let's wait and see if this might have resolved the problem...