I'm using a combination of ActionBarSherlock and ViewPagerIndicator in my app. I have an activity which contains a ViewPager that uses a FragmentStatePagerAdapter to scroll between the tabs. One of the fragments contains an IcsSpinner. When the activity state is restored and I scroll to the tab with the IcsSpinner i get the following exception:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.actionbarsherlock.internal.widget.IcsAbsSpinner$SavedState
at android.os.Parcel.readParcelable(Parcel.java:2077)
at android.os.Parcel.readValue(Parcel.java:1965)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2255)
at android.os.Parcel.readSparseArray(Parcel.java:1687)
at android.os.Parcel.readValue(Parcel.java:2022)
at android.os.Parcel.readMapInternal(Parcel.java:2226)
at android.os.Bundle.unparcel(Bundle.java:223)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1240)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.BackStackRecord.run(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(Unknown Source)
at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(Unknown Source)
at android.support.v4.view.ViewPager.populate(Unknown Source)
at android.support.v4.view.ViewPager.completeScroll(Unknown Source)
at android.support.v4.view.ViewPager.computeScroll(Unknown Source)
at android.view.View.getDisplayList(View.java:12638)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
at android.view.View.getDisplayList(View.java:12588)
at android.view.View.getDisplayList(View.java:12694)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1198)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2173)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
at android.view.Choreographer.doFrame(Choreographer.java:532)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Any idea what may be causing this?
Thanks
David
Related
My app run very good when built test but when build it with keystore and run my app it force close and show error
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at tuannt.appweather.f.f.a(Unknown Source)
at tuannt.appweather.e.a.a(Unknown Source)
at tuannt.appweather.e.a.onPostExecute(Unknown Source)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5162)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:744)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
What happened with my apk?
We're facing an issue with the maps is some phones. Here's the open issue in the google repo. None of the comments on the issue is helpful.
We are using 8.4.0 version and we have no clue how to fix or catch this crash.
This is hapening only in some devices example : LGE LG-P970 Android 4.0.4 API 15.
We're using the SupportMapFragment.
The stack trace is not giving any details:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at maps.dz.o.a(Unknown Source)
at maps.dg.e.a(Unknown Source)
at maps.dg.u.a(Unknown Source)
at maps.ei.ag.a(Unknown Source)
at maps.ei.bu.a(Unknown Source)
at maps.ei.n$1.a(Unknown Source)
at maps.ei.n.a(Unknown Source)
at com.google.android.gms.maps.internal.i$a.onTransact(:com.google.android.gms.alldynamite:107)
at android.os.Binder.transact(Binder.java:297)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4516)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Did anybody face this issue? any fix (or work around) is welcome.
Thanks!
I observe this crash in activity which dynamically changes fragments when Android device connected to computer in USB debug mode. Without USB connection application works fine.
Stack trace is not very helpful:
java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
at android.app.ActivityThread.access$900(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5473)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at maps.dz.o.a(Unknown Source)
at maps.dg.e.a(Unknown Source)
at maps.dg.p.a(Unknown Source)
at maps.ei.ag.a(Unknown Source)
at maps.ei.bu.a(Unknown Source)
at maps.ei.n$1.a(Unknown Source)
at maps.ei.n.a(Unknown Source)
at com.google.android.gms.maps.internal.i$a.onTransact(:com.google.android.gms.alldynamite:107)
at android.os.Binder.transact(Binder.java:347)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
at android.app.Activity.performStart(Activity.java:5244)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
at android.app.ActivityThread.access$900(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5473)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)
Device: Huawei G535-L11, Android 4.3
Workaround: disconnect device from USB before launching the app
Why VideoView force closes on Micromax Canvas magnus ?
java.lang.StringIndexOutOfBoundsException: length=11; regionStart=0;
regionLength=-1 at java.lang.String.startEndAndLength(String.java:583)
at java.lang.String.substring(String.java:1464) at
android.widget.VideoView.openVideo(VideoView.java:407) at
android.widget.VideoView$6.surfaceCreated(VideoView.java:730) at
android.view.SurfaceView.updateWindow(SurfaceView.java:606) at
android.view.SurfaceView.access$000(SurfaceView.java:88) at
android.view.SurfaceView$3.onPreDraw(SurfaceView.java:183) at
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:692)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2123)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1139) at
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4879)
at
android.view.Choreographer$CallbackRecord.run(Choreographer.java:776)
at android.view.Choreographer.doCallbacks(Choreographer.java:579) at
android.view.Choreographer.doFrame(Choreographer.java:548) at
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:762)
at android.os.Handler.handleCallback(Handler.java:725) at
android.os.Handler.dispatchMessage(Handler.java:92) at
android.os.Looper.loop(Looper.java:153) at
android.app.ActivityThread.main(ActivityThread.java:5297) 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:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at
dalvik.system.NativeStart.main(Native Method)
If the app runs visible,everything gets fine.But if I press home to let the app in the background and do some other things, it would get a crash like this:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qdn.bus/com.qdn.activity.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2001)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2028)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4508)
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:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.view.View.onRestoreInstanceState(View.java:9999)
at android.support.v4.view.ViewPager.onRestoreInstanceState(Unknown Source)
at android.view.View.dispatchRestoreInstanceState(View.java:9975)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2397)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.View.restoreHierarchyState(View.java:9951)
at android.support.v4.app.Fragment.restoreViewState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(Unknown Source)
at android.support.v4.app.FragmentActivity.onStart(Unknown Source)
at com.qdn.activity.MainActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1136)
at com.lbe.security.service.core.client.b.x.callActivityOnStart(Unknown Source)
at android.app.Activity.performStart(Activity.java:4489)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
... 11 more
java.lang.NullPointerException
at android.view.View.onRestoreInstanceState(View.java:9999)
at android.support.v4.view.ViewPager.onRestoreInstanceState(Unknown Source)
at android.view.View.dispatchRestoreInstanceState(View.java:9975)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2397)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.View.restoreHierarchyState(View.java:9951)
at android.support.v4.app.Fragment.restoreViewState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(Unknown Source)
at android.support.v4.app.FragmentActivity.onStart(Unknown Source)
at com.qdn.activity.MainActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1136)
at com.lbe.security.service.core.client.b.x.callActivityOnStart(Unknown Source)
at android.app.Activity.performStart(Activity.java:4489)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2028)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4508)
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:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(Native Method)
I think it is because the Delvik Vm has recycle some of the memory.But is there anyway to fix it?
I have this exception:
java.lang.NullPointerException
at android.webkit.WebViewClassic.requestFocus(WebViewClassic.java:10003)
at android.webkit.WebView.requestFocus(WebView.java:2133)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:2382)
at android.view.ViewGroup.requestFocus(ViewGroup.java:2338)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:2382)
at android.view.ViewGroup.requestFocus(ViewGroup.java:2338)
at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:2382)
at android.view.ViewGroup.requestFocus(ViewGroup.java:2341)
at android.view.View.requestFocus(View.java:6538)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1899)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1110)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4472)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4918)
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:1004)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
at dalvik.system.NativeStart.main(Native Method)
But it doesn't tell me what line it happened on or anything else. Any idea how to debug this?
Thanks,
Alex