Crash on HTC

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Crash on HTC

Jonathan Chapman
I've developed a large application that runs fine on a Samsung Galaxy Nexus, Asus Tablet, and Acer Tablet with no crashes.  However, on a HTC One X if I take a screenshot (Holding power and volume down) then leave my application and come back, the application will crash.  I'm not sure where the bug lies.  Can someone help me out.

Thanks,
Jonathan

Below is the stack trace that is produced.

06-15 09:41:01.891 I/PowerManagerService-JNI(  421): [Stability] PowerManagerService_userActivity JNI pass power key event to PowerManagerService userActivity()
06-15 09:41:02.571 I/PowerManagerService-JNI(  421): [Stability] PowerManagerService_userActivity JNI pass power key event to PowerManagerService userActivity()
06-15 09:41:04.764 D/WifiStateMachine(  421): fetchRssiAndLinkSpeedNative RSSI = -48
06-15 09:41:05.154 I/PowerManagerService-JNI(  421): [Stability] PowerManagerService_userActivity JNI pass power key event to PowerManagerService userActivity()
06-15 09:41:05.254 D/PhoneStatusBarPolicy(  584): silentresetvalue = 0, mTimerEnabled = false
06-15 09:41:05.254 D/PhoneStatusBarPolicy(  584): updateSignalStrength(), in service, remove timer
06-15 09:41:05.254 D/PhoneStatusBarPolicy(  584): isCdma():false hasService:true mSimState=UNKNOWN gprsState=0 mDataState=-1 dataActivity=0 mPhone.htcModemLinkOn:false hspa==true
06-15 09:41:05.254 D/PhoneStatusBarPolicy(  584): updateDataIcon(), silentresetvalue = 0, mTimerEnabled = false
06-15 09:41:05.254 D/AirWatch( 1854): Capturing signal state change
06-15 09:41:05.254 D/PhoneStatusBarPolicy(  584): updateDataIcon(), in data service, do nothing
06-15 09:41:05.805 I/FxActivity(  584): FxActivity.onPause()
06-15 09:41:05.895 D/dalvikvm(11629): Late-enabling CheckJNI
06-15 09:41:05.905 D/ViewRootImpl(  421): @@@- disable SystemServer HW acceleration
06-15 09:41:05.915 I/ActivityManager(  421): Start proc com.apexsi.apexware for activity com.apexsi.apexware/.workorders.WorkOrderEditActivity: pid=11629 uid=10189 gids={1006, 1015, 3002, 3001, 3003}
06-15 09:41:05.975 D/memalloc(  185): ion: Allocated buffer base:0x4487b000 size:3768320 fd:90
06-15 09:41:05.975 D/memalloc(  421): ion: Mapped buffer base:0x5a999000 size:3768320 offset:0 fd:340
06-15 09:41:05.985 W/NetworkManagementSocketTagger(  421): setKernelCountSet(10189, 1) failed with errno -13
06-15 09:41:05.985 D/ConnectivityService(  421): onUidRulesChanged(uid=10189, uidRules=0)
06-15 09:41:06.005 D/memalloc(  584): ion: Unmapping buffer  base:0x54cad000 size:3768320
06-15 09:41:06.005 D/memalloc(  584): ion: Unmapping buffer  base:0x55644000 size:3768320
06-15 09:41:06.005 D/memalloc(  584): ion: Unmapping buffer  base:0x561fa000 size:3768320
06-15 09:41:06.005 D/memalloc(  185): ion: Freeing buffer base:0x444e3000 size:3768320 fd:63
06-15 09:41:06.005 D/memalloc(  185): ion: Unmapping buffer  base:0x444e3000 size:3768320
06-15 09:41:06.005 D/memalloc(  185): ion: Freeing buffer base:0x453ae000 size:3768320 fd:71
06-15 09:41:06.005 D/memalloc(  185): ion: Unmapping buffer  base:0x453ae000 size:3768320
06-15 09:41:06.005 D/memalloc(  584): ion: Unmapping buffer  base:0x56592000 size:3768320
06-15 09:41:06.025 E/HDMIDaemon(  229): mAcceptedConnection 13
06-15 09:41:06.035 E/HDMIDaemon(  229): mAcceptedConnection 13
06-15 09:41:06.045 I/ActivityThread(11629): Pub com.apexsi.apexware.__mono_init__: mono.MonoRuntimeProvider
06-15 09:41:06.045 D/dalvikvm(11629): Trying to load lib /data/data/com.apexsi.apexware/lib/libmonodroid.so 0x40d61138
06-15 09:41:06.045 D/dalvikvm(11629): Added shared lib /data/data/com.apexsi.apexware/lib/libmonodroid.so 0x40d61138
06-15 09:41:06.055 E/mono    (11629): WARNING: The runtime version supported by this application is unavailable.
06-15 09:41:06.055 E/mono    (11629): Using default runtime: v2.0.50727
06-15 09:41:06.085 I/monodroid-gc(11629): environment supports jni NewWeakGlobalRef
06-15 09:41:06.095 W/monodroid-gc(11629): GREF GC Threshold: 46800
06-15 09:41:06.535 D/memalloc(  185): ion: Freeing buffer base:0x45e52000 size:3768320 fd:76
06-15 09:41:06.535 D/memalloc(  185): ion: Unmapping buffer  base:0x45e52000 size:3768320
06-15 09:41:06.535 D/memalloc(  185): ion: Freeing buffer base:0x440d6000 size:3768320 fd:34
06-15 09:41:06.535 D/memalloc(  185): ion: Unmapping buffer  base:0x440d6000 size:3768320
06-15 09:41:06.846 I/MonoDroid(11629): UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
06-15 09:41:06.846 I/MonoDroid(11629): at ApexSI.ApexWare.BusinessObjects.FieldService.WorkOrders.Status.Load () <0x0007c>
06-15 09:41:06.846 I/MonoDroid(11629): at com.apexsi.apexware.WorkOrders.WorkOrderDetailsFragment.OnCreate (Android.OS.Bundle) <0x00057>
06-15 09:41:06.846 I/MonoDroid(11629): at Android.App.Fragment.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00057>
06-15 09:41:06.846 I/MonoDroid(11629): at (wrapper dynamic-method) object.b3a5e586-8289-4533-a727-3b489f1703d0 (intptr,intptr,intptr) <0x00033>
06-15 09:41:06.866 W/dalvikvm(11629): JNI WARNING: JNI method called with exception pending
06-15 09:41:06.866 W/dalvikvm(11629):              in Lcom/apexsi/apexware/workorders/WorkOrderDetailsFragment;.n_onCreate:(Landroid/os/Bundle;)V (GetStaticMethodID)
06-15 09:41:06.866 W/dalvikvm(11629): Pending exception is:
06-15 09:41:06.866 I/dalvikvm(11629): java.lang.Throwable: System.NullReferenceException: Object reference not set to an instance of an object
06-15 09:41:06.866 I/dalvikvm(11629): at ApexSI.ApexWare.BusinessObjects.FieldService.WorkOrders.Status.Load () <0x0007c>
06-15 09:41:06.866 I/dalvikvm(11629): at com.apexsi.apexware.WorkOrders.WorkOrderDetailsFragment.OnCreate (Android.OS.Bundle) <0x00057>
06-15 09:41:06.866 I/dalvikvm(11629): at Android.App.Fragment.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00057>
06-15 09:41:06.866 I/dalvikvm(11629): at (wrapper dynamic-method) object.b3a5e586-8289-4533-a727-3b489f1703d0 (intptr,intptr,intptr) <0x00033>
06-15 09:41:06.866 I/dalvikvm(11629): at com.apexsi.apexware.workorders.WorkOrderDetailsFragment.n_onCreate(Native Method)
06-15 09:41:06.876 I/dalvikvm(11629): at com.apexsi.apexware.workorders.WorkOrderDetailsFragment.onCreate(WorkOrderDetailsFragment.java:34)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:797)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1012)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.Activity.onCreateView(Activity.java:4330)
06-15 09:41:06.876 I/dalvikvm(11629): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
06-15 09:41:06.876 I/dalvikvm(11629): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
06-15 09:41:06.876 I/dalvikvm(11629): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
06-15 09:41:06.876 I/dalvikvm(11629): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
06-15 09:41:06.876 I/dalvikvm(11629): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
06-15 09:41:06.876 I/dalvikvm(11629): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.Activity.setContentView(Activity.java:1892)
06-15 09:41:06.876 I/dalvikvm(11629): at com.apexsi.apexware.workorders.WorkOrderEditActivity.n_onCreate(Native Method)
06-15 09:41:06.876 I/dalvikvm(11629): at com.apexsi.apexware.workorders.WorkOrderEditActivity.onCreate(WorkOrderEditActivity.java:36)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.Activity.performCreate(Activity.java:4538)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2240)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.ActivityThread.access$600(ActivityThread.java:139)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
06-15 09:41:06.876 I/dalvikvm(11629): at android.os.Handler.dispatchMessage(Handler.java:99)
06-15 09:41:06.876 I/dalvikvm(11629): at android.os.Looper.loop(Looper.java:154)
06-15 09:41:06.876 I/dalvikvm(11629): at android.app.ActivityThread.main(ActivityThread.java:4977)
06-15 09:41:06.876 I/dalvikvm(11629): at java.lang.reflect.Method.invokeNative(Native Method)
06-15 09:41:06.876 I/dalvikvm(11629): at java.lang.reflect.Method.invoke(Method.java:511)
06-15 09:41:06.876 I/dalvikvm(11629): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-15 09:41:06.876 I/dalvikvm(11629): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-15 09:41:06.876 I/dalvikvm(11629): at dalvik.system.NativeStart.main(Native Method)
06-15 09:41:06.876 I/dalvikvm(11629): "main" prio=5 tid=1 NATIVE
06-15 09:41:06.876 I/dalvikvm(11629):   | group="main" sCount=0 dsCount=0 obj=0x40a90c70 self=0x272d20
06-15 09:41:06.876 I/dalvikvm(11629):   | sysTid=11629 nice=0 sched=0/0 cgrp=default handle=1074099480
06-15 09:41:06.876 I/dalvikvm(11629):   | schedstat=( 0 0 0 ) utm=69 stm=9 core=1
06-15 09:41:06.876 I/dalvikvm(11629):   at com.apexsi.apexware.workorders.WorkOrderDetailsFragment.n_onCreate(Native Method)
06-15 09:41:06.876 I/dalvikvm(11629):   at com.apexsi.apexware.workorders.WorkOrderDetailsFragment.onCreate(WorkOrderDetailsFragment.java:34)
06-15 09:41:06.876 I/dalvikvm(11629):   at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:797)
06-15 09:41:06.876 I/dalvikvm(11629):   at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1012)
06-15 09:41:06.876 I/dalvikvm(11629):   at android.app.Activity.onCreateView(Activity.java:4330)
06-15 09:41:06.876 I/dalvikvm(11629):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
06-15 09:41:06.876 I/dalvikvm(11629):   at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
06-15 09:41:06.876 I/dalvikvm(11629):   at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
06-15 09:41:06.886 I/dalvikvm(11629):   at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.Activity.setContentView(Activity.java:1892)
06-15 09:41:06.886 I/dalvikvm(11629):   at com.apexsi.apexware.workorders.WorkOrderEditActivity.n_onCreate(Native Method)
06-15 09:41:06.886 I/dalvikvm(11629):   at com.apexsi.apexware.workorders.WorkOrderEditActivity.onCreate(WorkOrderEditActivity.java:36)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.Activity.performCreate(Activity.java:4538)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2240)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.ActivityThread.access$600(ActivityThread.java:139)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.os.Handler.dispatchMessage(Handler.java:99)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.os.Looper.loop(Looper.java:154)
06-15 09:41:06.886 I/dalvikvm(11629):   at android.app.ActivityThread.main(ActivityThread.java:4977)
06-15 09:41:06.886 I/dalvikvm(11629):   at java.lang.reflect.Method.invokeNative(Native Method)
06-15 09:41:06.886 I/dalvikvm(11629):   at java.lang.reflect.Method.invoke(Method.java:511)
06-15 09:41:06.886 I/dalvikvm(11629):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-15 09:41:06.886 I/dalvikvm(11629):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-15 09:41:06.886 I/dalvikvm(11629):   at dalvik.system.NativeStart.main(Native Method)
06-15 09:41:06.886 I/dalvikvm(11629):
06-15 09:41:06.886 E/dalvikvm(11629): VM aborting
06-15 09:41:06.886 I/mono    (11629): Stacktrace:
06-15 09:41:06.886 I/mono    (11629):
06-15 09:41:06.886 I/mono    (11629):   at (wrapper delegate-invoke) <Module>.invoke_intptr__this___intptr_intptr_string_string (intptr,intptr,string,string) <0xffffffff>
06-15 09:41:06.886 I/mono    (11629):   at Android.Runtime.JNIEnv.GetStaticMethodID (intptr,string,string) <0x00053>
06-15 09:41:06.886 I/mono    (11629):   at Android.Util.Log.Verbose (string,string) <0x0005b>
06-15 09:41:06.886 I/mono    (11629):   at ApexSI.ApexWare.BusinessObjects.Log.LogError (string) <0x00027>
06-15 09:41:06.886 I/mono    (11629):   at com.apexsi.apexware.WorkOrders.WorkOrderEditActivity.OnCreate (Android.OS.Bundle) <0x00af3>
06-15 09:41:06.886 I/mono    (11629):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00057>
06-15 09:41:06.886 I/mono    (11629):   at (wrapper dynamic-method) object.23a6127e-f2b1-4ea9-95cf-2be1beb39cf7 (intptr,intptr,intptr) <0x00033>
06-15 09:41:06.886 I/mono    (11629):   at (wrapper native-to-managed) object.23a6127e-f2b1-4ea9-95cf-2be1beb39cf7 (intptr,intptr,intptr) <0xffffffff>
06-15 09:41:06.906 E/HDMIDaemon(  229): mAcceptedConnection 13
06-15 09:41:06.916 E/HDMIDaemon(  229): mAcceptedConnection 13
06-15 09:41:07.066 I/mono-stdout(11629): ---- DEBUG ASSERTION FAILED ----
06-15 09:41:07.076 I/mono-stdout(11629): ---- Assert Short Message ----
06-15 09:41:07.076 I/mono-stdout(11629): System.NullReferenceException: Object reference not set to an instance of an object
06-15 09:41:07.076 I/mono-stdout(11629):   at (wrapper delegate-invoke) <Module>:invoke_intptr__this___intptr_intptr_string_string (intptr,intptr,string,string)
06-15 09:41:07.076 I/mono-stdout(11629):   at Android.Runtime.JNIEnv.GetStaticMethodID (IntPtr jclass, System.String name, System.String sig) [0x00000] in <filename unknown>:0
06-15 09:41:07.076 I/mono-stdout(11629):   at Android.Util.Log.Verbose (System.String tag, System.String msg) [0x00000] in <filename unknown>:0
06-15 09:41:07.076 I/mono-stdout(11629):   at ApexSI.ApexWare.BusinessObjects.Log.LogError (System.String error) [0x00000] in <filename unknown>:0
06-15 09:41:07.076 I/mono-stdout(11629): ---- Assert Long Message ----
06-15 09:41:07.086 I/mono-stdout(11629):    at System.Diagnostics.TraceListener.Fail(System.String message)
06-15 09:41:07.086 I/mono-stdout(11629):    at System.Diagnostics.DefaultTraceListener.Fail(System.String message)
06-15 09:41:07.086 I/mono-stdout(11629):    at System.Diagnostics.TraceImpl.Fail(System.String message)
06-15 09:41:07.086 I/mono-stdout(11629):    at System.Diagnostics.TraceImpl.Assert(Boolean condition, System.String message)
06-15 09:41:07.086 I/mono-stdout(11629):    at System.Diagnostics.Debug.Assert(Boolean condition, System.String message)
06-15 09:41:07.086 I/mono-stdout(11629):    at ApexSI.ApexWare.BusinessObjects.Log.LogError(System.String error)
06-15 09:41:07.086 I/mono-stdout(11629):    at com.apexsi.apexware.WorkOrders.WorkOrderEditActivity.OnCreate(Android.OS.Bundle savedInstanceState)
06-15 09:41:07.086 I/mono-stdout(11629):    at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState)
06-15 09:41:07.086 I/mono-stdout(11629):    at System.Object.23a6127e-f2b1-4ea9-95cf-2be1beb39cf7(IntPtr , IntPtr , IntPtr )
06-15 09:41:07.086 E/mono    (11629):
06-15 09:41:07.086 E/mono    (11629): Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
06-15 09:41:07.166 I/ActivityManager(  421): Process com.apexsi.apexware (pid 11629) has died.
06-15 09:41:07.166 W/NetworkManagementSocketTagger(  421): setKernelCountSet(10189, 0) failed with errno -13
06-15 09:41:07.166 W/ActivityManager(  421): Force removing ActivityRecord{41588830 com.apexsi.apexware/.workorders.WorkOrderEditActivity}: app died, no saved state
06-15 09:41:07.166 D/ConnectivityService(  421): onUidRulesChanged(uid=10189, uidRules=0)
06-15 09:41:07.176 D/Zygote  (  186): Process 11629 exited cleanly (1)
06-15 09:41:07.176 D/dalvikvm(11649): Late-enabling CheckJNI
06-15 09:41:07.176 D/memalloc(  185): ion: Freeing buffer base:0x4487b000 size:3768320 fd:90
06-15 09:41:07.176 D/memalloc(  185): ion: Unmapping buffer  base:0x4487b000 size:3768320
06-15 09:41:07.176 D/memalloc(  421): ion: Unmapping buffer  base:0x5a999000 size:3768320
06-15 09:41:07.176 I/ActivityManager(  421): Start proc com.apexsi.apexware for activity com.apexsi.apexware/.workorders.WorkOrdersActivity: pid=11649 uid=10189 gids={1006, 1015, 3002, 3001, 3003}
06-15 09:41:07.186 D/ViewRootImpl(  421): @@@- disable SystemServer HW acceleration
06-15 09:41:07.246 D/memalloc(  185): ion: Allocated buffer base:0x440d6000 size:3768320 fd:57
06-15 09:41:07.246 E/ActivityManager(  421): fail to set top app changed! (2)
06-15 09:41:07.246 E/ActivityManager(  421): java.lang.NullPointerException
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityManagerService.handleTopAppChanged(ActivityManagerService.java:15889)
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityManagerService.updateOomAdjLocked(ActivityManagerService.java:15339)
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityManagerService.updateLruProcessInternalLocked(ActivityManagerService.java:1945)
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityManagerService.updateLruProcessLocked(ActivityManagerService.java:1952)
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityStack.realStartActivityLocked(ActivityStack.java:626)
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:4288)
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:4376)
06-15 09:41:07.246 E/ActivityManager(  421): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:347)
06-15 09:41:07.246 E/ActivityManager(  421): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1717)
06-15 09:41:07.246 E/ActivityManager(  421): at android.os.Binder.execTransact(Binder.java:338)
06-15 09:41:07.246 E/ActivityManager(  421): at dalvik.system.NativeStart.run(Native Method)
06-15 09:41:07.246 D/memalloc(  421): ion: Mapped buffer base:0x5a999000 size:3768320 offset:0 fd:340
06-15 09:41:07.256 W/NetworkManagementSocketTagger(  421): setKernelCountSet(10189, 1) failed with errno -13
06-15 09:41:07.266 D/ConnectivityService(  421): onUidRulesChanged(uid=10189, uidRules=0)
06-15 09:41:07.286 I/ActivityThread(11649): Pub com.apexsi.apexware.__mono_init__: mono.MonoRuntimeProvider
06-15 09:41:07.296 D/dalvikvm(11649): Trying to load lib /data/data/com.apexsi.apexware/lib/libmonodroid.so 0x40d61ff8
06-15 09:41:07.296 D/dalvikvm(11649): Added shared lib /data/data/com.apexsi.apexware/lib/libmonodroid.so 0x40d61ff8
06-15 09:41:07.306 E/mono    (11649): WARNING: The runtime version supported by this application is unavailable.
06-15 09:41:07.306 E/mono    (11649): Using default runtime: v2.0.50727
06-15 09:41:07.326 I/monodroid-gc(11649): environment supports jni NewWeakGlobalRef
06-15 09:41:07.336 W/monodroid-gc(11649): GREF GC Threshold: 46800
Reply | Threaded
Open this post in threaded view
|

