Error 2015 Invalid Bitmapdata Flex
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ArgumentError: Error #2015: Invalid BitmapData up vote 2 down vote favorite I am having problems loading a bitmapData. I am getting the following error Engine Init //trace loadimage//trace ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData() Below is my code. it appears it happens after the trace loadimage package com.objects { import flash.display.Sprite; import flash.display.BitmapData; import flash.display.Bitmap; import flash.geom.Point; import flash.geom.Rectangle; import flash.display.Loader; import flash.net.URLRequest; import flash.net.*; import flash.events.*; import flash.display.LoaderInfo; public class gameObject extends Sprite { protected var w:Number; protected var h:Number; protected var image:BitmapData; protected var canvas:Bitmap; protected var px:Number; protected var py:Number; public function gameObject():void { init(); } private function init():void { } public function loadImage(imageDir:String, w:Number, h:Number, px:Number, py:Number):void { this.w = w; this.y = y; this.px = px; this.py = py; trace("loadimage"); var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,imageComplete); loader.load(new URLRequest(imageDir)); } private function imageComplete(e:Event):void { var loader:LoaderInfo = LoaderInfo(e.target); image = Bitmap(loader.content).bitmapData; drawImage(); } private function drawImage():void { var tilePoint:Point = new Point(0,0); var tileRect = new Rectangle(py,px,w,h); trace(loader.content); var canvasData:BitmapData = new BitmapData(w,h); trace("got canvas data"); canvasData.copyPixels(image,tileRect,tilePoint); trace("copied pixels"); canvas = new Bitmap(canvasData); } } } And my call the the method is like so balls = new Array(); balls[0] = new gameObject(); balls[0].loadImage("com/images/ball.gif", 15,15,0,0); When I trace the Loader.content, below is what shows E
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question http://stackoverflow.com/questions/2033792/argumenterror-error-2015-invalid-bitmapdata x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Flex ArgumentError: Error #2015: Invalid BitmapData up vote 0 down vote favorite There is no problem when http://stackoverflow.com/questions/7501065/flex-argumenterror-error-2015-invalid-bitmapdata I complied a Flex project with Flex SDK 4.0 or 4.1. But when I switch to SDK 4.5 (Because our group begins to use flash builder 4.5), I got the error when open a window ( pop up a widget window). I searched online for several days, but still have no clue what caused the problem. Please help. Here is the error message: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData/ctor() at flash.display::BitmapData() at spark.effects.supportClasses::AnimateTransitionShaderInstance/play() at spark.effects.supportClasses::AnimateInstance/startEffect() at mx.effects::Effect/play() at mx.core::UIComponent/commitCurrentState() at mx.core::UIComponent/commitProperties() at spark.components.supportClasses::GroupBase/commitProperties() at spark.components::Group/commitProperties() at mx.core::UIComponent/validateProperties() at spark.components::Group/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at mx.managers::LayoutManager/doPhasedInstantiationCallback() Here is the mxml: No tags yet. 12Next » Christian Expert BirdJoined: https://issues.apache.org/jira/browse/FLEX-11049 Jan '13Posts: 211 Christian Expert BirdJoined: Jan '13Posts: 211 Hi, I'm working on the error 2015 Android version of my game and I'm getting a completely random error sometimes when loading resources. It looks like it's related to a corrupt bitmapdata, this is a piece error 2015 invalid of the Stack Trace: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData/copyPixels() at starling.textures::ConcreteTexture/uploadBitmapData()[/Users/cgascons/workspace/TCGEngine/externals/Starling-Framework-master/starling/src/starling/textures/ConcreteTexture.as:97] at starling.textures::Texture$/fromBitmapData()[/Users/cgascons/workspace/TCGEngine/externals/Starling-Framework-master/starling/src/starling/textures/Texture.as:255] at starling.textures::Texture$/fromData()[/Users/cgascons/workspace/TCGEngine/externals/Starling-Framework-master/starling/src/starling/textures/Texture.as:148] at Function/starling.utils:AssetManager/private:processRawAsset/starling.utils:process()[/Users/cgascons/workspace/TCGEngine/externals/Starling-Framework-master/starling/src/starling/utils/AssetManager.as:682] at Function/http://adobe.com/AS3/2006/builtin::apply() at starling.utils::SystemUtil$/executeWhenApplicationIsActive()[/Users/cgascons/workspace/TCGEngine/externals/Starling-Framework-master/starling/src/starling/utils/SystemUtil.as:78] at Function/starling.utils:AssetManager/private:loadRawAsset/starling.utils:complete()[/Users/cgascons/workspace/TCGEngine/externals/Starling-Framework-master/starling/src/starling/utils/AssetManager.as:872] at Function/starling.utils:AssetManager/private:loadRawAsset/starling.utils:onLoaderComplete()[/Users/cgascons/workspace/TCGEngine/externals/Starling-Framework-master/starling/src/starling/utils/AssetManager.as:861] I'm using the latest version of Starling on Github, but until yesterday I was using the 1.4 and I was having the same issue, basically I upgraded the version in order to see if there was something wrong with the "old" version. I'm testing the game with a Galaxy Nexus II (i9250), an Archos 10.1 BitmapDataAgile Board ExportXMLWordPrintableJSON Details Type: Bug Status: Open Priority: Major Resolution: Unresolved Affects Version/s: Adobe Flex SDK 2.0.1 (Release) Fix Version/s: None Component/s: mx: View Stack Labels: None Environment: Affected OS(s): Windows Affected OS(s): Windows XP Language Found: English Description This error occurs as I transition on the view stack. I have no idea what is going on. The stack trace is below. The view stack is contained within a custom component(Canvas) and then that component's parent is the application container. I have done some research on this error and I have gathered that it has something to do with the height and width not being set on a container but I am not sure which container that corresponds to. The application width and height are being resized between view stack transitions. I notice that when the content on the current page causes the application container to be really wide (horizontal scroll bar appears) this error occurs while transitioning out of that page. How do I get around this issue? ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() at mx.effects.effectClasses::MaskEffectInstance/mx.effects.effectClasses: MaskEffectInstance::getVisibleBounds() [C:\dev\flex_201_gmc\sdk\frameworks\mx\effects\effectClasses\MaskEffec tInstance.as:742] at mx.effects.effectClasses::MaskEffectInstance/mx.effects.effectClasses: MaskEffectInstance::initMask() [C:\dev\flex_201_gmc\sdk\frameworks\mx\effects\effectClasses\MaskEffec tInstance.as:624] at mx.effects.effectClasses::MaskEffectInstance/startEffect() [C:\dev\flex_201_gmc\sdk\frameworks\mx\effects\effectClasses\MaskEffec tInstance.as:451] at mx.effects::Effect/play() [C:\dev\flex_201_gmc\sdk\frameworks\mx\effects\Effect.as:763] at mx.effects::EffectManager$