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

Areaselector does not work with OpenJDK 11 #43

Closed
r00tat opened this issue Jul 3, 2021 · 4 comments · Fixed by #45
Closed

Areaselector does not work with OpenJDK 11 #43

r00tat opened this issue Jul 3, 2021 · 4 comments · Fixed by #45
Labels

Comments

@r00tat
Copy link
Contributor

r00tat commented Jul 3, 2021

It seems like there is an issue with OpenJDK 11 and possibly also earlier versions:

 [java] 2021-07-04 00:01:06.607 SEVERE: Handled by bug report queue: java.lang.IllegalAccessError: class boofcv.io.image.ConvertBufferedImage (in unnamed module @0x55d95bcf) cannot access class sun.awt.image.ByteInterleavedRaster (in module java.desktop) because module java.desktop does not export sun.awt.image to unnamed module @0x55d95bcf
        [java] java.lang.IllegalAccessError: class boofcv.io.image.ConvertBufferedImage (in unnamed module @0x55d95bcf) cannot access class sun.awt.image.ByteInterleavedRaster (in module java.desktop) because module java.desktop does not export sun.awt.image to unnamed module @0x55d95bcf2021-07-04 00:01:06,544 [AWT-EventQueue-0] INFO : mouse clicked java.awt.event.MouseEvent[MOUSE_CLICKED,(660,397),absolute(702,483),button=1,modifiers=Button1,clickCount=1] on org.openstreetmap.josm.gui.MapView[,0,0,1016x783,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=java.awt.Dimension[width=10,height=0],preferredSize=]
        [java] 	at boofcv.io.image.ConvertBufferedImage.convertFrom(ConvertBufferedImage.java:319)
        [java] 	at org.openstreetmap.josm.plugins.areaselector.ImageAnalyzer.detectCannyArea(ImageAnalyzer.java:691)
        [java] 2021-07-04 00:01:06.618 INFO: Update plugins - <html>An unexpected exception occurred that may have come from the 'areaselector' plugin.<br>According to the information within the plugin, the author is Paul Woelfel, Thomas Konrad.<br>Try updating to the newest version of this plugin before reporting a bug.</html>	at org.openstreetmap.josm.plugins.areaselector.ImageAnalyzer.getArea(ImageAnalyzer.java:152)
        [java] 	at org.openstreetmap.josm.plugins.areaselector.AreaSelectorAction.createArea(AreaSelectorAction.java:219)
        [java] 	at org.openstreetmap.josm.plugins.areaselector.AreaSelectorAction$1.run(AreaSelectorAction.java:172)
        [java] 	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
        [java] 	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        [java] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        [java] 	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        [java] 	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        [java] 	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        [java] 	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        [java] 	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        [java] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        [java] 	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        [java] 	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        [java] 	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        [java] 	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
@r00tat r00tat added the bug label Jul 3, 2021
@r00tat
Copy link
Contributor Author

r00tat commented Jul 3, 2021

There is a new boofcv version, which seems to fix the bug. Problem here: Visualization is not included any more.

<dependency>
  <groupId>org.boofcv</groupId>
  <artifactId>boofcv-core</artifactId>
  <version>0.37</version>
</dependency>

@NLthijs48
Copy link
Contributor

There is a workaround for this issue, adding --add-exports=java.desktop/sun.awt.image=ALL-UNNAMED to the java command that starts JOSM, just like the josm.jnlp web start file also does with a couple of other packages. I'm currently using this workaround and running JSOM with Java 16 with Areaselector succesfully.

This is definitely not user-friendly though, so indeed updating boofcv is the proper solution.

@le-jun
Copy link

le-jun commented Oct 30, 2021

Currently running openJDK 17 and I confirm the issue. Could someone elaborate on the mentioned workarounds so that I can make it work?

@tsmock
Copy link
Contributor

tsmock commented Nov 3, 2021

There is a new boofcv version, which seems to fix the bug. Problem here: Visualization is not included any more.

@r00tat Just a heads up: visualization -> swing.

EDIT: https://github.com/lessthanoptimal/BoofCV/blob/v0.39/change.txt#L835 for the hint. It appears that they later dropped the visualization prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants