PixImagePicker icon indicating copy to clipboard operation
PixImagePicker copied to clipboard

Crash while opening the imagesheet first time.

Open rahulyadav07 opened this issue 1 year ago • 3 comments
trafficstars

Describe the bug while opening the the bottom sheet of image in viewpager getting crash. To Reproduce Steps to reproduce the behavior: Build the application first time

  1. Go to 'ViewPager2 implementation'
  2. Give the all permission
  3. Go to the camerat tab.
  4. SlideUp bottom sheet of image .
  5. Now at that point you get the crash in application .

Expected behavior Application should not be crashed at that point . it should be run smoothly.

Screenshots/Vedio https://github.com/akshay2211/PixImagePicker/assets/63515254/c653e010-adbe-4c07-8829-0a588a1ba7fc

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [Realme 10 pro 5G]
  • OS: [14]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

FATAL EXCEPTION: main
                                                                                                    Process: io.ak1.pixsample, PID: 26904
                                                                                                    java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
                                                                                                    	at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
                                                                                                    	at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
                                                                                                    	at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
                                                                                                    	at java.util.Objects.checkIndex(Objects.java:359)
                                                                                                    	at java.util.ArrayList.get(ArrayList.java:434)
                                                                                                    	at io.ak1.pix.adapters.MainImageAdapter.bindHeaderData(MainImageAdapter.kt:133)
                                                                                                    	at io.ak1.pix.utility.HeaderItemDecoration.getHeaderViewForItem(HeaderItemDecoration.kt:52)
                                                                                                    	at io.ak1.pix.utility.HeaderItemDecoration.onDrawOver(HeaderItemDecoration.kt:29)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4433)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23027)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView.drawChild(RecyclerView.java:5030)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.draw(View.java:24212)
                                                                                                    	at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4429)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23027)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
                                                                                                    	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23018)
                                                                                                    	at android.view.View.draw(View.java:23917)
2024-06-21 14:37:26.992 26904-26904 AndroidRuntime          io.ak1.pixsample                     E  	at android.view.ViewGroup.drawChild(ViewGroup.java:4648)
                                                                                                    	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4401)
                                                                                                    	at android.view.View.draw(View.java:24212)
                                                                                                    	at com.android.internal.policy.DecorView.draw(DecorView.java:893)
                                                                                                    	at android.view.View.updateDisplayListIfDirty(View.java:23027)
                                                                                                    	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:713)
                                                                                                    	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:719)
                                                                                                    	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:821)
                                                                                                    	at android.view.ViewRootImpl.draw(ViewRootImpl.java:5535)
                                                                                                    	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:5197)
                                                                                                    	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4240)
                                                                                                    	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2741)
                                                                                                    	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10184)
                                                                                                    	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1544)
                                                                                                    	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1553)
                                                                                                    	at android.view.Choreographer.doCallbacks(Choreographer.java:1109)
                                                                                                    	at android.view.Choreographer.doFrame(Choreographer.java:994)
                                                                                                    	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1527)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:958)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:257)
                                                                                                    	at android.os.Looper.loop(Looper.java:368)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8826)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

rahulyadav07 avatar Jun 21 '24 09:06 rahulyadav07

@akshay2211 please confirm this crash, will start working on this .

rahulyadav07 avatar Aug 08 '24 06:08 rahulyadav07

Hello @rahulyadav07, Apologies for the delay, i am able to replicate the issue, Ive already fixed it few days back, will release a new build with a fix soon.

akshay2211 avatar Aug 09 '24 07:08 akshay2211

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 00:04 stale[bot]