Page 1 of 1

Tutorial Intro fails to launch the viewer

Posted: Wed 13. Mar 2013, 23:17
by jgpandit
Hello,

I am new to JReality. Today I downloaded and setup Eclipse. Everything went fine, but the viewer does not launch. The console shows following message ---

---
JOGL3Viewer constuctor called
Native[GL4bc false, GL4 false, GL3bc true [3.3 (Compatibility profile, arb, ES2 compatible, FBO, hardware)], GL3 true [3.3 (Compatibility profile, arb, ES2 compatible, FBO, hardware)], GL2 true [3.3 (Compatibility profile, arb, ES2 compatible, FBO, hardware)], GL2ES1 true, GLES1 false, GL2ES2 true, GLES2 false], Profiles[GLProfile[GL2ES2/GL3bc.hw], GLProfile[GL2ES1/GL3bc.hw], GLProfile[GL2/GL2.hw], GLProfile[GL3/GL3.hw], GLProfile[GL3bc/GL3bc.hw], GLProfile[GL2GL3/GL3bc.hw], GLProfile[GL3bc/GL3bc.hw], , default GLProfile[GL3bc/GL3bc.hw]]
---

and then nothing. It is not a card issue, as I am able to run the demos off the web page. I am on win64 and Java 1.7. I tried win32 and win64 native libraries. No change.

Please help,

Thanks,
-Jayant.

Re: Tutorial Intro fails to launch the viewer

Posted: Thu 14. Mar 2013, 14:37
by benjamin.kutschan
Which application/tutorial are you running?

Is this the whole console output?
Does your program terminate, or do you terminate it via the red square button in the Eclipse Console?
Does it open a window?

What happens if you run, for example de.jreality.tutorial.geom.BallAndStickFactoryExample from the src-tutorial folder?

Re: Tutorial Intro fails to launch the viewer

Posted: Thu 14. Mar 2013, 17:41
by jgpandit
Hello Benjamin,

I tried the Icosahedron.java first as suggested by the setup web page and then a few others.

Yes, that is the whole console output. The program does not terminate either. It just sits there. I tried waiting for a while, but no luck. I have to ultimately terminate it using the red button. It doesn't open a new window. I checked performance meter and it shows no activity.

I tried a number of other examples from the src-tutorial package. All with exact same result.

Am I missing something simple?

Thank you for helping.

-Jayant.

Re: Tutorial Intro fails to launch the viewer

Posted: Fri 15. Mar 2013, 11:16
by benjamin.kutschan
Hi,
that's rather strange. The Console output is correct. However a window should open, where you can spin the icosahedron with your mouse.
I assume you're using the jReality-src.zip from here http://www3.math.tu-berlin.de/jreality/ ... ticle_id=4.

I'll try to reproduce your error on win7 64bit.

Re: Tutorial Intro fails to launch the viewer

Posted: Fri 15. Mar 2013, 11:46
by benjamin.kutschan
Oh, you probably used this tutorial http://www3.math.tu-berlin.de/jreality/ ... p_tutorial to set up an eclipse project from SVN?
Ok, I have a guess: try commenting the second line in src-plugin/basic/View.java and uncommenting the first. Should then look like this:

Code: Select all

	String viewerString = Secure.getProperty(SystemProperties.VIEWER, SystemProperties.VIEWER_DEFAULT_JOGL+" "+SystemProperties.VIEWER_DEFAULT_SOFT);
//	String viewerString = Secure.getProperty(SystemProperties.VIEWER, SystemProperties.VIEWER_DEFAULT_JOGL+" "+SystemProperties.VIEWER_DEFAULT_JOGL3+" "+SystemProperties.VIEWER_DEFAULT_SOFT+" "+SystemProperties.VIEWER_JOGL_DOME);
.
If that helps, then it means that the jogl3-Viewer doesn't work. The reason might be that it gets caught in an infinite loop waiting for query results from the GPU: You could try changing line 158 in src-jogl3/helper/TransparencyHelper.java from

Code: Select all

    	quer = endQuery(gl);
to

Code: Select all

 quer = 0;
