Re: Jogl 2 stops working on Mac after Java7 update 55
Posted by
gouessej on
May 13, 2014; 2:08pm
URL: https://forum.jogamp.org/Jogl-2-stops-working-on-Mac-after-Java7-update-55-tp4032286p4032331.html
Abhi wrote
Hi,
I used the workaround at com.jogamp.nativewindow.awt.JAWTWindow.attachSurfaceLayer(JAWTWindow.java:235). Find below the code.
----------------------------------------------------------------------------------------------------------------------
@Override
public final void attachSurfaceLayer(final long layerHandle) throws NativeWindowException {
if( !isOffscreenLayerSurfaceEnabled() ) {
throw new NativeWindowException("Not an offscreen layer surface");
}
if(DEBUG) {
System.err.println("JAWTWindow.attachSurfaceHandle: "+toHexString(layerHandle) + ", bounds "+bounds);
}
attachSurfaceLayerImpl(layerHandle);
offscreenSurfaceLayer = layerHandle;
// workaround of Java7u55 JOGL crash issue
if(AppContext.getAppContext() == null){
SunToolkit.createNewAppContext();
}
component.repaint();
}
------------------------------------------------------------------------------------------------------------------------
As it was throwing exception at component.repaint(), I just put that workaround before it.
Thanks.
Abhi wrote
I tried using the latest JOGL but it didn't work in my project. So I have to make chnages in JOGL2.0.2 that is used in our project.
I assume you won't backport all bug fixes and workaround from JOGL 2.1.5 to JOGL 2.0. Therefore, please indicate which dependencies don't work with JOGL 2.1.5 to give me a chance to fix that as soon as possible (if they are open source). If you go on using an obsolete version, you'll be bothered by some other bugs and you'll have to switch later. The more you wait the more you increase your "technical" debt and an unmaintained version of JOGL shouldn't be used in production.