Skip to main content
Inspiring
November 1, 2012
Question

Debug AIR in IOS

  • November 1, 2012
  • 2 replies
  • 894 views

My App crashes with the cause being EXC_BAD_ACCESS (SIGSEGV).  Nothing comes across in the AIR debugger, this is when I attach my device to mac and get the logs into XCODE.  According to what I have read, you will get EXC_BAD_ACCESS in 3 cases:


  1. An object is not initialized

  2. An object is already released


    Since I cannot see any issue in AIR debugger, I am not quite sure where to start.  My APP is about 95% ready to be published but cannot seem to get any leads on what is causing this or whether or not it is the runtime itself.  My app works great on Android.  Not even sure where to start.

This topic has been closed for replies.

2 replies

Legend
November 5, 2012

Are you using any custom compiler args and / or metadata?

I experienced something similar when compiling a project that used Swiz framework and omitted the -keep-as3-metadata tag from one of my libraries. For some reason, Android and the simulator could recover and run ok, but I ran into problems with iOS.

G

mola2alexAuthor
Inspiring
November 6, 2012

no custom compiler args or metadata that I know of.  Compiling with Flash CS6.  I have been trying everything to figuire this out and think I have narrowed it down to bitmap.draw.  It seems when I combine a native extension UI call to take a high res screen shot on my ipad3, it dies.  It doesn't die on the first attempt but typically the second.  I have tried nulling the bitmapdata and the dispose function but still seems to crash it.  Commenting out the below makes it run (but also doesn't do what it needs to):

var cameraroll:CameraRoll = new CameraRoll(); 

var bitmap_data:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight); 

bitmap_data.draw(stage);

cameraroll.addBitmapData(bitmap_data);

I guess it is crashing thread 0.  Happens the most when I combine the taking of the image with a native UI extension, for example, I use a native text input dialog to put a name at the top of the screen.  When the text input dialog calls the screenshot function, it only works a couple times before crashing.  Android seems to tolerate this a bit more.  Maybe I could use a 'worker' on another thread to resolve but haven't figured that out yet.