Thread.sleep causes crash

75 views
Skip to first unread message

Thore Sittly

unread,
Jun 25, 2011, 2:14:28 PM6/25/11
to jam...@googlegroups.com
Hello

Just wanted to inform, that Thread.sleep(n) will cause a crash on MorphOS. I cleared the routine for testing purpses, but it's still crashing. Taking the line "Thread.sleep" out of TestWindow.java will let this work and draw the lines. btw really nice demo, runs smooth on MorphOS... :)
So I think there is a problem with Thread handling. Have to figure out when the crash occures internally. Do you know this problem yet?
I guess this could be an uninitialized Thread object, but I am not sure. Have to take a closer look later.

I think this is a main crash point, if this is fixed, the java apps will run much more stable.

BTW: I re-enabled JIT in my MorphOS version, seems it doesn't crash anymore. Furthermore I enabled Zip. Testing with JAR files will follow soon.

Kind regards

Thore



--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone

Thore Sittly

unread,
Jun 26, 2011, 7:38:23 AM6/26/11
to jam...@googlegroups.com
Seems the "Wait" commands in locking.c will cause JAmiga to crash.
This is also called when using Thread.sleep.
I'm trying to figure out an alternative

Thore

-------- Original-Nachricht --------
> Datum: Sat, 25 Jun 2011 20:14:28 +0200
> Von: "Thore Sittly" <TSi...@gmx.de>
> An: jam...@googlegroups.com
> Betreff: Thread.sleep causes crash

--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Thore Sittly

unread,
Jun 26, 2011, 11:59:27 AM6/26/11
to jam...@googlegroups.com
Hi

I finally fixed this problem!
The problem was CreateNewProcTags creats 68k Processes on MorphOS, so I added PPC specific parameters. Also I added typecasts to avoid nasty warning messages.
Now TestWindow.class will run on MorphOS version without changing the class!

Here my changes for MorphOS:
In JAmigaNotifyProcess:
struct Process *me = FindTask(0);
struct NotifyProcessData *npd = me->pr_ExitData; /* via parent */

changed to:
struct Process *me = (struct Process *)FindTask(NULL);
struct NotifyProcessData *npd = (struct NotifyProcessData *)me->pr_ExitData; /* via parent */


And in JAmigaWaitTime added a MorphOS section:
....
TAG_END);
#elif (JA_TARGETOS == JA_MORPHOS)
subProc = CreateNewProcTags(
NP_Entry, (int)&JAmigaNotifyProcess,
NP_Name, "JAmigaNotifyProcess",
NP_ExitData, &npd, /* share data with children. */
NP_CodeType, CODETYPE_PPC,
NP_PPCStackSize, 32768,
TAG_END);
#else
subProc = CreateNewProcTags(
....

Jamiga becomes fun on MorphOS now :)

Regards
Thore

-------- Original-Nachricht --------
> Datum: Sun, 26 Jun 2011 13:38:23 +0200


> Von: "Thore Sittly" <TSi...@gmx.de>
> An: jam...@googlegroups.com

> Betreff: Re: Thread.sleep causes crash

Joakim Nordström

unread,
Jun 26, 2011, 12:20:30 PM6/26/11
to jam...@googlegroups.com
Great work!

I have seen this CODETYPE-stuff for MorphOS but apparently forgot/ignored it here. I haven't been able to do much on JAmiga lately though, but soon enough I hope to.

Regarding jar-support, it is currently not implemented. I have been looking at using some ZIP-library, preferrably available for MOS, AOS and Aros, but the closest was a z-library, which would require us to implement the directory structure stuff, after decompressing the jars.

/Joakim

2011/6/26 Thore Sittly <TSi...@gmx.de>
Reply all
Reply to author
Forward
0 new messages