Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Zoltar's Return return - JOGLAppletLauncher demo  (Read 1699 times)
0 Members and 1 Guest are viewing this topic.
Offline c_lilian

Senior Member


Projects: 1


Java games will probably rock someday...


« Posted 2007-02-18 17:17:25 »

Hi,

I've refreshed my old game Zoltar's Return, and put it at JavaPause.com

This game is just now a proof of concept for JOGLAppletLauncher (I don't plan on improving it) and could be used to try and find bugs related to this technology.

Already tested here with Java 1.4 on mac, and 1.6 on win XP, (there are still some occasional crashes on page exit).

Any feedback welcome !

Lilian Smiley

The game is here : http://www.javapause.com/games/zoltar


Offline thijs

Junior Member




Lava games rock!


« Reply #1 - Posted 2007-02-18 23:09:36 »

Quite a polished proof of concept Wink

It ran smooth on XP - FF 2.01 - Java 1.5

Only bug I encountered was like you said, when I closed the page...

<a href="http://www.dzzd.net">3DzzD!</a>
<a href="http://www.arcazoid.com">Arcazoid!</a>
Offline c_lilian

Senior Member


Projects: 1


Java games will probably rock someday...


« Reply #2 - Posted 2007-02-19 09:13:56 »

Yes, I really have to find out why this happens.

Do you have an hs_err_pid file describing the crash ?

(in other news : reported working on mac mini with OS X Tiger (java 5))

Lilian Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline thijs

Junior Member




Lava games rock!


« Reply #3 - Posted 2007-02-19 10:03:44 »

Yup, I attached the error log

<a href="http://www.dzzd.net">3DzzD!</a>
<a href="http://www.arcazoid.com">Arcazoid!</a>
Offline c_lilian

Senior Member


Projects: 1


Java games will probably rock someday...


« Reply #4 - Posted 2007-02-21 15:24:20 »

Ken (or anyone else), could you have a look at the error log (from thijs) and suggest me something please ? I'm a bit lost  Huh

In the game, the canvas is added from the init() method of the applet, and removed from the destroy() method.
The game loop uses the FPSAnimator class, and animator.stop() is invoked from the applet.stop() method. (so everything should happen in the EDT)

I've tried to release every display list and texture objects before removing the canvas, but it doesn't change anything.
I've also tried not removing the canvas, but the crash also happens

The strange thing is that the game doesn't crash on exit when you just display the menu, and then change of page (it starts crashing only when the game has been displayed, even only for a few seconds of play).

I've also tried removing sound, but as expected it doesn't change anything.

I'm sure it's related to that game (Jack Flower doesn't crash on exit when played as an applet) but I don't know why...

Any ideas ?

Lilian Smiley

Offline Ken Russell

JGO Coder




Java games rock!


« Reply #5 - Posted 2007-02-21 16:29:07 »

I can reproduce the crash in Mozilla. I tried disabling the talkback agent with no effect.

Looking carefully, I realized that the GLCanvas is actually not being removed on the EDT. It turns out that for historical reasons an applet's control methods init(), start(), stop(), and destroy() are NOT called from the EDT, but from a newly-created thread called the applet thread. This means that for correct behavior in the current applet implementations you should do any AWT-related work using the EventQueue.invokeAndWait() or EventQueue.invokeLater() methods.

There is a gotcha, though. When the applet's destroy() method is being called the current thread holds the AWT tree lock so you can't do an EventQueue.invokeAndWait() call without causing a hang. JOGL tries to move the OpenGL context destruction over to the EDT in GLCanvas.removeNotify() but it can't do it in all situations, this one in particular.

You may be able to work around this by doing some cleanup work in stop() instead of destroy().

I don't know why this particular applet provokes a crash and others don't. Maybe some OpenGL state is not correct and this causes the OpenGL implementation to crash when trying to destroy the associated context. Does DebugGL report anything?
Offline c_lilian

Senior Member


Projects: 1


Java games will probably rock someday...


« Reply #6 - Posted 2007-02-21 16:46:34 »

Thanks, I had forgotten about this applet thread,

I'm going to test cleanup from the applet.stop() and see what it does, I'll report my tests here later

Lilian Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (50 views)
2014-04-15 18:08:23

BurntPizza (46 views)
2014-04-15 03:46:01

UprightPath (62 views)
2014-04-14 17:39:50

UprightPath (44 views)
2014-04-14 17:35:47

Porlus (61 views)
2014-04-14 15:48:38

tom_mai78101 (84 views)
2014-04-10 04:04:31

BurntPizza (142 views)
2014-04-08 23:06:04

tom_mai78101 (242 views)
2014-04-05 13:34:39

trollwarrior1 (201 views)
2014-04-04 12:06:45

CJLetsGame (208 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!