I've been developing using Newt GLWindow in windowed mode, works fine. Just tried to flip it to fullscreen mode and get the error below.
I've tried to reproduce in a simple test case but so far the test cases work as expected. So I guess I'm doing something a bit more involved. Before I dig deeper in my initialization code, does anyone have an hint on what I might be doing wrong? EDIT: Forgot to say: Java7, jogamp 2.0-rc11 2013-03-04 01:46:15.096 java[31222:af0f] Apple AWT Internal Exception: *** Collection <__NSSetM: 0x7f8f54127e10> was mutated while being enumerated. 2013-03-04 01:46:15.098 java[31222:af0f] *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSSetM: 0x7f8f54127e10> was mutated while being enumerated.' *** First throw call stack: ( 0 CoreFoundation 0x00007fff90ebb0a6 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff915493f0 objc_exception_throw + 43 2 CoreFoundation 0x00007fff90f4ef98 __NSFastEnumerationMutationHandler + 232 3 CoreFoundation 0x00007fff90ed1154 __NSSetEnumerate + 964 4 CoreFoundation 0x00007fff90ed0d07 -[NSSet objectsWithOptions:passingTest:] + 167 5 AppKit 0x00007fff9265caf6 -[NSView(NSInternal) _uninstallRemovedTrackingAreas] + 95 6 AppKit 0x00007fff9264cd50 -[NSView _setWindow:] + 1133 7 AppKit 0x00007fff9265a390 -[NSView removeFromSuperview] + 439 8 AppKit 0x00007fff92787b2f -[NSView removeFromSuperviewWithoutNeedingDisplay] + 39 9 libnewt.jnilib 0x0000000163f92dd7 libnewt.jnilib + 7639 10 libnewt.jnilib 0x0000000163f961b2 Java_jogamp_newt_driver_macosx_WindowDriver_changeContentView0 + 674 11 ??? 0x000000010473bf90 0x0 + 4369661840 ) libc++abi.dylib: terminate called throwing an exception |
Administrator
|
Hi
Please test with the latest auto build (even though I'm not sure it contains a fix for your issue). It's strange that a NEWT GLWindow causes a crash in AWT. Can you reproduce your bug in a very rudimentary test case with a single GLWindow? Edit.: I'm sure fullscreen GLWindow works with Mac OS X 1.6.8.
Julien Gouesse | Personal blog | Website
|
Yes sir, I'll try the latest autobild and I'll try to pinpoint in a self contained test case. The more I've tested I realized that it only happens sometimes so a bit unreliable to reproduce.
For anyone else that stumbles on this thread, yes fullscreen works on Mac, don't worry This is some concurrency issue, I suspect my code does something on the wrong thread. |
Administrator
|
How do you mix NEWT and AWT or Swing in your application?
Julien Gouesse | Personal blog | Website
|
I don't. That's the funny thing. I use a GLWindow only + an Animator and then a GLEventListener. In the event listener init I compile my shaders and in the display method I do the "regular game loop" using final GL3 gl = drawable.getGL().getGL3(); to draw triangles. No GUI, no AWT events, using only glWindow.addKeyListener and mouseListener. I don't know, maybe I do not clean up correctly. What is the correct way to dispose of a GLWindow ? EDIT: forgot to say, still on RC11, will try the autobild later this evening. Here is a test case, it doesn't show the same error as the one above but I managed to core dump the JVM after I ran the test from eclipse a few times: public class FullscreenTest { /** * @param args */ public static void main(String[] args) { for (int n = 0; n < 10; n++) { final GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL3)); caps.setBackgroundOpaque(true); caps.setDoubleBuffered(true); caps.setDepthBits(16); final GLWindow glWindow = GLWindow.create(caps); glWindow.setSize(1024, 768); glWindow.setUndecorated(false); glWindow.setPointerVisible(true); glWindow.setFullscreen(true); glWindow.setVisible(true); glWindow.setDefaultCloseOperation(WindowClosingMode.DISPOSE_ON_CLOSE); GLCapabilitiesImmutable chosenGLCapabilities = glWindow.getChosenGLCapabilities(); final int windowWidth = glWindow.getWidth(); final int windowHeight = glWindow.getHeight(); System.out.println("Run: " + n + " Capabilities: " + chosenGLCapabilities + "Window size: " + windowWidth + ", " + windowHeight); glWindow.setVisible(false); } } } hs_err_pid34042.log |
Administrator
|
On 03/04/2013 04:59 PM, jmaasing [via jogamp] wrote:
> gouessej wrote > How do you mix NEWT and AWT or Swing in your application? > > I don't. That's the funny thing. I use a GLWindow only + an Animator and then > a GLEventListener. In the event listener init I compile my shaders and in the > display method I do the "regular game loop" using final GL3 gl = > drawable.getGL().getGL3(); to draw triangles. No GUI, no AWT events, using > only glWindow.addKeyListener and mouseListener. > > I don't know, maybe I do not clean up correctly. What is the correct way to > dispose of a GLWindow ? NEWT window and all it's resources (here GL stuff as well). > > Here is a test case, it doesn't show the same error as the one above but I > managed to core dump the JVM after I ran the test from eclipse a few times: > Thank you for your test case incl. the JVM 'dump'. Currently I test w/ JDK 1.7.0_15 on OSX, as we know, each release may fix some bugs on OSX, hence I try to stay close to the latest. Your test doesn't seem to be much different than our unit tests in 'TestScreenMode01NEWT', however you realize the window w/ setting fullscreen before visibility. I will earmark this use case and add a unit test for it, thank you! ~Sven > public class FullscreenTest { > > /** > * @param args > */ > public static void main(String[] args) { > for (int n = 0; n < 10; n++) { > final GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL3)); > caps.setBackgroundOpaque(true); > caps.setDoubleBuffered(true); > caps.setDepthBits(16); > final GLWindow glWindow = GLWindow.create(caps); > glWindow.setSize(1024, 768); > glWindow.setUndecorated(false); > glWindow.setPointerVisible(true); > glWindow.setFullscreen(true); > glWindow.setVisible(true); > glWindow.setDefaultCloseOperation(WindowClosingMode.DISPOSE_ON_CLOSE); > GLCapabilitiesImmutable chosenGLCapabilities = glWindow.getChosenGLCapabilities(); > final int windowWidth = glWindow.getWidth(); > final int windowHeight = glWindow.getHeight(); > System.out.println("Run: " + n + " Capabilities: " + chosenGLCapabilities + "Window size: " + windowWidth > + ", " + windowHeight); > glWindow.setVisible(false); > } > } > } > > > hs_err_pid34042.log <http://forum.jogamp.org/file/n4028480/hs_err_pid34042.log> signature.asc (911 bytes) Download Attachment |
I've added a glWindow.destroy() ; after the setVisible(false); in the test. Didn't make any difference :/ So I upgraded to 1.7.0_17. Different error reported but still the test case crash pretty often (not always). Run: 0 Capabilities: GLCaps[rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], on-scr[.]]Window size: 1920, 1200 java(35907,0x7fff789f7180) malloc: *** error for object 0x7fb16c89b310: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Next is to test with later builds than rc11, didn't have time to do it tonight. Cheers, JM |
Administrator
|
On 03/04/2013 11:01 PM, jmaasing [via jogamp] wrote:
> Sven Gothel wrote > > I don't know, maybe I do not clean up correctly. What is the correct way to > > dispose of a GLWindow ? > > Well, you should call glWindow.destroy() in the very end, i.e. disposing the > NEWT window and all it's resources (here GL stuff as well). > > Currently I test w/ JDK 1.7.0_15 on OSX, > as we know, each release may fix some bugs on OSX, > hence I try to stay close to the latest. > > I've added a glWindow.destroy() ; after the setVisible(false); in the test. > Didn't make any difference :/ to release all the resources .. shouldn't give you too many hopes. > So I upgraded to 1.7.0_17. Different error reported but still the test case > crash pretty often (not always). > > Run: 0 Capabilities: GLCaps[rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], on-scr[.]]Window size: 1920, 1200 > > java(35907,0x7fff789f7180) malloc: *** error for object 0x7fb16c89b310: pointer being freed was not allocated > *** set a breakpoint in malloc_error_break to debug > > Thank you. > Next is to test with later builds than rc11, didn't have time to do it tonight. You can, but don't hold your breath. I guess I will be able to reproduce your bug and fix it later on. In the meantime, you could make the GLWindow visible before enabling fullscreen and perform setFullscreen(true) after setVisible(true). At least this is working in our unit tests which I referred you to. However the outcome, I will add your case and it will be fixed. OSX is always our most beloved port (-> most problematic one). ~Sven > > Cheers, > JM signature.asc (911 bytes) Download Attachment |
Free forum by Nabble | Edit this page |