Summary: | Crash during X11 shutdown using AMD fglrx driver | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | Xerxes Rånby <xerxes> |
Component: | x11 | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | --- | ||
Version: | 1 | ||
Hardware: | pc_x86_32 | ||
OS: | linux | ||
Type: | --- | SCM Refs: |
jogl 41c626d8a27981e694b3b728a9a2f2bc8def939d
jogl 2d32b056c7b1b6b3d071d79fb4c2d4e9113b59d5
|
Workaround: | --- |
Description
Xerxes Rånby
2013-06-21 14:36:35 CEST
Workaround: shutdown using fglrx looks to behave well after removing closePendingDisplayConnections(); from X11Util diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src index 2d9c42e..2c69cb8 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java @@ -212,7 +212,7 @@ public class X11Util implements ToolkitProperties { // dislike closing of X11 Display's (w/ ATI driver). if( isJVMShuttingDown ) { isInit = false; - closePendingDisplayConnections(); + //closePendingDisplayConnections(); openDisplayList.clear(); reusableDisplayList.clear(); pendingDisplayList.clear(); Excellent - I was almost disregarding the fglrx issue. Best thing, this leads to a proper JVM shutdown sequence and dependency. +++ Move GLDrawableFactory.shutdownHook -> NativeWindowFactory.shutdownHook, the latter handles customShutdownHooks for NativeWindow, JOGL and NEWT. Unifying our shutdown mechanism is required to provide a controlled shutdown sequence. NativeWindowFactory is chosen to be the new central entry point, since it is the lowest denominator (common module). - Move GLDrawableFactory.shutdownHook -> NativeWindowFactory.shutdownHook Reverse the shutdown dependency for clarity and availability to all modules, i.e. NEWT may not know about JOGL. Remove the 'gamma' shutdown hook, instead simply call GLDrawableFactoryImpl.resetDisplayGamma() before destroy. NativeWindowFactory.shutdownHook handles customShutdownHooks for NativeWindow, JOGL and NEWT - Modules can register their shutdown runnable at head or tail of list. - Allows controlled shutdown across all modules. NEWT registers one customShutdownHook @ NativeWindowFactory.shutdownHook head, allowing proper resource cleanup. 1 WindowImpl.shutdownAll(): - For all instances: - mark invalid (causes any user thread to disregard the window) 2 ScreenImpl.shutdownAll(): - Removed own shutdown-hook! - For all instances: - Reset ScreenMonitorState 3 DisplayImpl.shutdownAll(): - For all instances: - Remove EDT - closeNativeImpl Manually tested on X11 w/ NV and ATI Catalyst (fglrx) - DFLAGS="-Djogl.debug.GLDrawable -Dnativewindow.debug.X11Util -Dnativewindow.debug.NativeWindow -Dnewt.debug.Display -Dnewt.debug.Screen -Dnewt.debug.Window" - java $DFLAGS com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -time 2000 -sysExit testExit - valid arguments for sysExit: testExit, testError, displayExit, displayError |