I had exactly that problem with a (sounds like) similar application. My
behvaiour was waking up after an elapsed time and it would occasionally
stop calling the processStimulus method. I tried running it through
profilers several times and the only thing I could resolve is that the
Behaviour thread was being locked.

I assumed it was a deadlock on my part of the code, yet all my code
seemed to exit cleanly. Also, if I replaced the behaviour thread with an
asynchronous wakeup (using a Thread that just sleeps then invokes my
behaviour) I didn't have the same problem. The downside was that my
behaviour was no longer synched with the Java3D render cycle.

I tried to make my own wakeup criteria but you can't because of
protected methods, etc.

In the end I settled for a horribly messy implementation that has never
failed. Ready? I put a TransformGroup with no geometry in my scene. I
then have an asynchronous thread change its transform periodically
(every 33 ms). Finally, I have my old behaviour wake up on transform
change. Sounds silly, I know, but as you say the lock-up was very
frustrating.

Since others don't seem to have that problem, my guess is that we both
have thread issues. I also update a Swing GUI, but that should all
happen with InvokeLater. I have to update textual displays, vehicle
positions and camera orientations from the one stream of data.

Good luck!
josh

----------------------------------------------------
Joshua L. Richmond, BASc, MSc.
Systems Design Engineering /
Orbital Express Program

MD Robotics
9445 Airport Rd, Brampton, ON, Canada
(905) 790-2800 x4332
http://www.mdrobotics.ca
-----------------------------------------------------

>>> [EMAIL PROTECTED] 01/21/04 11:37AM >>>
John Wright:
  Talking with someone here at work, they mentioned any textfield
updates or
swing updates
may be a problem because they are not thread safe, so it would be wise
to
use Runnables
with invokeLater.  I have Textfield updates and JPanel updates so I'll
have
to put them in
a Runnable to see if that helps.


Priya:
  Right now I'm using wakeup on time...mine does a lot too. I have it
update
VRML vehicle positions
and attitudes, calculate camera positioning while attached to a moving
vehicle and calculated
burn plume directions...it seems like a lot but I've had other programs
do
more. Although
you make a good point that the elapsed time and overload of work may
be
interacting. This coupling
may cause the failure if the calculations don't finish before the time
is
up...I'll switch to
elapsed frames and see if that helps....the problem is that I can't
reproduce the bug.

I've put in a try/catch but since I can't reproduce the bug I can't see
if
that helps yet.

Thanks,
Mario



-----Original Message-----
From: Piriyakala Suresh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 10:19 AM
To: ZACZEK, MARIUSZ P. (MARIO) (JSC-DM) (NASA)
Subject: [JAVA3D] ? Behaviors: processStimulus issue ?


Hi,
I have encountered the same problem, and was looking to the mailing
archive
for any ideas! It may be a good idea to compare notes. I have many
other
behaviors that have never given me this problem. This behavior is
different
in 2 ways: it wakes up on elapsed time as opposed to frames by all my
other
time dependent behaviors, and it has to do a lot during a single
processStimulus.
Can you tell me anything similar in your situation?

Regards,
Priya

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED] Behalf Of John Wright
Sent: Wednesday, January 21, 2004 10:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] ? Behaviors: processStimulus issue ?


Mario,

I'm afraid you'll probably have to carefully go through your code to
spot the error.  I doubt it's a common bug in Java 3D as I run Pernica
twenty four hours a day seven days a week and I've never observed a
behavior spontaneously stopping.

Are there any situations where your processStimulas code might fail
and
not reset the trigger condition?

- John Wright
Starfire Research

"ZACZEK, MARIUSZ P. (MARIO) (JSC-DM) (NASA)" wrote:
>
> I have my bounds set pretty high (30,000) and I've had this occur
even
> though I've not moved/rotated that far away ... and this not
something I
can
> even duplicate...it just occurs sometimes (around 5% of the
time...though
> still annoying as hell).
>
> thanks,
>
>    Mario
>
> Mariusz Zaczek
> NASA - Johnson Space Center
> Automated Vehicles and Orbit Analysis / DM35
> Flight Design and Dynamics Division
> Mission Operations Directorate
> Bldg: 30A     Room: 3040A
>
> Disclaimer: "The opinions, observations and comments expressed in my
email
>              are strictly my own and do not necessarily reflect those
of
> NASA."
>
> "Failure is never quite so frightening as regret." - Cliff's wife
(The
Dish)
>
> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED] Behalf Of John Wright
> Sent: Wednesday, January 21, 2004 10:09 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] ? Behaviors: processStimulus issue ?
>
> Mario,
>
> There are several things that might cause this.  The most obvious
> perhaps is that perhaps you move your view out of the bounds of the
> behavior (hence it stops processing).
>
> - John Wright
> Starfire Research
>
> "ZACZEK, MARIUSZ P. (MARIO) (JSC-DM) (NASA)" wrote:
> >
> > Has anyone ever experienced your simulation/animation fail or stop?
and
> you
> > couldn't
> > restart it? My Java3D code periodically just stops animating and I
can't
> > seem to figure
> > out the problem...it's as if the 'processStimulus' function just
stops.
Is
> > there anything
> > that could cause this and is there any remedy for this?
> >
> > Everything else seems to work..ie buttons, rotating 3d scene,
etc...but
> > updating it
> > via processStimulus just does nothing...I have to restart the
application
> to
> > get it
> > to work.
> >
> >    Mario
> >
> > Mariusz Zaczek
> > NASA - Johnson Space Center
> > Automated Vehicles and Orbit Analysis / DM35
> > Flight Design and Dynamics Division
> > Mission Operations Directorate
> > Bldg: 30A     Room: 3040A
> >
> > Disclaimer: "The opinions, observations and comments expressed in
my
email
> >              are strictly my own and do not necessarily reflect
those of
> > NASA."
> >
> > "Failure is never quite so frightening as regret." - Cliff's wife
(The
> Dish)
> >
> >
>
===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in
the
> body
> > of the message "signoff JAVA3D-INTEREST".  For general help, send
email
to
> > [EMAIL PROTECTED] and include in the body of the message
"help".
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in
the
body
> of the message "signoff JAVA3D-INTEREST".  For general help, send
email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in
the
body
> of the message "signoff JAVA3D-INTEREST".  For general help, send
email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff JAVA3D-INTEREST".  For general help, send email
to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff JAVA3D-INTEREST".  For general help, send email
to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:Josh Richmond
TEL;WORK:4332
ORG:MDRobotics Ltd.;Systems Engineering #211
EMAIL;WORK;PREF;NGW:[EMAIL PROTECTED]
N:Richmond;Josh
TITLE:BASc., MSc.
ADR;INTL;WORK;PARCEL;POSTAL:;Mailstop 23;9445 Airport Rd;Brampton;ON;L6S 4J3;Canada
LABEL;INTL;WORK;PARCEL;POSTAL;ENCODING=QUOTED-PRINTABLE:Josh Richmond=0A=
Mailstop 23=0A=
9445 Airport Rd=0A=
Brampton, ON  L6S 4J3=0A=
Canada
LABEL;DOM;WORK;PARCEL;POSTAL;ENCODING=QUOTED-PRINTABLE:Josh Richmond=0A=
Mailstop 23=0A=
9445 Airport Rd=0A=
Brampton, ON  L6S 4J3
END:VCARD


===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to