Flex - Error #2015: Invalid BitmapData -
i need on this, have no idea how fix it! :/
got problem here.
my application working fine on computer, both offline , online (flash uploaded our webservers). works fine in both ie , firefox.
however, user have problem running in ie, while firefox still ok..
the app works, error comes when trying buffer frames bitmapdata.
so, in firefox, works great. in ie (on computer) works great. in ie (on other computers) not work, , error cast. happens right @ end, means works fine until last time function run. (it's run allow updating progressbar. if set loop 180 freezes untill completed. thats why 10 , 10.)
any regarding great, i'm stuck here... i've traced size of bitmapdata, , @ time of error it's 1920x1080, it's supposed be.
this code fails:
fpsoswfbuffer = new bitmapdata(fpsomc.width, fpsomc.height, false, 0x00ff0000); and whole function code located:
public function bufferfpsoimages(evt:timerevent):void{ (var i:int = 0; i<10; i++){ fpsomc.gotoandstop(currentfpsoframe); fpsoswfbuffer = new bitmapdata(fpsomc.width, fpsomc.height, false, 0x00ff0000); fpsoswfbuffer.draw(fpsomc); fpsoimgarray[currentfpsoframe] = fpsoswfbuffer; currentfpsoframe++; } if (currentfpsoframe <= (totimg360-10)){ // still buffering frames // myloadingpanel.setbufferprog(currentfpsoframe); var fpsotimer:timer = new timer(1,1); fpsotimer.addeventlistener(timerevent.timer_complete, bufferfpsoimages); fpsotimer.start(); }else{ // frames buffered // currentfpsoframe = 0; fpsoloaded = true; fpsoloading = false; ncfpso.removeelement(myloadingpanel); myloadingpanel = null; var fpsobitmap:bitmap = new bitmap(fpsoimgarray[0]); fpsobitmap.smoothing = true; fpsoimage.source = fpsobitmap; } } edit: i've added debugging functions now, able know fails. (as works during debugging, need debug realtime version online).
this get:
errorid=2015 errormessage=error #2015 errorpos=fpsoswfbuffer = new bitmapdata(1920, 1080, false, 0x00ff0000); currentfpsoframe=168 position in loop=8 edit2: , here error message got inside of flash builder. it's crashing here too.. =/
argumenterror: error #2015: invalid bitmapdata. @ flash.display::bitmapdata/ctor() @ flash.display::bitmapdata() @ main/buffertemplateimages()[e:\workspace - flash builder\vcog workspace\vcog communicator 3.0\src\main.mxml:461] @ flash.events::eventdispatcher/dispatcheventfunction() @ flash.events::eventdispatcher/dispatchevent() @ flash.utils::timer/tick()
your buffering 1.5gb of memory? flash keeps requesting memory os until os can't give anymore. if works on computer, not others, maybe computers running lot of other program requesting memory , can't supply enough memory project. other thing check is, version of os using 32bit windows can see max of 2gb of memory. although theory. maybe try , compress images first limit memory usage.
Comments
Post a Comment