To check whether this works undo your changes from View.java. If it works indeed you could use the jogl3-Viewer without transparency until someone fixes the problem.
By the way, what GPU do you have?

Re: Tutorial Intro fails to launch the viewer

Posted: Fri 15. Mar 2013, 12:01
by benjamin.kutschan
I have tried to reproduce your problem but without luck. I used Eclipse Juno on Windows 7, 64bit to checkout the trunk of the jRealiy SVN, then immediately run the Icosahedron.java example. Works.

Re: Tutorial Intro fails to launch the viewer

Posted: Fri 15. Mar 2013, 21:57
by jgpandit
I am afraid, nothing has worked. When I comment the lines as suggested, the debug print does not show up at all. I stepped through debugger and it goes into the SimpleController.startup() and thats where the main thread stays. Other thread are present and active, only the window never shows up. I tried a couple of swing program, which worked.

I tried the command line tutorial steps on the same box using the jars only and the viewer shows up, but it never finds JOGL. Always gives 'Possbly JOGL is not in classpath' message.

I then got hold of another box, but it was also win 7 and gave exact same problem. I am beginning to think its Java 1.7. I am trying to safely rollback to 1.6 and also trying to get hold of a linux box.

The Display adapters for my two boxes are 1. ATI Radeon HD 4250 and 2. Intel(R) HD Graphics Family. The drivers are up to date.

Thank you for taking the time to help.

Re: Tutorial Intro fails to launch the viewer

Posted: Sat 16. Mar 2013, 07:16
by jgpandit
There is an interesting update. I got hold of a linux box and set it up. The tutorial intro Icosahedron program ran well the first time. The viewer menu item shows 3 options - JOGLViewer, SoftViewer and DomeViewer. (Just FYI).

This is good that it gets me going further, but for many reasons I would prefer to work on my windows 7 box. Hope that problem can be resolved soon because sooner or later I will have to switch to it.

Thanks.

Re: Tutorial Intro fails to launch the viewer

Posted: Sun 17. Mar 2013, 13:57
by sechel
Hi all,
I switched the startup procedure that boots the viewer last week. If there are problems connected with that change this could be tracked down by replacing the jrworkspace.jar by an earlier version e.g. from rev. 5761.
If this helps, then I will have to dig into this dead-lock by inspecting the active stack traces of your machine.
Hope that helps.
- Stefan

Re: Tutorial Intro fails to launch the viewer

Posted: Mon 18. Mar 2013, 16:45
by jgpandit
Hello Stefan,

That did help. I checked out the version 5761 on the same windows box. The Icosahedron test in that project ran right away. I used the 5761 jrworkspace.jar in the current jreality project and that worked as well.

Thanks you for the help.

I am hoping to develop a new Java 3D application using JReality. I am working fulltime on developing a proof of concept test. If you are going to spend time looking into this issue that is coming up on my machine, I will be very happy to help you. Please let me know what you need from me.

Thanks,
-Jayant.

Re: Tutorial Intro fails to launch the viewer

Posted: Tue 19. Mar 2013, 17:17
by sechel
Hi Javant,
please do the following for me. I believe you experience a dead-lock involving the AWT-EventQueue and some other thread possibly main. From Eclipse (best is the JUNO Release for this) start the Viewer in Debug-Mode and wait till it freezes. Then suspend all active threads in the Debug View and copy the tree to the clipboard. The result should look similar to this:

