Skip to main content

J3DMasterl control exception

8 replies [Last post]
nitro
Offline
Joined: 2004-09-12
Points: 0

hello

Periodically I have got an exception from J3DMasterControl thread. I cannot reproduce it. It happens randomly but alwayz when I am changing the appearance of an object or using a Pick utility.
Any suggestion what this might be?
As soon as encounter this exception the next time I will post it here.

-nitro

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Matthew Hilliard

Not to diminish nitro's problem, but has anyone else encountered the
problem where a scheduled repetitive behavior has not fired from
WakeOnElapsedFrames and the work around is to run a parallel Thread?

Has this been rectified since I first came across it in 1.3.1?

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

kcr
Offline
Joined: 2004-03-17
Points: 0

> has anyone else encountered the problem where a scheduled repetitive behavior has not
> fired from WakeOnElapsedFrames and the work around is to run a parallel Thread?

Do you remember what you were doing that cause this problem?

> Has this been rectified since I first came across it in 1.3.1?

We did fix a bug (Issue 21) that happened when a WakeOnElapsedFrames behavior threw an exception. In this case, we didn't cleanup correctly, causing WakeupOnElapsedFrames behaviors to stop working.

https://java3d.dev.java.net/issues/show_bug.cgi?id=21

Could this explain your problem?

-- Kevin

Matthew Hilliard

Its possible, but I never saw an Exception make it to the console. The
bounds were checked to be "Double.MAX_VALUE" so my initial response was to
elapse fewer frames (tried 5 and 10) and then switching from passive to
active, but railing the CPU carried its own problems for the application so
I had to switch back to passive. I then replaced the

WakeupOnElapsedFrames

with a

WakeupOnElapsedTime, to get "roughly" the same process, but that proved no
better. Eventually that stopped iterating too. Both wakeups would come
back fine for anywhere from 30 seconds to 2 hours, but would eventually
cease, with no explanation such as a stack trace. In the end I retired my
predecessor's framework with something lighter and faster anyhow, and
simply ran it from its own loop in its own Thread. In hindsight I wonder
if perhaps my predecessor engineered a deadlock, and my debugger was too
dumb to catch it. That project was the only time I've seen it, and by
dropping Behaviors it was easily worked around--but I could probably grab
it from its CVS tree if it rears its head for someone else.

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Alessandro Borges

Nitro,

This is just a workaround tip, not a solution:
In your thread use a behavior waiting at least 3 frames between state changes. I expect this give enought time for MasterControl to update properly the rendering state.

Alessandro

java3d-interest@javadesktop.org wrote:
Finnaly I encountered the problem once more. It happens when I pick an object to edit its Appearance. I then create a thread which makes the seleced Object blink (changes Appearance a few times). This works normally without any problem. But randomly I get this Exception. I cannot reproduce it because:
1. It does happen just very rarely and randomly
2. I haven't got a clue what the cause may be.
Any suggestions?

[code]
Exception in thread "J3D-MasterControl" java.lang.NullPointerException
at javax.media.j3d.AttributeBin.updateNodeComponent(AttributeBin.java:459)
at javax.media.j3d.RenderBin.updateObject(RenderBin.java:524)
at javax.media.j3d.MasterControl.updateMirrorObjects(MasterControl.java:2729)
at javax.media.j3d.MasterControl.runMonitor(MasterControl.java:3427)
at javax.media.j3d.MasterControl.doWork(MasterControl.java:2986)
at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:28)
[/code]
---
[Message sent by forum member 'nitro' (nitro)]

http://www.javadesktop.org/forums/thread.jspa?messageID=40131Èú

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
[att1.html]

Alessandro Borges

I am kind of stupid man :
If you use Behavior there is no need for creating threads ...(!!)
i.e. just use a behavior with WakeupOnElapsedFrames(1)

Of course Selman is right.

Alessandro

Alessandro Borges wrote:
Nitro,

This is just a workaround tip, not a solution:
In your thread use a behavior waiting at least 3 frames between state changes. I expect this give enought time for MasterControl to update properly the rendering state.

Alessandro

java3d-interest@javadesktop.org wrote:
Finnaly I encountered the problem once more. It happens when I pick an object to edit its Appearance. I then create a thread which makes the seleced Object blink (changes Appearance a few times). This works normally without any problem. But randomly I get this Exception. I cannot reproduce it because:
1. It does happen just very rarely and randomly
2. I haven't got a clue what the cause may be.
Any suggestions?

[code]
Exception in thread "J3D-MasterControl" java.lang.NullPointerException
at javax.media.j3d.AttributeBin.updateNodeComponent(AttributeBin.java:459)
at javax.media.j3d.RenderBin.updateObject(RenderBin.java:524)
at javax.media.j3d.MasterControl.updateMirrorObjects(MasterControl.java:2729)
at javax.media.j3d.MasterControl.runMonitor(MasterControl.java:3427)
at javax.media.j3d.MasterControl.doWork(MasterControl.java:2986)
at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:28)
[/code]
---
[Message sent by forum member 'nitro' (nitro)]

http://www.javadesktop.org/forums/thread.jspa?messageID=40131Èú

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[att1.html]

nitro
Offline
Joined: 2004-09-12
Points: 0

Thanks a lot for this hints. I did not recognize the Behavior class.

nitro
Offline
Joined: 2004-09-12
Points: 0

Finnaly I encountered the problem once more. It happens when I pick an object to edit its Appearance. I then create a thread which makes the seleced Object blink (changes Appearance a few times). This works normally without any problem. But randomly I get this Exception. I cannot reproduce it because:
1. It does happen just very rarely and randomly
2. I haven't got a clue what the cause may be.
Any suggestions?

[code]
Exception in thread "J3D-MasterControl" java.lang.NullPointerException
at javax.media.j3d.AttributeBin.updateNodeComponent(AttributeBin.java:459)
at javax.media.j3d.RenderBin.updateObject(RenderBin.java:524)
at javax.media.j3d.MasterControl.updateMirrorObjects(MasterControl.java:2729)
at javax.media.j3d.MasterControl.runMonitor(MasterControl.java:3427)
at javax.media.j3d.MasterControl.doWork(MasterControl.java:2986)
at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:28)
[/code]

Daniel Selman

Once live, you should only modify the scenegraph inside a Behavior.
After your pick I'd enable a blinking behavior and pass the Appearance
it should modify to it. When the behavior gets scheduled it should be
safe to modify the Appearance.

Dan

java3d-interest@javadesktop.org wrote:

>Finnaly I encountered the problem once more. It happens when I pick an object to edit its Appearance. I then create a thread which makes the seleced Object blink (changes Appearance a few times). This works normally without any problem. But randomly I get this Exception. I cannot reproduce it because:
>1. It does happen just very rarely and randomly
>2. I haven't got a clue what the cause may be.
>Any suggestions?
>
>[code]
>Exception in thread "J3D-MasterControl" java.lang.NullPointerException
> at javax.media.j3d.AttributeBin.updateNodeComponent(AttributeBin.java:459)
> at javax.media.j3d.RenderBin.updateObject(RenderBin.java:524)
> at javax.media.j3d.MasterControl.updateMirrorObjects(MasterControl.java:2729)
> at javax.media.j3d.MasterControl.runMonitor(MasterControl.java:3427)
> at javax.media.j3d.MasterControl.doWork(MasterControl.java:2986)
> at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:28)
>[/code]
>---
>[Message sent by forum member 'nitro' (nitro)]
>
>http://www.javadesktop.org/forums/thread.jspa?messageID=40131鳃
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
>For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net