ceryle / SegmentedButton

Segmented Control with animation for Android API 12+
Apache License 2.0
363 stars 97 forks source link

Crash when the first time I open it #17

Open chihung93 opened 7 years ago

chihung93 commented 7 years ago

Asus max . Model Number : ASUS_Z017D Anroid 6.0.1


04-25 15:36:10.073 3655-3655/co.ceryle.segmentedbutton E/AndroidRuntime: FATAL EXCEPTION: main
                                                                         Process: co.ceryle.segmentedbutton, PID: 3655
                                                                         java.lang.IllegalStateException: Underflow in restore - more restores than saves
                                                                             at android.graphics.Canvas.native_restore(Native Method)
                                                                             at android.graphics.Canvas.restore(Canvas.java:540)
                                                                             at co.ceryle.segmentedbutton.SegmentedButton.onDraw(SegmentedButton.java:409)
                                                                             at android.view.View.draw(View.java:16195)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15192)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15187)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15187)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at co.ceryle.segmentedbutton.SegmentedButtonGroup.dispatchDraw(SegmentedButtonGroup.java:209)
                                                                             at android.view.View.draw(View.java:16198)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15192)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15187)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.draw(View.java:16198)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15192)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15187)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15187)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15187)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15187)
                                                                             at android.view.View.draw(View.java:15965)
                                                                             at android.view.ViewGroup.drawChild(ViewGroup.java:3610)
                                                                             at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3400)
                                                                             at android.view.View.draw(View.java:16198)
                                                                             at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:2690)
                                                                             at android.view.View.updateDisplayListIfDirty(View.java:15192)
                                                                             at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
                                                                             at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
                                                                             at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
                                                                             at android.view.ViewRootImpl.draw(ViewRootImpl.java:2620)
                                                                             at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2439)
                                                                             at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2072)
                                                                             at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1112)
                                                                             at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6035)
                                                                             at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
                                                                             at android.view.Choreographer.doCallbacks(Choreographer.java:670)
                                                                             at android.view.Choreographer.doFrame(Choreographer.java:606)
                                                                             at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
                                                                             at android.os.Handler.handleCallback(Handler.java:739)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                             at android.os.Looper.loop(Looper.java:148)
                                                                            at android.a
ceryle commented 7 years ago

Hi, trihung93 Thanks, I will take a look at that issue soon.

ceryle commented 7 years ago

Hi, trihung93 It is fixed now.

chihung93 commented 7 years ago

thank you so much ...^^