Skip to main content
Known Participant
February 23, 2018
Question

Adobe AIR Application crashes when trying to import around 700 high resolution images

  • February 23, 2018
  • 1 reply
  • 723 views

Hi,

I am trying to import more than 700 high resolution images in my Adobe AIR app. I am using flash builder 4.6 for development, and while debugging it works fine. The application seems to crash when a release build(.air or .exe or .dmg file) is made and run after installation.

Below is my code for importing images.

public function ImportImages(event:*):void

{

     var file:File = File.userDirectory;

     file.browseForOpenMultiple("Select Images",[MgrYSIPath.imageFlter]);

     file.addEventListener(FileListEvent.SELECT_MULTIPLE,saveImportImage);

     file.addEventListener(Event.CANCEL, cancelExport);

}

private function saveImportImage(event:FileListEvent):void

{

     setRank();

     SaveImageFiles(event.files);

}

private var tm:Number = 0;

private var ImgOperation:LBImportImageOperation;

private function SaveImageFiles(files:Array):void

{

     tm = getTimer();

     TBLImages_DAO.Instance.tempList.removeAll();

     ImgOperation = new LBImportImageOperation();

     //ImgOperation.SaveImportFilesFromNewJob(Rank,files,SaveCompliteHandler);

     ImgOperation.SaveImportFilesFromNewJob(Rank,files,SaveCompliteImportHandler);

     ImgOperation=null;

}

I am clueless about how to troubleshot this issue as it works fine in debugger and crashes in app.

Please help!!

Thanks in advance

This topic has been closed for replies.

1 reply

Inspiring
February 23, 2018

In what case would you need to load 700 images? Could it be that you are going at this the wrong way to start with? I have an app that does something similar with around 200 000 images but it only loads the ones I need to display. In your case I would store the reference of those 700 files, then only load them when they show up on screen.

Yes AIR on desktop has memory limits that can cause crashes and in your case you might very well run into that.

Known Participant
February 23, 2018

Your question is right. The application is importing more than 700 images and converting them into low resolution and mid resolution images that would be used to display the thumbnails. The actual images can be referenced later when needed.

The strange thing is that when I am importing a directory which consists of more than 700 images, the application works fine. But when selecting 700 images by multiple files select app crashes.