LuckSiege / LuckSiege/PictureSelector

Firebase上报的错误:Fatal Exception: android.os.BadParcelableException -- Caused by java.io.NotSerializableException com.luck.picture.lib.entity.LocalMedia

Open
#2,935 1 comment 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?
#### 当前使用的版本是多少?

```
3.11.2
```

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

```
自己无法复现,是Firebase上报的错误
```

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

```
android.os.Parcel.writeSerializable (Parcel.java:2907)
android.os.Parcel.writeValue (Parcel.java:2673)
android.os.Parcel.writeValue (Parcel.java:2472)
android.os.Parcel.writeArrayMapInternal (Parcel.java:1336)
android.os.BaseBundle.writeToParcelInner (BaseBundle.java:1844)
android.os.Bundle.writeToParcel (Bundle.java:1390)
android.os.Parcel.writeBundle (Parcel.java:1405)
android.content.Intent.writeToParcel (Intent.java:12194)
android.app.assist.AssistContent.writeToParcelInternal (AssistContent.java:182)
android.app.assist.AssistContent.writeToParcel (AssistContent.java:216)
android.os.Parcel.writeTypedObject (Parcel.java:2313)
android.app.IActivityTaskManager$Stub$Proxy.reportAssistContextExtras (IActivityTaskManager.java:2654)
android.app.ActivityThread.handleRequestAssistContextExtras (ActivityThread.java:4304)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2547)
android.os.Handler.dispatchMessage (Handler.java:107)
android.os.Looper.loopOnce (Looper.java:232)
android.os.Looper.loop (Looper.java:317)
android.app.ActivityThread.main (ActivityThread.java:8592)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:878)

java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1240)
java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1620)
java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1581)
java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1490)
java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1234)
java.io.ObjectOutputStream.writeObject (ObjectOutputStream.java:354)
java.util.ArrayList.writeObject (ArrayList.java:873)
java.lang.reflect.Method.invoke (Method.java)
java.io.ObjectStreamClass.invokeWriteObject (ObjectStreamClass.java:1079)
java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1568)
java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1490)
java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1234)
java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1620)
java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1581)
java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1490)
java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1234)
java.io.ObjectOutputStream.writeObject (ObjectOutputStream.java:354)
android.os.Parcel.writeSerializable (Parcel.java:2902)
android.os.Parcel.writeValue (Parcel.java:2673)
android.os.Parcel.writeValue (Parcel.java:2472)
android.os.Parcel.writeArrayMapInternal (Parcel.java:1336)
android.os.BaseBundle.writeToParcelInner (BaseBundle.java:1844)
android.os.Bundle.writeToParcel (Bundle.java:1390)
android.os.Parcel.writeBundle (Parcel.java:1405)
android.content.Intent.writeToParcel (Intent.java:12194)
android.app.assist.AssistContent.writeToParcelInternal (AssistContent.java:182)
android.app.assist.AssistContent.writeToParcel (AssistContent.java:216)
android.os.Parcel.writeTypedObject (Parcel.java:2313)
android.app.IActivityTaskManager$Stub$Proxy.reportAssistContextExtras (IActivityTaskManager.java:2654)
android.app.ActivityThread.handleRequestAssistContextExtras (ActivityThread.java:4304)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2547)
android.os.Handler.dispatchMessage (Handler.java:107)
android.os.Looper.loopOnce (Looper.java:232)
android.os.Looper.loop (Looper.java:317)
android.app.ActivityThread.main (ActivityThread.java:8592)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:878)
```

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 the LocalMedia entity and the Android Parcel.writeSerializable stack shown in the report. Trace how the entity can enter a Bundle or Intent during assist-context reporting, then determine a reproducible way to verify that this path no longer raises BadParcelableException. The report provides no repository file or test location, so the completion criteria need maintainer confirmation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.