Bug 1001 - Simple Newt+GL2ES2 App on MacOS 10.9.2 does not respond using jogl-all-noawt.jar (works w/ jogl-all.jar)
Summary: Simple Newt+GL2ES2 App on MacOS 10.9.2 does not respond using jogl-all-noawt....
Status: RESOLVED WORKSFORME
Alias: None
Product: Jogl
Classification: JogAmp
Component: macosx (show other bugs)
Version: 2
Hardware: All macosx
: --- normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2014-03-23 08:38 CET by clubycoder
Modified: 2014-07-31 02:47 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Attachments
My simple Newt+GL2 test (2.15 KB, application/octet-stream)
2014-03-23 08:38 CET, clubycoder
Details
Output of my simple Newt+GL2 test (24 bytes, text/plain)
2014-03-23 08:39 CET, clubycoder
Details
RedSquare Newt+GL2ES2 test with shader version compile fix (13.35 KB, application/octet-stream)
2014-03-23 08:40 CET, clubycoder
Details
Output of RedSquare Newt+GL2ES2 test with shader version fix (952 bytes, text/plain)
2014-03-23 08:40 CET, clubycoder
Details
test.log (5.07 KB, text/plain)
2014-03-23 08:41 CET, clubycoder
Details
ZIPed test_dbg.log (137.75 KB, application/zip)
2014-03-23 08:43 CET, clubycoder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description clubycoder 2014-03-23 08:38:29 CET
Created attachment 607 [details]
My simple Newt+GL2 test

With my simple Newt+GL2 test (Foo.java) I'm getting a busy spinner and unresponsive window on MacOS 10.9.2.  Attached in my test Foo.java that I'm compiling with:

javac -cp ".:frameworks/jogamp-all-platforms/jar/gluegen-rt.jar:frameworks/jogamp-all-platforms/jar/jogl-all-noawt.jar" Foo.java

and and Foo.log that is the output of:

java -cp ".:frameworks/jogamp-all-platforms/jar/gluegen-rt.jar:frameworks/jogamp-all-platforms/jar/jogl-all-noawt.jar" -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all Foo | tee Foo.log

I'm also seeing the same thing with the Newt+GL2ES2 RedSquare.java demo after a made a couple minor changes to get shader compilation to work:

$ diff -u RedSquare.java.orig RedSquare.java
--- RedSquare.java.orig	2014-03-23 01:28:21.000000000 -0600
+++ RedSquare.java	2014-03-23 01:10:48.000000000 -0600
@@ -164,9 +164,11 @@
     private void initShader(GL2ES2 gl) {
         // Create & Compile the shader objects
         ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RedSquare.class,
-                                            "shader", "shader/bin", "redsquare", false);
+                                            "shader", "shader/bin", "redsquare", true);
+	rsVp.addGLSLVersion(gl);
         ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RedSquare.class,
-                                            "shader", "shader/bin", "redsquare", false);
+                                            "shader", "shader/bin", "redsquare", true);
+	rsFp.addGLSLVersion(gl);
 
         // Create & Link the shader program
         ShaderProgram sp = new ShaderProgram();

Attached is my updated RedSquare.java that I'm compiling with:

javac -cp ".:frameworks/jogamp-all-platforms/jar/gluegen-rt.jar:frameworks/jogamp-all-platforms/jar/jogl-all-noawt.jar" RedSquare.java

and RedSquare.log that is the output of:

java -cp ".:frameworks/jogamp-all-platforms/jar/gluegen-rt.jar:frameworks/jogamp-all-platforms/jar/jogl-all-noawt.jar" -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all demos.es2.RedSquare | tee RedSquare.log

A little more about my environment:

Java build 1.7.0_51-b13

jogamp-all-platforms/jogl.artifact.properties:
gluegen.build.version=2.1.5
gluegen.build.number=779
gluegen.build.id=2014-03-10_14-59-56
gluegen.build.branch=origin/master
gluegen.build.commit=6476552f46c7bc7b151d53a9e8d2332deda10fcb
jogl.build.version=2.1.5
jogl.build.number=1240
jogl.build.id=2014-03-11_04-15-42
jogl.build.branch=origin/master
jogl.build.commit=ba0dc6462a88ee7512a087deaaca760239915548

Attached are also the required test.log and test_dbg.log.
Comment 1 clubycoder 2014-03-23 08:39:11 CET
Created attachment 608 [details]
Output of my simple Newt+GL2 test
Comment 2 clubycoder 2014-03-23 08:40:09 CET
Created attachment 609 [details]
RedSquare Newt+GL2ES2 test with shader version compile fix
Comment 3 clubycoder 2014-03-23 08:40:53 CET
Created attachment 610 [details]
Output of RedSquare Newt+GL2ES2 test with shader version fix
Comment 4 clubycoder 2014-03-23 08:41:30 CET
Created attachment 611 [details]
test.log
Comment 5 clubycoder 2014-03-23 08:43:12 CET
Created attachment 612 [details]
ZIPed test_dbg.log
Comment 6 clubycoder 2014-03-23 19:03:24 CET
More from this forum thread:

http://forum.jogamp.org/MacOS-10-9-2-Newt-test-giving-me-busy-spinner-and-unresponsive-window-td4032038.html

jmaasing and I have both tried running against jogl-all.jar instead of jogl-all-noawt.jar and the issue goes away.  The question now is why and what are the differences between running against jogl-all.jar vs jogl-all-noawt.jar?
Comment 7 clubycoder 2014-03-24 19:37:26 CET
Just to clarify what I'm seeing now, if I take my Foo test and run with:

java -cp ".:frameworks/jogamp-all-platforms/jar/gluegen-rt.jar:frameworks/jogamp-all-platforms/jar/jogl-all-noawt.jar" -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all Foo

I will get a busy spinner and unresponsive window.  If I simply change to use jogl-all.jar:

java -cp ".:frameworks/jogamp-all-platforms/jar/gluegen-rt.jar:frameworks/jogamp-all-platforms/jar/jogl-all.jar" -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all Foo

my Foo test works fine.  Theoretical since I'm not using AWT it shouldn't make any difference and jogl-all-newt.jar should work just fine.

So the question is what is my test doing differently when ran against jogl-all.jar vs jogl-all-noawt.jar?
Comment 8 Julien Gouesse 2014-07-30 10:21:30 CEST
It should work now, please give it a try with the very latest development build.
Comment 9 Sven Gothel 2014-07-31 02:47:23 CEST
(In reply to comment #8)
> It should work now, please give it a try with the very latest development
> build.

yes, works here as well - i.e. tested on one OSX w/ a NEWT only unit test.

If problem still occurs, please reopen.