Re: Crash on HTC

Jonathan Pryor-2
On Jun 15, 2012, at 10:00 AM, Jonathan Chapman wrote:
> However, on a HTC One X if I take a screenshot (Holding power and volume down) then leave my application and come back, the application will crash.

You have a NullReferenceException within WorkOrders.Status.Load():

        06-15 09:41:06.846 I/MonoDroid(11629): UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
        06-15 09:41:06.846 I/MonoDroid(11629): at ApexSI.ApexWare.BusinessObjects.FieldService.WorkOrders.Status.Load () <0x0007c>
        06-15 09:41:06.846 I/MonoDroid(11629): at com.apexsi.apexware.WorkOrders.WorkOrderDetailsFragment.OnCreate (Android.OS.Bundle) <0x00057>

Why do you have a NullReferenceException? I don' t know. :-)

 - Jon

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|

Re: Crash on HTC

Sayed Arian Kooshesh
seems like jon's eyes are used to scanning these. As you develop more, you will too.


What I did, was write a program that goes through my project directory and gets a list of file (cs) and removes the extension in a list.

Then, since I knew what all of my files were, it would be easy to identify if in the crash my files were mentioned. Sometimes scanning them might lead to a skip over from tired eyes.

Htc has a launcher that is default that is not the android launcher. I ran into this problem, too. Has to do with a dialog or the like or something. But it's the htc launcher giving you the null and that's why other phones don't.



