Odd error, I wonder why?

Is there an article on how the LWJGL thread works?

I am quite conscious of creating a multi threaded environment to spread the overhead. My ethos has been to keep the LWJGL focused on scenegraph objects only. Maybe, if the LWJGL is a pool of threads? my ethos is redundant?

Very rarely, when I retrive a Nodes children count it is say 1. I then get an array of children yet item 0 in the array is null. What could be causing this? Yes, I am retriving this data from a none LWJGL thread but I would of thought that if the LWJGL thread had atached a child the array should return populated?

Does the LWJGL use a latent thread processor? in which case to ensure variables are correctly up to date they need to be retrived by the LWJGL thread?

I refer to my initial question, Is there an article on how the LWJGL thread works?

Many Thanks

Now that is probably a question best asked in the LWJGL forums, however you can check out how the JME threading model works at http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:multithreading if you haven’t already.

It is not safe to access the scene graph from another thread. It is not safe to write to it. It is not safe to read from it. Non-thread-safe data structures are not thread safe… even for reading.

This is true of ALL Java data. Even if you have an int field in some class different threads may see different values for that at different times. In multi-CPU systems, it is likely that each has their own copy until a memory barrier occurs (say through a synchronized call).

Bottom line: do not use the scene graph from multiple threads. Ever. Which means that the renderable (attached) parts of the scene graph cannot be accessed from other threads: period.

Ok, thanks for that.