Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (604)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (652)
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 1924 times)
0 Members and 1 Guest are viewing this topic.
Offline c_lilian

Senior Devvie

Projects: 1

Java games will probably rock someday...

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


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

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 :

Offline thijs

Junior Devvie

Lava games rock!

« Reply #1 - Posted 2007-02-18 22: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="">3DzzD!</a>
<a href="">Arcazoid!</a>
Offline c_lilian

Senior Devvie

Projects: 1

Java games will probably rock someday...

« Reply #2 - Posted 2007-02-19 08: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 Devvie

Lava games rock!

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

Yup, I attached the error log

<a href="">3DzzD!</a>
<a href="">Arcazoid!</a>
Offline c_lilian

Senior Devvie

Projects: 1

Java games will probably rock someday...

« Reply #4 - Posted 2007-02-21 14: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 15: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 Devvie

Projects: 1

Java games will probably rock someday...

« Reply #6 - Posted 2007-02-21 15: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.

SHC (24 views)
2015-08-01 03:58:20

Jesse (19 views)
2015-07-29 04:35:27

Riven (39 views)
2015-07-27 16:38:00

Riven (21 views)
2015-07-27 15:35:20

Riven (24 views)
2015-07-27 12:26:13

Riven (14 views)
2015-07-27 12:23:39

BurntPizza (35 views)
2015-07-25 00:14:37

BurntPizza (46 views)
2015-07-24 22:06:39

BurntPizza (28 views)
2015-07-24 06:06:53

NoxInc (36 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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‑
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!