jeasonlzy / ImagePicker

完全仿微信的图片选择,并且提供了多种图片加载接口,选择图片后可以旋转,可以裁剪成矩形或圆形,可以配置各种其他的参数
Apache License 2.0
4.29k stars 1.03k forks source link

Bug #251

Open wjbd opened 6 years ago

wjbd commented 6 years ago

java.lang.RuntimeException: Unable to resume activity {com.yoreach.residentapp/com.lzy.imagepicker.ui.ImageGridActivity}: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3493) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3533) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6342) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.get(ArrayList.java:411) at com.lzy.imagepicker.ImageDataSource.onLoadFinished(ImageDataSource.java:130) at com.lzy.imagepicker.ImageDataSource.onLoadFinished(ImageDataSource.java:27) at android.support.v4.app.LoaderManagerImpl$LoaderObserver.onChanged(LoaderManagerImpl.java:221) at android.arch.lifecycle.LiveData.considerNotify(LiveData.java:109) at android.arch.lifecycle.LiveData.dispatchingValue(LiveData.java:126) at android.arch.lifecycle.LiveData.setValue(LiveData.java:282) at android.arch.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33) at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManagerImpl.java:156) at android.support.v4.content.Loader.deliverResult(Loader.java:130) at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:107) at android.support.v4.content.CursorLoader.onStartLoading(CursorLoader.java:153) at android.support.v4.content.Loader.startLoading(Loader.java:283) at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onActive(LoaderManagerImpl.java:73) at android.arch.lifecycle.LiveData$ObserverWrapper.activeStateChanged(LiveData.java:410) at android.arch.lifecycle.LiveData$LifecycleBoundObserver.onStateChanged(LiveData.java:368) at android.arch.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354) at android.arch.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:292) at android.arch.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:332) at android.arch.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:137) at android.arch.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:123) at android.arch.lifecycle.ReportFragment.dispatch(ReportFragment.java:121) at android.arch.lifecycle.ReportFragment.onStart(ReportFragment.java:81) at android.app.Fragment.performStart(Fragment.java:2378) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1027) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153) at android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2046) at android.app.FragmentController.dispatchStart(FragmentController.java:187) at android.app.Activity.performStart(Activity.java:6879) at android.app.Activity.performRestart(Activity.java:6947) at android.app.Activity.performResume(Activity.java:6952) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3470) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3533)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:163)  at android.app.ActivityThread.main(ActivityThread.java:6342)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770) 

wjbd commented 6 years ago

情景重现: 在大图预览界面,不选择图片直接返回,就会出现这个bug。

techwn commented 6 years ago

我也刚遇到,编译版本27

wangjianguo123 commented 6 years ago

同遇到,有解决办法吗

Xiaa520 commented 6 years ago

我也遇到了

colder112 commented 6 years ago

我也遇到了.是在裁剪页面,点击返回的话,就闪退了.

DreamBoom commented 6 years ago

没有人解决吗