By info_1
on Tue, 03/19/2013 - 01:34
Vuforia SDK Version: 2.0.30 -
Description with steps to reproduce: Unity project using Vuforia had activity paused in background.
Clicked app icon on home screen to bring to front.
Crashed immediately with following stack trace. Has only happened once so far.
java.lang.NullPointerException
at com.unity3d.player.e.c(Unknown Source)
at com.unity3d.player.UnityPlayer.g(Unknown Source)
at com.unity3d.player.UnityPlayer.windowFocusChanged(Unknown Source)
at com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.onWindowFocusChanged(QCARPlayerSharedActivity.java:350)
at com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity.onWindowFocusChanged(QCARPlayerNativeActivity.java:77)
at mobi.aroha.cariana.ui.AbstractMainMenuScreenActivity.onWindowFocusChanged(AbstractMainMenuScreenActivity.java:1184)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2638)
at android.view.View.dispatchWindowFocusChanged(View.java:7557)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:938)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3013)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method) -
Development OS (Mac OS X, Windows, Linux): Windows -
Mobile OS and Version: 4.1.1 Android -
Mobile Device Manufacturer and Model name: Samsung S3 -
Do the Vuforia Sample Applications show the same behavior?: No
NPE on resume activity
Hi, thanks for reporting the issue;
I see this occurs on Samsung S3; have you tested it on other devices as well ?
NPE on resume activity
No I've only tried on S3. I think I found the problem which was basically the onWindowFocusChanged logic was getting called twice.
NPE on resume activity
Thanks for sharing the solution !