lewisje / renderengine

Automatically exported from code.google.com/p/renderengine
MIT License
0 stars 0 forks source link

Engine crashes when component[c] is undefined #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Recent crash bug found in FF4b1 where the engine stops executing because 
component[c] is undefined.

Original issue reported on code.google.com by bfatt...@gmail.com on 12 Jul 2010 at 4:11

GoogleCodeExporter commented 8 years ago
Added state to PooledObject to determine if an object is alive or dead.  
Objects were being updated when they were no longer in the render context.  It 
seems that FF4.0b1 is more sensitive to objects being removed from the scene 
graph than 3.6 or prior versions of Firefox were.

In the Asteroids example, the bullet object was being destroyed while it was in 
the process of being updated.  This would cause an object to fail during update 
since it had been destroyed and subsequently removed from the scene graph.  
After fixing this issue, it became apparent that this problem has existed for a 
while and that checking for an object to be alive before performing any updates 
on it would be a good sanity check.

However, the sanity check failed because (for example) when a bullet struck an 
asteroid, the asteroid was destroyed as well.  The asteroid would be removed 
from the render context, but the render context was already iterating over its 
objects.  Thus, when it came to the rock which was destroyed (which existed 
after the bullet in the scene graph) it would fail the "isAlive()" check.  
Hence, objects are now added to a safeDelete() list when they are destroyed.  
This is automatic to make sure that objects whose destroy() methods are called 
are put into the list and destroyed after the default rendering context has 
finished updating.

The issue has been fixed and testing in FF4.0b1, FF3.6.6, and Chrome 5.0

Original comment by bfatt...@gmail.com on 13 Jul 2010 at 2:28

GoogleCodeExporter commented 8 years ago
Verified the fix.

Original comment by bfatt...@gmail.com on 13 Jul 2010 at 2:28

GoogleCodeExporter commented 8 years ago
Reopened due to an issue with object pooling and order of deletion of objects.  
Current trunk is broken.

Original comment by bfatt...@gmail.com on 13 Jul 2010 at 3:23

GoogleCodeExporter commented 8 years ago
Current trunk has been restored to revision 994.  This issue will not block the 
release of v1.0 since a beta version of a browser isn't a supported browser.  
However, we need to see if this issue is somewhat related to the crash issue in 
Google Chrome (current stable version)

Original comment by bfatt...@gmail.com on 14 Jul 2010 at 3:17

GoogleCodeExporter commented 8 years ago

Original comment by bfatt...@gmail.com on 14 Jul 2010 at 4:09

GoogleCodeExporter commented 8 years ago
Moved to next version - Firefox 4.0 is beta

Original comment by bfatt...@gmail.com on 15 Jul 2010 at 3:36

GoogleCodeExporter commented 8 years ago

Original comment by bfatt...@gmail.com on 19 Jul 2010 at 1:34

GoogleCodeExporter commented 8 years ago

Original comment by bfatt...@gmail.com on 3 Aug 2010 at 1:50

GoogleCodeExporter commented 8 years ago
A complete rewrite of the Container class as a linked-list has corrected the 
issue.  No longer do objects pulled from an Array affect the iteration of 
objects in the container.  Now, objects can be added to (and removed from) the 
Container without affecting any iterators currently executing on the Container. 
 This solution required some specific changes which may break backwards 
compatibility between v1.0 and v2.0 of The Render Engine.  I'm still doing 
testing, but the Asteroids demo loads and executes within FF4.0b3 without any 
issues now.

Original comment by bfatt...@gmail.com on 15 Aug 2010 at 8:28

GoogleCodeExporter commented 8 years ago

Original comment by bfatt...@gmail.com on 9 Nov 2010 at 2:35

GoogleCodeExporter commented 8 years ago

Original comment by bfatt...@gmail.com on 9 Nov 2010 at 2:39