LuckSiege / LuckSiege/PictureSelector
使用的系统相册,线上崩溃次数挺多
- Dominant language
- Java
- Stars
- 13.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Current use version?
#### 当前使用的版本是多少?
```
v3.11.2
```
## Will this problem occur in demo?
#### Demo能否复现这问题?
```
不能,但是线上挺多
```
## Describe the problem or provide an error log?
#### 描述问题或提供错误log?
```
Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=537568346, result=-1, data=Intent { dat=content://com.google.android.apps.photos.contentprovider/... flg=0x1 clip={text/uri-list {U(content)}} }} to activity {com.ylhl.soulchat/com.ylhl.soulchat.business.dynamic.ui.activity.DynamicPublishActivity}: java.lang.NullPointerException
at android.app.ActivityThread.deliverResults(ActivityThread.java:5503)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5542)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:137)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2423)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:8115)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:703)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by java.lang.NullPointerException:
at java.io.File.(File.java:288)
at com.luck.picture.lib.entity.LocalMedia.generateLocalMedia(LocalMedia.java:336)
at com.luck.picture.lib.basic.PictureCommonFragment.buildLocalMedia(PictureCommonFragment.java:1260)
at com.luck.picture.lib.PictureSelectorSystemFragment.access$600(PictureSelectorSystemFragment.java:40)
at com.luck.picture.lib.PictureSelectorSystemFragment$8.onActivityResult(PictureSelectorSystemFragment.java:292)
at com.luck.picture.lib.PictureSelectorSystemFragment$8.onActivityResult(PictureSelectorSystemFragment.java:285)
at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:418)
at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:375)
at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:777)
at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:164)
at android.app.Activity.dispatchActivityResult(Activity.java:8693)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5496)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5542)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:137)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2423)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:8115)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:703)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
```
使用的系统相册打开,线上崩溃次数挺多
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with LocalMedia.generateLocalMedia at line 336, then trace the system-album result handling in PictureSelectorSystemFragment.onActivityResult and PictureCommonFragment.buildLocalMedia. Reproduce the reported content URI case if possible; done means selecting media from the system album no longer produces the reported NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100