Code: Select all

		Thread [main] (Suspended)	
			waiting for: StartupChain  (id=69)	
			Object.wait(long) line: not available [native method]	
			StartupChain(Object).wait() line: 485	
			StartupChain.startQueuedAndWait() line: 34	
			SimpleController.startup() line: 378	
			JRViewer.startup() line: 429	
			JRHalfedgeViewer.main(String[]) line: 112	
		Thread [AWT-Shutdown] (Suspended)	
			waiting for: Object  (id=77)	
			Object.wait(long) line: not available [native method]	
			Object.wait() line: 485	
			AWTAutoShutdown.run() line: 265	
			Thread.run() line: 662	
		Daemon Thread [AWT-Windows] (Suspended)	
			WToolkit.eventLoop() line: not available [native method]	
			WToolkit.run() line: 293	
			Thread.run() line: 662	
		Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 355 in SimpleController$2))	
			SimpleController$2.run() line: 355	
			StartupChain.run() line: 21	
			InvocationEvent.dispatch() line: 209	
			EventQueue.dispatchEventImpl(AWTEvent, Object) line: 646	
			EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84	
			EventQueue$1.run() line: 607	
			EventQueue$1.run() line: 605	
			AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]	
			AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87	
			EventQueue.dispatchEvent(AWTEvent) line: 616	
			EventDispatchThread.pumpOneEventForFilters(int) line: 269	
			EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184	
			EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174	
			EventDispatchThread.pumpEvents(int, Conditional) line: 169	
			EventDispatchThread.pumpEvents(Conditional) line: 161	
			EventDispatchThread.run() line: 122	
		Daemon Thread [main-SharedResourceRunner] (Suspended)	
			waiting for: SharedResourceRunner  (id=84)	
			Object.wait(long) line: not available [native method]	
			SharedResourceRunner(Object).wait() line: 485	
			SharedResourceRunner.run() line: 240	
			Thread.run() line: 662	
	C:\Program Files\Java\jdk1.6.0_30\bin\javaw.exe (19.03.2013 16:03:15)

Re: Tutorial Intro fails to launch the viewer

Posted: Tue 19. Mar 2013, 17:38
by sechel
Hi,
this is a long shot: I checked in a fix for the startup procedure that could possibly produce a dead-lock. Please check the latest version of jrworkspace.jar from the SVN.
Stefan

Re: Tutorial Intro fails to launch the viewer

Posted: Tue 19. Mar 2013, 17:57
by jgpandit
Hello Stefan,

I updated my project, got level 5849, but it did not help. The test launch still froze. Following is the complete call stack

Code: Select all

Icosahedron [Java Application]	
	de.jreality.tutorial.intro.Icosahedron at localhost:49505	
		Thread [main] (Suspended)	
			waiting for: StartupChain  (id=36)	
			Object.wait(long) line: not available [native method]	
			StartupChain(Object).wait() line: 503	
			StartupChain.startQueuedAndWait() line: 38	
			SimpleController.startup() line: 457	
			JRViewer.startup() line: 429	
			JRViewer.display(SceneGraphNode) line: 606	
			Icosahedron.main(String[]) line: 51	
		Daemon Thread [AWT-Windows] (Suspended)	
			WToolkit.eventLoop() line: not available [native method]	
			WToolkit.run() line: 299	
			Thread.run() line: 722	
		Daemon Thread [AWT-EventQueue-0-SharedResourceRunner] (Suspended)	
			waiting for: SharedResourceRunner  (id=42)	
			Object.wait(long) line: not available [native method]	
			SharedResourceRunner(Object).wait() line: 503	
			SharedResourceRunner.run() line: 240	
			Thread.run() line: 722	
		Thread [jReality render thread] (Suspended)	
			waiting for: Object  (id=40)	
			Object.wait(long) line: not available [native method]	
			Object.wait() line: 503	
			SoftViewer.run() line: 220	
			Thread.run() line: 722	
	C:\Program Files\Java\jdk1.7.0_04\bin\javaw.exe (Mar 19, 2013 11:49:09 AM)	
Hope that helps. If you would like to have a joint debugging session, it could be resolved faster. I am in Eastern time zone, and can be available at any reasonable time of day or any unreasonable time of night as well.

Re: Tutorial Intro fails to launch the viewer

Posted: Thu 21. Mar 2013, 15:57
by sechel
Hi Javant,
this might be a good thing since I have no Idea what fails. It appears to me that the AWT Event Queue is simply not started to work through the startup jobs. If the startup jobs are not processed the main thread will freeze and wait for it.
I will contact you personally to get this debugging session managed.
Stefan

Re: Tutorial Intro fails to launch the viewer

Posted: Thu 21. Mar 2013, 19:50
by jgpandit
Hello Stefan,

I just upgraded my JDK from 1.7.0_04 to 1.7.0_17 and the tutorial programs are working fine. Easy enough fix. Thank you for spending time on this.

-Jayant.