Closed pgorrow closed 10 years ago
A quick test of the fork created by rough cookie (https://github.com/roughcookie/crittercism-unity-android) shows that his version has no issues sending exceptions to Crittercism. It appears he is using an older version of the crittercism library and has made some code changes but it might be an interesting place to look for possible issues. Since the new version is logging the Unhandled Exception Logged message I don't believe its the initialization race issue -- but something else.
Hi there,
In case it helps, the two issues we addressed in the rough-cookie fork that might be relevant were:
We've not been using Crittercism or Android for about a year now, though, so I'm not up to date on whether these issues may have been addressed. Regards,
Andy
On 13 Feb 2014, at 03:50, Phil Gorrow notifications@github.com wrote:
Items to include in a ticket: Source of the issue (who reported it): pgorrow (at) wgtmedia.com Version of Unity effected: Tested on both Unity Pro 4.3.2 and 4.3.4 Version of iOS/Android/etc effected: Nexus 7 running 4.3
Version of XCode/Eclipse/Android API: adt-bundle-mac-x86_64-20131030 Date discovered (versus date filed): February 11, 2014
Steps to repeat:
- Git clone current crittercism-unity-android repository
- Load TestAndroid project in unity
- Update Plugins/res/values/strings to use your test app id
- Load Crittercism and point at Live Stats for your test app id
- Connect and build to android device
- Note: once app is transferred to device/executes Live Stats App Loads increments
- Press any of the exception inducing buttons
Expected: Viewed on crittercism either exceptions or crashes would increase and switching to the handled exceptions or crashes pane would provide information on crash
Actual: Exception count and crash count do not increase -- crittercism does not see the crash.
Viewed in charles: I can see crittercism sending the app load, and performance messages, but can not see it sending crash information.
Kill and restart app (in case android is a platform that sends bug on next restart) Expected: Viewed on crittercism either exceptions or crashes would increase and switching to the handled exceptions or crashes pane would provide information on crash
Actual: Exception count and crash count do not increase -- crittercism does not see the crash.
Viewed in charles: crittercism does not send exception information for the exception.
Relavent Log Info: First init: W/WindowManager( 510): Force-removing child win Window{424b3d38 u0 SurfaceView} from container Window{424af850 u0 com.crittercism.testAndroid/com.unity3d.player.UnityPlayerNativeActivity} I/ActivityManager( 510): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.crittercism.testAndroid/com.unity3d.player.UnityPlayerProxyActivity} from pid 23565 I/ActivityManager( 510): Start proc com.crittercism.testAndroid for activity com.crittercism.testAndroid/com.unity3d.player.UnityPlayerProxyActivity: pid=23586 uid=10079 gids={50079, 3003, 1015, 1028} W/CrittercismAndroid(23586): Attempting to initialize Crittercism W/CrittercismAndroid(23586): Package: com.crittercism.testAndroid W/CrittercismAndroid(23586): Config was successfully set W/CrittercismAndroid(23586): AppID: 52fab100558d6a0e73000007 I/CrittercismInstance(23586): Initializing Crittercism... I/ActivityManager( 510): START u0 {flg=0x10000 cmp=com.crittercism.testAndroid/com.unity3d.player.UnityPlayerNativeActivity} from pid 23586 I/Crittercism(23586): Enabling OPTMZ
Unity init: W/CrittercismAndroid(23586): Config was successfully set W/CrittercismAndroid(23586): Beginning Initialization W/CrittercismAndroid(23586): Already initialized I/Unity (23586): CrittercismAndroidUnity: Registered
Exception log entries: W/CrittercismAndroid(23586): CrittercismTestGUI.OnGUI () (at /Users/pgorrow/Crittercism/crittercism-unity-android/TestAndroid/Assets/Plugins/Crittercism_Android_Scripts/CrittercismTestGUI.cs:18) W/CrittercismAndroid(23586): Unandled Exception Logged I/Unity (23586): NullReferenceException: Object reference not set to an instance of an object I/Unity (23586): at CrittercismTestGUI.OnGUI () [0x0004f] in /Users/pgorrow/Crittercism/crittercism-unity-android/TestAndroid/Assets/Plugins/Crittercism_Android_Scripts/CrittercismTestGUI.cs:18 I/Unity (23586):
I/Unity (23586): (Filename: /Users/pgorrow/Crittercism/crittercism-unity-android/TestAndroid/Assets/Plugins/Crittercism_Android_Scripts/CrittercismTestGUI.cs Line: 18) I/Unity (23586):
Please note that the Unandled Exception Logged message is sent to the log after the crittercism unity plugin calls:
''' public static void LogUnhandledException(String name, String reason, String callStack) { if(!mIsInited || reason == null || name == null) { return; }
Exception ex = _CreateException("Unhandled Exception", reason, callStack); Crittercism.logHandledException(ex); CLog("Unhandled Exception Logged");
} '''
So the exception is being passed to the Crittercism android library. I have verified that it is being caught in _OnDebugLogCallbackHandler, sent to LogUnhandledException and passed through to Crittercism.logHandledException. However from watching the device in charles, no exception seems to be sent to Crittercism.
— Reply to this email directly or view it on GitHub.
@andy-block Thanks for following up on this. We're working to incorporate these fixes into the master branch now and if you have reproduction steps for the race condition that might help us determine a best case solution to resolve it.
@pgorrow we'll also be incorporating the bug fixes to the stack trace handling as well.
Thanks!
I'm afraid I don't recall the repro steps required for this it's some time ago now. Sorry I can't be more use. Regards,
Andy
On 11 Mar 2014, at 22:34, Edward Freeman notifications@github.com wrote:
@andy-block Thanks for following up on this. We're working to incorporate these fixes into the master branch now and if you have reproduction steps for the race condition that might help us determine a best case solution to resolve it.
@pgorrow we'll also be incorporating the bug fixes to the stack trace handling as well.
Thanks!
— Reply to this email directly or view it on GitHub.
@pgorrow One question I would have for this scenario is this happens on a fresh load of the app and no exceptions are captured? or has at least one exception been captured and then you don't see any after that?
In the latter case, this is likely due to the automatic throttling for Handled Exceptions in our Java Library.
@andy-block that's okay, thanks! :)
@NinjaSudo No exceptions are captured. I don't think throttling is the issue.
Oops, looks like this issue wasn't closed, but this should be resolved in the latest version.
Items to include in a ticket: Source of the issue (who reported it): pgorrow (at) wgtmedia.com Version of Unity effected: Tested on both Unity Pro 4.3.2 and 4.3.4 Version of iOS/Android/etc effected: Nexus 7 running 4.3
Version of XCode/Eclipse/Android API: adt-bundle-mac-x86_64-20131030 Date discovered (versus date filed): February 11, 2014
Steps to repeat:
Expected: Viewed on crittercism either exceptions or crashes would increase and switching to the handled exceptions or crashes pane would provide information on crash
Actual: Exception count and crash count do not increase -- crittercism does not see the crash.
Viewed in charles: I can see crittercism sending the app load, and performance messages, but can not see it sending crash information.
Expected: Viewed on crittercism either exceptions or crashes would increase and switching to the handled exceptions or crashes pane would provide information on crash
Actual: Exception count and crash count do not increase -- crittercism does not see the crash.
Viewed in charles: crittercism does not send exception information for the exception.
Relavent Log Info:
First init: W/WindowManager( 510): Force-removing child win Window{424b3d38 u0 SurfaceView} from container Window{424af850 u0 com.crittercism.testAndroid/com.unity3d.player.UnityPlayerNativeActivity} I/ActivityManager( 510): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.crittercism.testAndroid/com.unity3d.player.UnityPlayerProxyActivity} from pid 23565 I/ActivityManager( 510): Start proc com.crittercism.testAndroid for activity com.crittercism.testAndroid/com.unity3d.player.UnityPlayerProxyActivity: pid=23586 uid=10079 gids={50079, 3003, 1015, 1028} W/CrittercismAndroid(23586): Attempting to initialize Crittercism W/CrittercismAndroid(23586): Package: com.crittercism.testAndroid W/CrittercismAndroid(23586): Config was successfully set W/CrittercismAndroid(23586): AppID: 52fab100558d6a0e73000007 I/CrittercismInstance(23586): Initializing Crittercism... I/ActivityManager( 510): START u0 {flg=0x10000 cmp=com.crittercism.testAndroid/com.unity3d.player.UnityPlayerNativeActivity} from pid 23586 I/Crittercism(23586): Enabling OPTMZ
Unity init: W/CrittercismAndroid(23586): Config was successfully set W/CrittercismAndroid(23586): Beginning Initialization W/CrittercismAndroid(23586): Already initialized I/Unity (23586): CrittercismAndroidUnity: Registered
Exception log entries: W/CrittercismAndroid(23586): CrittercismTestGUI.OnGUI () (at /Users/pgorrow/Crittercism/crittercism-unity-android/TestAndroid/Assets/Plugins/Crittercism_Android_Scripts/CrittercismTestGUI.cs:18) W/CrittercismAndroid(23586): Unandled Exception Logged I/Unity (23586): NullReferenceException: Object reference not set to an instance of an object I/Unity (23586): at CrittercismTestGUI.OnGUI () [0x0004f] in /Users/pgorrow/Crittercism/crittercism-unity-android/TestAndroid/Assets/Plugins/Crittercism_Android_Scripts/CrittercismTestGUI.cs:18 I/Unity (23586):
I/Unity (23586): (Filename: /Users/pgorrow/Crittercism/crittercism-unity-android/TestAndroid/Assets/Plugins/Crittercism_Android_Scripts/CrittercismTestGUI.cs Line: 18) I/Unity (23586):
Please note that the Unandled Exception Logged message is sent to the log after the crittercism unity plugin calls:
So the exception is being passed to the Crittercism android library. I have verified that it is being caught in _OnDebugLogCallbackHandler, sent to LogUnhandledException and passed through to Crittercism.logHandledException. However from watching the device in charles, no exception seems to be sent to Crittercism.