PDA

View Full Version : ClearScene() failing on a particular object



AbstractTech3D
11-20-2012, 08:14 PM
Hello

I have a rather full scene with a particular troublesome object, which is causing the system to crash whenever ClearScene() is called - as of course it is when using RenderQ.

I can manually select and delete only that item without it crashing, but in the context of an Lscript using 'ClearSelected()' to just delete that selected object before using 'ClearScene()' to clear the rest of the items intermittently crashes LW. It would seem to me that LW needs to take its time to complete the 'ClearSelected()' command on that troublesome object, and that Lscript is pushing ahead without that command having had time to complete.

I've tried putting a 10 second delay into the Lscript (via a loop checking current time) before proceeding with the 'ClearScene()' command, but it hasn't helped.

Any advice most welcome!

Thanks

Sensei
11-20-2012, 10:07 PM
First of all, if it's so repeatable, you should pack scene and send to NewTek in bug report.

Second thing- are you sure cpu is reaching code after clear command? Try putting info window there, which is waiting for user to close it (set alert level to high in options).

Crashes at the end mean usually that memory was trashed by some code EARLIER..
Buggy code can be called now, and we will see result of trashing even after few hours, when cpu will start using trashed memory block..
Memory before/after allocated memory block has special operating system data. If buggy program will exceed allocated memory block and write something there (thrash- random data), cpu will start using it when memory is freed, and there will be something not expected- random data, causing illegal and unknown behavior. Random crash.