Hi John,
I'll go to snip your posting...
Guten Tag Rolf,
:-)
WinXP is *troublesome*. There are bugs in WinXP that make the high res
J3D timer malfuntion. My code does a test to see if WinXP is
malfunctioning and if so uses the standard Java timer (which has good
resolution in WinXP).
Thats also what I have read somwhere that the Timer from winXP is much
more accurate
then all winXY Timer before... so thats,the poit where it became
strange, cause by
win2k the error did not occur until now (just testing...) and this
e.g.while looking TV on
the other screen...
I had extensive code that worked quite well with a half dozen behaviors
but as I dealt with problems I slowly became convinced it was superior
to only use a single wake up on every frame behavior and drive
everything else from that.
hm sounds as an interesting solution, so you do something like:
case(0) doAction(0);
case(1) doAction(1);
case(2) doAction(2);
... and so far?, something like a BehaviorDistributor, sounds interesting...
so the sum of WakeupONxy classes and their processStimuli, will cause
troubles?
I'd advise you add in some more "System.out.println" debugging
statements to try and pin down exactly where it is halting. I'm
*guessing* you are having a threading problem (each behavior is a thread
effectively) and thus while your code is busy doing something, another
behavior does something that conflicts.
hmm..will be an idea to check this.... but it will also stop when the
programm is
minimzed, while working anything else...all other behavior couldn't be
activated,
cause they avoke due to actions like picking, sliderbar, keyPressed and
so far
Thus the advantage of a single
wake up on every frame behavior (you can predict what is happenning at
any moment).
sounds logical
I've had issues like that where code would run fine for
DAYS and suddenly hit a problem - very tough to track down!
brrrrrr.... wouldn't be nice to get this now....maybe I'll try your
solution to aggregate
the behaviors with wake up on every frame.
best thanks
Rolf
- John Wright
Starfire Research
Rolf Gabler-Mieck wrote:
Hi John,
I do not work with any IDE, so commandline is
my "Error&Msg"-Output and no Error is shown,
it just stop the work ;-(
the funny thing is that everytime I'll show somebody
my work it stops very quick, but when I like to describe
what directly will happen...it work and work and work...
just since 40 minutes without any stoperror...
~one hour ago, when I show this some people it stoped working
after 1 minute....so I'll decribe it more exactly from mind...
(with waiting for the error....)
I put the comand-string which controls the kind
of movement as a stdout into
stateChanged Method of the JButtons
actionperformed of the Timer
and of course also in the process stimulus
the command is absolutley OK in every of these
"System.out.println", but after a Time x
all movements stoped, but the comands are OK
as they have to be an were printed correct to stdout
I try to run the software during the whole night and at
the morning, of couse no movement via buttons is possible
and also processStimulus has stopped all outputs to the comand
all the other outputs were as they has to be.
also I wasn't able to reproduce such errors by using win2k prof...
they seem to be only in winXP [prof&home]
I use on both mashines j3d 1.3.1 and jdk1.4.2.07
I use seven Behaviors (for different PickingResults, Illumination and
one
for Key navigation and that one for GUI-navigation), with no Problems...
maybe this is the first one. Do you think that it is better to make just
one
Behavior Class which chooses at processStimulus the kind of Behavior,
depending on any given values?
Do you belive that the SwingTimer will cause such troubles?
I wasn't able to detect how to get the J3DTimer work for my
case.
best thanks for your answer
if you have further ideas... I am greedy to know!
regards from Kiel
Rolf
John Wright wrote:
Rolf,
Of course double check that you are resetting the trigger on your
behavior *every* time it runs. Are you running from a command line so
you can see if any errors are occurring and halting operation?
I don't know any reason why WakeupOnElapsedTime should not work,
however
I've switched to using only a single wake up on every frame and using
the J3D high res timer for my code. I've found it to be troublesome to
have more than one behavior.
- John Wright
Starfire Research
Rolf Gabler-Mieck wrote:
Hi all,
i build a JPanel containing a set of JButtons for each type of
movement.
Everytime the Button isPressed [using ChangeListener in Combination
with
a Buttonmodel and a Swing.Timer] a command will be send to the
Behavior
class for navigation, which uses WakeupOnElapsedTime(50)to set up a
new
Movement every 50ms. If no Button is pressed a dummy command is
send and
no Transformation will done.
Normally it works very nice but when the app runs for a while
sometimes
(between 1minute and x minutes!!) the navigation ends.
the Buttons changes their outfit, as they should have to do, while
pressing, so all events work properly.
theres no way to bring it again to work.
I tried to use different Listeners (Action,Mouse & Change in
combination
with a thread solution), but all ended in that failure, so I went
to use
a Timer instead of a thread to get navigation during button
pressing. It
seemed to be working... but today the problem occurs again...
the command is set in the Behavior but there's no reaction, so I think
about using the wrong WakeUp condition, could this be?
parallel I use a KeyNavigationBehavior when the focus is on the
Canvas3d, which works all the time, uses WakeUpOnAWTEvent.
Is WakeupOnElapsedTime the reason for my troubbles?
any help is welcome
best regards
rolf
--
Dipl. Ing.(FH) d. Geomatik
Rolf Gabler-Mieck
c/o
LGI-Geographisches Institut der CAU-Kiel
Ludewig-Meyn Str. 14
24098 Kiel
Tel: +49 431-880.2955
FAX: +49 431-880.4658
e-mail: [EMAIL PROTECTED]
===========================================================================
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".
--
Dipl. Ing.(FH) d. Geomatik
Rolf Gabler-Mieck
c/o
LGI-Geographisches Institut der CAU-Kiel
Ludewig-Meyn Str. 14
24098 Kiel
Tel: +49 431-880.2955
FAX: +49 431-880.4658
e-mail: [EMAIL PROTECTED]
===========================================================================
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".