Log in or register to post comments

App Crash without any Error

May 9, 2012 - 4:33am #1

Hi guys!
I made an app based on the Framemarkers sample, it's not too sophisticated. Basically im using some markers to display 3D Objects and some markers to open a weblink. It perfectly works on many devices (different tablets and some mobile phones). Except on one testdevice a HTC Desire with Android 2.2.2
The problem is: I don't get any Errorlog in Eclipse. The app freezes completely and i can't do anything. After quite a long time (maybe 2 minutes) the phone restarts by itself. So the whole OS crashes. I didn't know that this is even possible.
I think that the crash mostly happens when the activity is paused and resumed, but still there should at least be a fatal signal error, or at least an error telling me that the app crashed.

As you can see it's quite hard for me to detect the error as i am not able to get any info about the error and the whole system crashes making it untouchable through programs like adb etc.
I only encountered this problem on this specific phone.

I know it will be hard to tell me anything about this, but maybe someone has a slight clue what could cause this problem.

thanks in advance
Granny

Re: App Crash without any Error

May 10, 2012 - 1:51pm #6

Unfortunately I don't have any tips for this one, we were never able to reproduce it reliably. See this Android thread for some discussion:

http://code.google.com/p/android/issues/detail?id=6478

Some suggestions include only using square power-of-two textures, or calling glFinish() at the end of each frame.

- Kim

Re: App Crash without any Error

May 9, 2012 - 11:35pm #5

Thanks for the info. So can i be sure that this error only arises on specific hardware and is not a programming error made by me? Upgrading is no option because it is a company owned device therefore i am not allowed to update anything so far. But i would be very interested if it would help.

Do you have some more info about this error, especially if this error really is caused by an still existing OpenGL bug? I would be very interested to gather more information as I've never seen this error before and want to know more about it.

Re: App Crash without any Error

May 9, 2012 - 1:33pm #4

Ah, the elusive CPU Pegged crash... I haven't seen this in a long time. It does seem to only happen on older hardware, and is an issue with the OS itself (high-CPU load and/or OpenGL apps seem to trigger it).

I think if you update the phone to Gingerbread the issue should go away.

- Kim

Re: App Crash without any Error

May 9, 2012 - 7:57am #3

I don't really know if it is really supported or not. It seems that it has an older ARM processor as v6, so maybe this is the problem.
Nevertheless: The app runs now from time to time. It seems like it has something to do if the device is connected to my developement machine or not and if the app is installed with eclipse and debugged while running. In addition it only crashes when i am opening a website (through a markerrecognition which triggers an Intent to open the website) and going back to the app. When the app resumes the crash occurs.

At least i get some messages in logcat now which are:
If the app runs then those warnings occur and the app works perfectly fine:

05-09 16:01:09.748: W/dalvikvm(1611): VFY: unable to resolve static method 75: Landroid/hardware/Camera;.getNumberOfCameras ()I
05-09 16:01:09.758: E/dalvikvm(1611): Could not find class 'android.hardware.Camera$CameraInfo', referenced from method com.qualcomm.ar.pl.CameraPreview.getDirection
05-09 16:01:09.768: W/dalvikvm(1611): VFY: unable to resolve new-instance 24 (Landroid/hardware/Camera$CameraInfo;) in Lcom/qualcomm/ar/pl/CameraPreview;
05-09 16:01:09.768: W/dalvikvm(1611): VFY: unable to resolve static method 75: Landroid/hardware/Camera;.getNumberOfCameras ()I
05-09 16:01:09.768: W/dalvikvm(1611): VFY: unable to resolve virtual method 49: Landroid/hardware/Camera$Parameters;.getFocusDistances ([F)V
05-09 16:01:09.768: W/dalvikvm(1611): VFY: unable to resolve static method 78: Landroid/hardware/Camera;.open (I)Landroid/hardware/Camera;
05-09 16:01:09.778: W/dalvikvm(1611): VFY: unable to resolve instance field 0
05-09 16:01:13.208: W/CameraSwitch(1611): open main camera
05-09 16:01:13.208: W/CameraSwitch(1611): no file - can't switch camera
05-09 : W/Camera-JNI: callback on dead camera object

When the app crashes the following logcat appears several times till the phone restarts:
W/SharedBufferStack( 105): waitForCondition(LockCondition) timed out (identity=3, status=0). CPU may be pegged. trying again.

The latter seems to be a problem with OpenGL and buffering bigger amounts of bytes and according to this stackoverflow post it has no relation to an android version but only occurs on specific devices. If so, i think other developers of vuforia should have encountered this problem too.

Conclusion:
My opinion as follows:
The crash may be only on this specific device and may not be supported by the Vuforia SDK. Though the crash seems to be a problem of OpenGL on Android in general and thus should have occured to other developers using the VuforiaSDK (though it has nothing to do with the VuforiaSKD itself).

Re: App Crash without any Error

May 9, 2012 - 5:18am #2

There are strong chances that Device is not compatible with Vuforia SDK.
Check the List of Compatible devices from here

Log in or register to post comments