On Fri, Jun 15, 2012 at 9:26 AM, Jonathan Pryor <[hidden email]> wrote:
On Jun 15, 2012, at 10:00 AM, Jonathan Chapman wrote:
> However, on a HTC One X if I take a screenshot (Holding power and volume down) then leave my application and come back, the application will crash.

You have a NullReferenceException within WorkOrders.Status.Load():

       06-15 09:41:06.846 I/MonoDroid(11629): UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
       06-15 09:41:06.846 I/MonoDroid(11629): at ApexSI.ApexWare.BusinessObjects.FieldService.WorkOrders.Status.Load () <0x0007c>
       06-15 09:41:06.846 I/MonoDroid(11629): at com.apexsi.apexware.WorkOrders.WorkOrderDetailsFragment.OnCreate (Android.OS.Bundle) <0x00057>

Why do you have a NullReferenceException? I don' t know. :-)

 - Jon

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid



--
Extreme Knowledge is not something for which he programs a computer but for which his computer is programming him.

-Wozniak

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|

Re: Crash on HTC

Jonathan Chapman
In reply to this post by Jonathan Pryor-2
The reason the null reference is happening is that the object is gone.  On the HTC when returning from the other application it looks like the garbage collector has removed my static objects even though the application is still running.  While on the Samsung there is no such issue.  All subsequent null reference exceptions are because of the object being gone as well.

