Invalid BitmapData error in Openspace v2 framework

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

Moderators: Lapo, Bax

tomg
Posts: 15
Joined: 25 Aug 2010, 15:34

Invalid BitmapData error in Openspace v2 framework

Postby tomg » 27 Aug 2010, 08:19

Hi,

I am trying to integrate OpenSpace into a flash application (compiled using Flex SDK, but not a Flex/MXML) app. It seems to be working as I would expect - I am using versions of the Map Loading utility in the examples and have got the Flash example running OK using local libraries, connecting to my server.

When I run in the browser in our version I get the following error (preceeding traces show the engine initializing). Can anyone help - I am unsure what the issue is.


QTM Logger|: [9:38:16:840] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Configuration loaded: /flash/xml/openspace-client.xml
QTM Logger|: [9:38:16:840] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Requesting initialization data to OpenSpace Extension
QTM Logger|: [9:38:16:883] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Initialization data received from OpenSpace Extension
QTM Logger|: [9:38:16:898] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Initialization completed
QTM Logger|: [9:38:16:899] Debug from: [object OpenSpaceTest] : OpenSpaceEvent.INITIALIZED event received
QTM Logger|: [9:38:16:900] Debug from: [object MapsLoadingManager] : loadMap(House1Inside)
QTM Logger|: [9:38:16:901] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Requesting map to OpenSpace Extension
QTM Logger|: [9:38:16:943] Debug from: [object QtmSocialPlatformController] : USer variables update:null
QTM Logger|: [9:38:16:970] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Map received from OpenSpace Extension
QTM Logger|: [9:38:16:984] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Map parsing completed (13 ms)
QTM Logger|: [9:38:16:988] Debug from: [object MapsLoadingManager] : External swf files to be loaded: buildings.swf,backgrounds.swf
QTM Logger|: [9:38:17:75] Debug from: [object MapsLoadingManager] : External libraries loaded, now the loaded map can be rendered
QTM Logger|: [9:38:17:126] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Tiles creation progress: 68%
QTM Logger|: [9:38:17:126] Debug from: [object MapsLoadingManager] : Map generation progress: 68%
QTM Logger|: [9:38:17:130] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Tiles creation progress: 100%
QTM Logger|: [9:38:17:130] Debug from: [object MapsLoadingManager] : Map generation progress: 100%
QTM Logger|: [9:38:17:143] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Map generation completed (53 ms)
QTM Logger|: [9:38:17:151] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Map rendering duration: 1 ms
QTM Logger|: [9:38:17:153] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Map shifted
QTM Logger|: [9:38:17:155] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Avatars creation completed
QTM Logger|: [9:38:17:156] Debug from: [object OpenSpaceTest] : Openspace logger event: [INFO] Map rendering completed
QTM Logger|: [9:38:17:156] Debug from: [object MapsLoadingManager] : OpenSpace.MAP_RENDERED event received
ArgumentError: Error #2015: Invalid BitmapData.
at flash.display::BitmapData/ctor()
at flash.display::BitmapData()
at com.smartfoxserver.openspace.engine.view::OpenSpaceView/addFadeBitmap()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/view/OpenSpaceView.as:332]
at com.smartfoxserver.openspace.engine.view::OpenSpaceView/fadeView()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/view/OpenSpaceView.as:127]
at com.smartfoxserver.openspace.engine.control::OpenSpaceController/onMapRendered()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/control/OpenSpaceController.as:1271]
at com.smartfoxserver.openspace.engine.control::IsoEngineController/onMapRenderingComplete()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/control/IsoEngineController.as:1626]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace.shared.control.map::MapManager/renderMap()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/shared/control/map/MapManager.as:518]
at com.smartfoxserver.openspace.engine.control::IsoEngineController/onMapGenerationComplete()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/control/IsoEngineController.as:1612]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.smartfoxserver.openspace.shared.control.map::MapManager/onMapGenerationCompleted()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/shared/control/map/MapManager.as:1747]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at it.gotoandplay.utils.executor::MultiFrameExecutor/runStep()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/it/gotoandplay/utils/executor/MultiFrameExecutor.as:85]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
tomg
Posts: 15
Joined: 25 Aug 2010, 15:34

Fixed..

Postby tomg » 27 Aug 2010, 09:39

Sorry - I think this is my bad here - I was adding a new OpenSpace (flash) instance dynamically, and I had not explicitly set width and height. This seems to cause an Error if the FadeDuration is set above 0 (by turning this off the error goes, but you see nothing).
jeff
Posts: 14
Joined: 18 Jan 2013, 06:42
Contact:

Re: Invalid BitmapData error in Openspace v2 framework

Postby jeff » 13 Nov 2013, 05:24

this error still not fix yet?
User avatar
Bax
Site Admin
Posts: 4332
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Invalid BitmapData error in Openspace v2 framework

Postby Bax » 13 Nov 2013, 09:17

jeff wrote:this error still not fix yet?

From the user words, this was an error in his code (not setting the OpenSpace instance size).
Paolo Bax
The SmartFoxServer Team
jeff
Posts: 14
Joined: 18 Jan 2013, 06:42
Contact:

Re: Invalid BitmapData error in Openspace v2 framework

Postby jeff » 14 Nov 2013, 00:55

thanks for your reply, fixed :D

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 2 guests