LuckSiege / LuckSiege/PictureSelector

bugly上报了个错误

Open
#2,664 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
13.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## Current use version?
#### 当前使用的版本是多少?

```
v3.10.9
```

## Will this problem occur in demo?
#### Demo能否复现这问题?

```

```

## Describe the problem or provide an error log?
#### 描述问题或提供错误log?

```
Android 29/30/31/33系统均有上报

com.luck.picture.lib.config.SelectorProviders.getSelectorConfig(SelectorProviders.java:3)

出错堆栈

1 java.util.LinkedList.getLast(LinkedList.java:261)
2 com.luck.picture.lib.config.SelectorProviders.com.luck.picture.lib.config.SelectorConfig getSelectorConfig()(SelectorProviders.java:19)
3 com.luck.picture.lib.config.InjectResourceSource.int getLayoutResource(android.content.Context,int)(InjectResourceSource.java:88)
4 com.luck.picture.lib.adapter.PictureImageGridAdapter.int getItemResourceId(int)(PictureImageGridAdapter.java:125)
5 com.luck.picture.lib.adapter.PictureImageGridAdapter.com.luck.picture.lib.adapter.holder.BaseRecyclerMediaHolder onCreateViewHolder(android.view.ViewGroup,int)(PictureImageGridAdapter.java:104)
6 com.luck.picture.lib.adapter.PictureImageGridAdapter.androidx.recyclerview.widget.RecyclerView$ViewHolder onCreateViewHolder(android.view.ViewGroup,int)(PictureImageGridAdapter.java:25)
7 androidx.recyclerview.widget.RecyclerView$h.createViewHolder(RecyclerView.java:6)
8 androidx.recyclerview.widget.RecyclerView$u.I(RecyclerView.java:208)
9 androidx.recyclerview.widget.m.i(m.java:15)
10 androidx.recyclerview.widget.m.c(m.java:16)
11 androidx.recyclerview.widget.m.d(m.java:23)
12 androidx.recyclerview.widget.m.g(m.java:4)
13 androidx.recyclerview.widget.m.run(m.java:71)
14 android.os.Handler.handleCallback(Handler.java:942)
15 android.os.Handler.dispatchMessage(Handler.java:99)
16 android.os.Looper.loopOnce(Looper.java:240)
17 android.os.Looper.loop(Looper.java:351)
18 android.app.ActivityThread.main(ActivityThread.java:8355)
19 java.lang.reflect.Method.invoke(Native Method)
20 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SelectorProviders.java at getSelectorConfig and trace the call from InjectResourceSource.java through PictureImageGridAdapter.java, following the reported LinkedList.getLast failure. Determine the conditions that leave the list empty, then verify that media view creation no longer crashes on the reported Android versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.