Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
t_rich
Posts: 8
Registered: ‎06-23-2012
My Device: PlayBook

Native Camera crashes AIR app

Hello community,

 

This is my first post here and I really hope somebody can help me with a problem her causing me a lot of headaches at the moment,

 

I'm curently developping a multi platform app (BB TabletOS , iOS , Android) which makes use of the native camera app of the OS.

 

This did work very well so far, but something (either the last TabletOS Update or moving to Flex 4.6 SDK) partially broke cam-support on PlayBook

 

Starting the Camera app now has a 75% chance of crashing.

25% of the time it just work's fine.

 

Most of the time, the Camera app just opens with a black screen and then freezes. Both, camera-app and my host app seem to crash (though I could possibly prevent the AIR crash by setting some sort of time-out, I guess, but I really would prefer to have it back working normally again.)

 

Has anybody encountered this behavior before? Any guesses what might cause it? Or even better, is there a solution?

 

Many thanks in advance,

 

timm

 

P.S. I can give some code snippets, if necessary.... but as its working perfectly on iOS and Android, I think it might probably be O.K.

For the moment I just post the first few lines, indication the method I'm using ....

 

if (CameraUI.isSupported)
{
camUI = new CameraUI();
camUI.addEventListener(MediaEvent.COMPLETE, onComplete);
camUI.launch(MediaType.IMAGE);
}

 

Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: Native Camera crashes AIR app

Have a look at the code for this test suite. - https://github.com/cantrell/AIRBench

 

All tests seem to run and pass 100% of the time for me.

 

Regards,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
New Contributor
t_rich
Posts: 8
Registered: ‎06-23-2012
My Device: PlayBook

Re: Native Camera crashes AIR app

Thanks for posting this.

 

Hmmm.... if the error is NOT in the AIR Camera component and NOT in the native API ...

...might it be a "running-out-off-memory" kind of thing ?

 

My app is quite heavy on memory-usage, but profiling shows an average of about 160 MB ... shouldn't be a problem ???

 

BTW: Is this tested against AIR SDK 4.6? It states to be working with v4.5 ....

 

Many Thanks,

 

Timm

 

Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: Native Camera crashes AIR app

Yes it works for 4.6. 

 

Go to settings > about > hardware to view how much free memory your PlayBook has. There is no max of memory usage for an application but if the system runs out, it will terminate an application. I'm not sure how it decides which. 

 

When running in debug mode do you get any errors?

 

Cheers,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/