umano / AndroidSlidingUpPanel

This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.
http://umano.me
Apache License 2.0
9.5k stars 2.27k forks source link

Another Sliding up crash #170

Closed fluxxion82 closed 10 years ago

fluxxion82 commented 10 years ago

I'm using this library and it seems that sometimes when you slide the panel up, it will crash the app. Here is the logcat logs: 04-29 10:08:19.206: E/AndroidRuntime(8901): FATAL EXCEPTION: main 04-29 10:08:19.206: E/AndroidRuntime(8901): Process: com.tastemakerx, PID: 8901 04-29 10:08:19.206: E/AndroidRuntime(8901): java.lang.NullPointerException 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.support.v4.widget.ViewDragHelper.continueSettling(ViewDragHelper.java:719) 04-29 10:08:19.206: E/AndroidRuntime(8901): at com.sothree.slidinguppanel.SlidingUpPanelLayout.computeScroll(SlidingUpPanelLayout.java:982) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13347) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13404) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.draw(View.java:14182) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.drawChild(ViewGroup.java:3103) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:817) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13357) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13404) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.draw(View.java:14182) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.drawChild(ViewGroup.java:3103) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13357) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13404) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.draw(View.java:14182) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.drawChild(ViewGroup.java:3103) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.draw(View.java:14468) 04-29 10:08:19.206: E/AndroidRuntime(8901): at com.android.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:381) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13362) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13404) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.draw(View.java:14182) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.drawChild(ViewGroup.java:3103) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.draw(View.java:14468) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.widget.FrameLayout.draw(FrameLayout.java:472) 04-29 10:08:19.206: E/AndroidRuntime(8901): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2326) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13362) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.View.getDisplayList(View.java:13404) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1570) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1449) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2381) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2253) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1883) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.Choreographer.doCallbacks(Choreographer.java:574) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.Choreographer.doFrame(Choreographer.java:544) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.os.Handler.handleCallback(Handler.java:733) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.os.Handler.dispatchMessage(Handler.java:95) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.os.Looper.loop(Looper.java:136) 04-29 10:08:19.206: E/AndroidRuntime(8901): at android.app.ActivityThread.main(ActivityThread.java:5017) 04-29 10:08:19.206: E/AndroidRuntime(8901): at java.lang.reflect.Method.invokeNative(Native Method) 04-29 10:08:19.206: E/AndroidRuntime(8901): at java.lang.reflect.Method.invoke(Method.java:515) 04-29 10:08:19.206: E/AndroidRuntime(8901): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 04-29 10:08:19.206: E/AndroidRuntime(8901): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 04-29 10:08:19.206: E/AndroidRuntime(8901): at dalvik.system.NativeStart.main(Native Method)

tokudu commented 10 years ago

Hmm, seems like a crash in side of the Support library. What version of Android are you running?

fluxxion82 commented 10 years ago

The crash seems to happen every single time on Android version 4.4.2. On another phone, running Android version 4.1.2, I don't get the crash.

On Tue, Apr 29, 2014 at 10:26 AM, Anton Lopyrev notifications@github.comwrote:

Hmm, seems like a crash in side of the Support library. What version of Android are you running?

— Reply to this email directly or view it on GitHubhttps://github.com/umano/AndroidSlidingUpPanel/issues/170#issuecomment-41705918 .

fluxxion82 commented 10 years ago

Another phone that seems to get the crash is running Android 4.0.4

On Tue, Apr 29, 2014 at 10:38 AM, Sterling Albury fluxxion@gmail.comwrote:

The crash seems to happen every single time on Android version 4.4.2. On another phone, running Android version 4.1.2, I don't get the crash.

On Tue, Apr 29, 2014 at 10:26 AM, Anton Lopyrev notifications@github.comwrote:

Hmm, seems like a crash in side of the Support library. What version of Android are you running?

— Reply to this email directly or view it on GitHubhttps://github.com/umano/AndroidSlidingUpPanel/issues/170#issuecomment-41705918 .

tokudu commented 10 years ago

Is the crash occurring in the example project? Or your own app?

fluxxion82 commented 10 years ago

It's in my own app, but it's based on the example.

On Tue, Apr 29, 2014 at 12:23 PM, Anton Lopyrev notifications@github.comwrote:

Is the crash occurring in the example project? Or your own app?

— Reply to this email directly or view it on GitHubhttps://github.com/umano/AndroidSlidingUpPanel/issues/170#issuecomment-41720582 .

tokudu commented 10 years ago

If it doesn't crash in the example, I can't help you without seeing your layout file.

tokudu commented 10 years ago

Please reopen if the crash happens in the demo.

staber commented 10 years ago

@tokudu this can be reproduced in the demo by adding

mLayout.showPanel();

to the onPanelHidden listener. Then hide the panel from the Menu button. Example use case:

tokudu commented 10 years ago

The crash is inside of the support library, so there is not much I can do there. The work around is to run it on the handler

         mLayout.post(new Runnable() {
                    @Override
                    public void run() {
                        mLayout.showPanel();
                    }
                });
staber commented 10 years ago

No problem. Just wanted to let you know it's present in the Demo too. Runnable works great. Thanks for the library.