Skip to main content
Participating Frequently
May 18, 2016
Answered

Air 22 beta - App crashes on iOS when I call CameraRoll

  • May 18, 2016
  • 2 replies
  • 1405 views

Hi,

My Air App crash since i update to AIR 22 (beta of 2016/05/11) when i call myCameraRoll.browseForImage() on iPad.

It worked before, so i don't think an example to reproduce it will be useful...

I hoped that crash would be fixed as the CameraUI one, but it not..

Please fix, and forgive my english !

Alexandre.

This topic has been closed for replies.
Correct answer Roshan Chhetri

Is there any workarround ? Not Yet ?

Did you reproduce this issue ?


Hi,

We tried to reproduce the issue in iOS 9.3.1 device but it did not.

Please let us know which version of AIR 22 beta you are using?  Can you try with the latest one : 22.0.0.137 from here: Download Adobe AIR 22 Beta - Adobe Labs

-Roshan

2 replies

Participating Frequently
June 10, 2016

Im having a issue with CameraRoll on Android 6 version (specifically Samsung Galaxy S6 with new Android 6 update installed)

When the photo is selected, the the imagepromise never loads. It worked perfectly before the update.

It also works perfectly on my other devices that dont have Android 6 installed.

I used exactly the same code like here for loading: Uploading images from CameraRoll and CameraUI | Adobe Developer Connection

I also tried to load the promise like this once photo is selected:

var loader = new Loader();
loader
.contentLoaderInfo.addEventListener(Event.COMPLETE, onMediaLoaded );
loader
.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, onError);
loader
.loadFilePromise(imagePromise);

but with exactly the same result.

It not really a AIR 22 specific issue, its also happens for AIR 21.

Is there something else i can try?

Adobe Employee
June 10, 2016

Hi,

This forum is for iOS issue. Please raise your concern in a new forum post. We will look into your concern.

-Roshan

Adobe Employee
May 18, 2016

Hi,

The bug mentioned in the beta release note is for CameraUI and this is about CameraRoll, these are different API's.

Regarding myCameraRoll.browseForImage(), please let us know which version of iOS you are facing this issue? I tried in my iOS 9.3  iPad and it works without issues.

Please try the following code and also let us know the version of iOS you are acing this issue.

package

{

  import flash.media.CameraRoll;

  import flash.media.MediaPromise;

  import flash.media.MediaType;

  import flash.events.MediaEvent;

  import flash.events.Event;

  import flash.display.Loader;

  import flash.display.Sprite;

  import flash.events.IOErrorEvent;

  import flash.display.StageAlign;

  import flash.display.StageScaleMode;

  public class BrowseImage extends Sprite{

  private var mediaSource:CameraRoll = new CameraRoll();

  public function BrowseImage() {

  this.stage.align = StageAlign.TOP_LEFT;

  this.stage.scaleMode = StageScaleMode.NO_SCALE;

  if( CameraRoll.supportsBrowseForImage )

  {

  log( "Browsing for image..." );

  mediaSource.addEventListener( MediaEvent.SELECT, imageSelected );

  mediaSource.addEventListener( Event.CANCEL, browseCanceled );

  mediaSource.browseForImage();

  }

  else

  {

  log( "Browsing in camera roll is not supported.");

  }

  }

  private var imageLoader:Loader;

  private function imageSelected( event:MediaEvent ):void

  {

  log( "Image selected..." );

  var imagePromise:MediaPromise = event.data;

  imageLoader = new Loader();

  if( imagePromise.isAsync )

  {

  log( "Asynchronous media promise." );

  imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, imageLoaded );

  imageLoader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, imageLoadFailed );

  imageLoader.loadFilePromise( imagePromise );

  }

  else

  {

  log( "Synchronous media promise." );

  imageLoader.loadFilePromise( imagePromise );

  this.addChild( imageLoader );

  }

  }

  private function browseCanceled( event:Event ):void

  {

  log( "Image browse canceled." );

  }

  private function imageLoaded( event:Event ):void

  {

  log( "Image loaded asynchronously." );

  this.addChild( imageLoader );

  }

  private function imageLoadFailed( event:Event ):void

  {

  log( "Image load failed." );

  }

  private function log( text:String ):void

  {

  trace( text );

  }

  }

}

abais_frAuthor
Participating Frequently
May 18, 2016

Hi Roshan,

Same issue with your script, the app crash, i can only see the trace "Browsing for image..."

I test on iOs 8.3 (iPad 3) and iOs 9.3.1 (iPad Mini 2).

It's not crashing during the "browseForImage()" instruction, cause if i put a trace just after, i see it, so, i guess it crash asynchronously, some millisecond after it.

My iOS crash report won't be usefull since it begin by :

Exception Type:  EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note:  EXC_CORPSE_NOTIFY

Triggered by Thread:  0

(...)

abais_frAuthor
Participating Frequently
May 23, 2016

Is there any workarround ? Not Yet ?

Did you reproduce this issue ?