Thanks,
Jonathan
Reply | Threaded
Open this post in threaded view
|

Re: Crash on HTC

Jonathan Chapman
In reply to this post by Sayed Arian Kooshesh
Hi Sayed,
You mentioned in your last line that you had this problem.  Did you determine any work arounds or preventative steps?

Thanks,
Jonathan
Reply | Threaded
Open this post in threaded view
|

Re: Crash on HTC

Jonathan Pryor-2
In reply to this post by Jonathan Chapman
On Jun 18, 2012, at 11:35 AM, Jonathan Chapman wrote:
> The reason the null reference is happening is that the object is gone.

Are you sure it's the same process?

Each line in the Android Debug Log contains a process id (pid):

        http://docs.xamarin.com/android/advanced_topics/android_debug_log#Interesting_Messages

It's possible that your process is launched, you go "elsewhere" for a bit, and Android nukes your process. Later your process is needed, so Android creates a new process, but it's "missed' whatever state you're expecting.

You can see if this is happening by reading the Android Debug Log: do you see multiple __mono_init__ messages within the timeframe you're dealing with? Each __mono_init__ message will be from a different process (check the pid to confirm).

If process restart is the problem, then what you need to do is preserve your app state within Activity.OnSaveInstanceState(), or perhaps instead use a Service to contain your static data so that "something" is always running. (Android can still nuke your process if you have Services running, but presumably it'll nuke your process _later_ than it would otherwise, and your static member init + cleanup logic can be centralized in the Service lifecycle logic.)

If process restart isn't the problem, we'll sadly need more information. Android debug logs and logging would be a good start. ;-)

 - Jon

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|

