Null container (null object reference error)

Hey Guys, Great open source tool. We are currently using PanoSalado to develop a flash based adventure game, and it's working out great. In moving from rev_93 to rev_120 (to get the hotspot fix) I began getting the following error:

"TypeError: Error #1009: Cannot access a property or method of a null object reference.
at org.papervision3d.core.utils::InteractiveSceneManager/handleEnterFrame()[/Users/fsms/Documents/Flex Builder 3/retest/src/org/papervision3d/core/utils/InteractiveSceneManager.as:265]"

It has to do with the container being null after I remove my first space, and even though the new spaces load the error continues (obviously at every enter frame event). I tried looking through the code to see where containers are loaded and unloaded but kinda lost my place.

Any help would be greatly appreciated.

Sure I've got a solution

Papervision updated InteractiveSceneManager.as, which got rolled into that later rev. And there was a bug in it that I fixed, but hadn't gotten rolled back into Papervision yet, and maybe I let it slip through when I updated Papervision. I will take a look as soon as I get a chance. Been out of town a lot recently. Anyway, the offending code is in InteractiveSceneManager.as, probably in the destroy method.

Zephyr

__________________

Zephyr Renner

Re: Null Container errors

Hey there:

A quick fix, until Zephyr updates the code/repository properly is to replace the  destroy() method in InteractiveSceneManager.as with:

(deleted: didn't really work Wink )

__________________

Patrick Cheatham
FlashPanos.com creator, Panoramic Photographer
Got PanoSalado?

I think I fixed it

Can you download the latest source in the repo and test. I think I applied the proper fix.

Zephyr

__________________

Zephyr Renner

Still not working

Hey guys thanks for the quick reply. I just got back and have tried the new rev. but I am still getting the same error. I see what you have done and will try to take a look further, any new ideas are welcome, as debugging is impossible with this error running at every frame.

Thanks again.

Possible solution

I doubt this is still troubling you (or anyone?). I ran into this problem with the mouse move event. Simply call .destroy() on your InteractiveSceneManager before its removed from stage.

The InteractiveSceneManager is a member of the view port, so calling the viewport's destroy() method before removing it from stage will do the trick.