BuildMap Error

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
trispo
Posts: 28
Joined: 30 Jul 2008, 09:56

BuildMap Error

Post by trispo »

Hey,

I have a problem after loading the map xml file. Sometimes my map is not parsed because of the following error:

Code: Select all

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at com.smartfoxserver.openspace.map::MapManager/buildMap()
	at com.smartfoxserver.openspace.map::MapManager/onParseCompleted()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at com.smartfoxserver.openspace.map::XmlMapParser/onXmlLoaded()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at flash.net::URLLoader/onComplete()
Most times, it is loaded and parsed correctly. I don't know what causes the problem. Does anyone know, waht can cause error? What instance can be null at this moment?

Thanks,
trispo
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Can you please send the map with those issues?
Paolo Bax
The SmartFoxServer Team
trispo
Posts: 28
Joined: 30 Jul 2008, 09:56

Post by trispo »

I've already found the issue. The error occurs if OS is not on stage, right?

trispo
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Can you better explain please?
Paolo Bax
The SmartFoxServer Team
trispo
Posts: 28
Joined: 30 Jul 2008, 09:56

Post by trispo »

I got this error when OpenSpace was not on the stage while it was building the map. If I use addChild(openSpace) it works.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Ok, thank you for reporting.
Paolo Bax
The SmartFoxServer Team
Post Reply