Re: Crash on HTC

Sayed Arian Kooshesh
In reply to this post by Jonathan Chapman
switch all your code to using this
http://msdn.microsoft.com/en-us/library/k9x6w0hc%28v=vs.80%29.aspx

and then see if the problem persists.

On Mon, Jun 18, 2012 at 4:20 PM, Sayed Arian Kooshesh <[hidden email]> wrote:
fuck i know what it is.

See static in c# is a bit.. tricky.

Switch to using a static constructor. You may be running into a problem where the static stuff isn't really initialized or something doesn't stay around. I ran into it a lot on C# desktop apps and it lead to me to using static constructors.

A static constructor is called the firsttime a static object is referenced or a static function is referenced but you have to call it by the class name.

Like

MyStatiClass.ReadDoDo();



if in MyStatiClass you had


public static MyStatiClass
{
public static int terd;    // if you are init'ing terd here. you might just be a rednec.. erm you might not want to do that.
                                   //static constructor guarantee initialization and are a good point for log messages.
static MyStatiClass()
{
terd = 0;


}

}

On Mon, Jun 18, 2012 at 4:17 PM, Sayed Arian Kooshesh <[hidden email]> wrote:
I'm not commenting till I see the code



--
Extreme Knowledge is not something for which he programs a computer but for which his computer is programming him.

