06-08-2011 07:46 AM
My app often (but not always) crashes/shuts down when I switch out of it. I get a DEACTIVATE event and then the app just closes down without any sort of exception or error.
The app consists of a number of qnx.ui.display.Image instances as well as some mp3 files. I don't seem to be getting any low memory events and the app works fine as long as I don't try to switch out of it. I have an ENTER_FRAME event handler which does some animation.
If I attach a debugger, it just says the debugging session ended without any other output. Has anyone seen similar behavior in their app?
Thomas
06-08-2011 08:17 AM
06-18-2011 06:30 AM
Well, I tore everything out and it still crashes. So I tried making a new project with just one Image. Still crashes as soon as I try to switch out of the app. I've narrowed it down to the following:
package {
import flash.display.Sprite;
import qnx.ui.display.Image;
public class Main extends Sprite {
public function Main():void {
super();
var fooImage:Image = new Image();
fooImage.setImage("image.png");
addChild(fooImage);
}
}
}
I've uploaded the code, assets and FlashDevelop project here in case anyone wants to have a look:
http://www.itu.dk/~tnjr/MP3Test.zip
I don't get it. Either I'm doing something very wrong, or the qnx Image class is broken. I'm usually very hesitant to blame the platform sdks, but there's not a lot of room for bugs in the above code. ![]()
Thomas
06-18-2011 07:39 AM
Kudos for taking the time to strip it down to bare essentials. If everyone around here did that, our jobs would be a lot easier!
Unfortunately, after throwing in a stray PNG (489x309) and building, putting my tablet into Paused mode instead of Default, then repeatedly bottom-swiping to minimize and tapping the app to full-screen it again, at least 50 times, I get no sign of trouble.
Here are my build commands. You could do the same manually at the command line and see whether that changes anything. I'm using SDK 1.0.1: maybe check that you're not inadvertently stuck on an older one.
amxmlc -debug -output ThomasRiisbjerg.swf ThomasRiisbjerg.as blackberry-airpackager -package -devMode -target bar ThomasRiisbjerg.bar application.xml
blackberry-tablet.xml ThomasRiisbjerg.swf image.png blackberry-deploy -installApp -launchApp -device PBIP -password PBPASS -package ThomasRiisbjerg.bar
06-18-2011 01:20 PM
Just notice you have void as a return type on the constructor, dont know if it matters as thats what constructors basically do anyhoo, but they're not allows to specify a return type.
Also I doubt very much it's the qnx class as I feel it would have been spotted before now, create a complete new project with the qnx class and without the class.
07-01-2011 04:20 PM
Just a quick follow-up. My app no longer crashes in 1.0.6. It also turns out that RIM disabled GPU rendering in 1.0.6. We'll see if the crashes return if/when they re-enable GPU rendering.
*shrug*
Thanks for all the suggestions so far!