mancj / mancj/MaterialSearchBar

Crash when going on background

Open
#94 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
324
PR merge metrics
No merged PRs in 30d

Description

Whenever I go to another app, it goes onPause, it crashes with this error

10-04 18:26:46.166 14402-14409/? E/zygote: Failed sending reply to debugger: Broken pipe
10-04 18:26:56.055 14402-14402/com.mancj.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mancj.example, PID: 14402
java.lang.RuntimeException: Parcel: unable to marshal value com.mancj.example.custom.Product@f87e57b
at android.os.Parcel.writeValue(Parcel.java:1712)
at android.os.Parcel.writeList(Parcel.java:865)
at com.mancj.materialsearchbar.MaterialSearchBar$SavedState.writeToParcel(MaterialSearchBar.java:1086)
at android.os.Parcel.writeParcelable(Parcel.java:1731)
at android.os.Parcel.writeValue(Parcel.java:1637)
at android.os.Parcel.writeSparseArray(Parcel.java:905)
at android.os.Parcel.writeValue(Parcel.java:1662)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:777)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506)
at android.os.Bundle.writeToParcel(Bundle.java:1181)
at android.os.Parcel.writeBundle(Parcel.java:817)
at android.os.Parcel.writeValue(Parcel.java:1628)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:777)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506)
at android.os.Bundle.writeToParcel(Bundle.java:1181)
at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:4700)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4095)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6673)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the crash by sending the Android app to the background, then inspect MaterialSearchBar.java at SavedState.writeToParcel around line 1086. Trace how the custom Product value reaches parceling and verify that backgrounding no longer raises the reported RuntimeException.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.