-Wozniak



--
Extreme Knowledge is not something for which he programs a computer but for which his computer is programming him.

-Wozniak

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|

Re: Crash on HTC

Sayed Arian Kooshesh
no reply? I assumed it was c# not mono-droid? Did you have a lot of things you were initializing statically? I wanna blog this so others can find it but tell me what happened. I won't use your name I'll just say, if you get a nullrefexp and you are using a lot of static stuff, and your static object suddenly goes null... you might need static constructors.


On Mon, Jun 18, 2012 at 4:22 PM, Sayed Arian Kooshesh <[hidden email]> wrote:
switch all your code to using this
http://msdn.microsoft.com/en-us/library/k9x6w0hc%28v=vs.80%29.aspx

and then see if the problem persists.

On Mon, Jun 18, 2012 at 4:20 PM, Sayed Arian Kooshesh <[hidden email]> wrote:
fuck i know what it is.

See static in c# is a bit.. tricky.

Switch to using a static constructor. You may be running into a problem where the static stuff isn't really initialized or something doesn't stay around. I ran into it a lot on C# desktop apps and it lead to me to using static constructors.

A static constructor is called the firsttime a static object is referenced or a static function is referenced but you have to call it by the class name.

Like

MyStatiClass.ReadDoDo();



if in MyStatiClass you had


public static MyStatiClass
{
public static int terd;    // if you are init'ing terd here. you might just be a rednec.. erm you might not want to do that.
                                   //static constructor guarantee initialization and are a good point for log messages.
static MyStatiClass()
{
terd = 0;


}

}

On Mon, Jun 18, 2012 at 4:17 PM, Sayed Arian Kooshesh <[hidden email]> wrote:
I'm not commenting till I see the code



--
Extreme Knowledge is not something for which he programs a computer but for which his computer is programming him.

-Wozniak



--
Extreme Knowledge is not something for which he programs a computer but for which his computer is programming him.

-Wozniak



--
Extreme Knowledge is not something for which he programs a computer but for which his computer is programming him.

-Wozniak

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid