Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Crash report] Lateinit property textLayout is not initialized at FilterChip#onDraw L291 #505

Open
KeithYokoma opened this issue Jan 21, 2020 · 6 comments
Labels
bug Something isn't working welcome contribute

Comments

@KeithYokoma
Copy link
Contributor

Overview (Required)

  • Crash on resuming session list screen, caused by accessing lateinit property textLayout without initialization in FilterChip.
    • textLayout is initialized at onMeasure procedure.
    • seems like there's a path to call onDraw without initializing textLayout.

Steps To Reproduce

It's not consistently reproducible but I have observed the issue several times with these steps.

  1. Launch conference app
  2. Lock the device
  3. Unlock after some time

Expected behavior
Resume session list screen without a crash.

Env:

@KeithYokoma KeithYokoma added the bug Something isn't working label Jan 21, 2020
@KeithYokoma
Copy link
Contributor Author

Stacktrace:

io.github.droidkaigi.confsched2020.ui.widget.FilterChip.onDraw (FilterChip.java:291)
android.view.View.draw (View.java:21975)
android.view.View.updateDisplayListIfDirty (View.java:20852)
android.view.View.draw (View.java:21707)
android.view.ViewGroup.drawChild (ViewGroup.java:4432)
android.view.ViewGroup.dispatchDraw (ViewGroup.java:4193)
android.view.View.updateDisplayListIfDirty (View.java:20843)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4416)
android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4389)
android.view.View.updateDisplayListIfDirty (View.java:20812)
android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:581)
android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:587)
android.view.ThreadedRenderer.draw (ThreadedRenderer.java:664)
android.view.ViewRootImpl.draw (ViewRootImpl.java:3767)
android.view.ViewRootImpl.performDraw (ViewRootImpl.java:3495)
android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2779)
android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1745)
android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7768)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:967)
android.view.Choreographer.doCallbacks (Choreographer.java:791)
android.view.Choreographer.doFrame (Choreographer.java:726)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:952)
android.os.Handler.handleCallback (Handler.java:883)
android.os.Handler.dispatchMessage (Handler.java:100)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7356)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:930)

@koji-1009
Copy link
Contributor

Can I try?

I can't reproduce this problem in my environment yet.
However, I feel this problem can be fixed by removing the "unstable" lateinit call. 🕵

@roana0229
Copy link
Contributor

Of course, assigned 👍

@koji-1009
Copy link
Contributor

Sorry, I can't reproduce this issue in the latest conference app. (DroidKaigi 2020 #227)
And I can not found the DeployGate link DroidKaigi 2020 #130...

@KeithYokoma
Hi, can you reproduce this issue in the latest conference app?

@koji-1009
Copy link
Contributor

@roana0229
Sorry, I give up. I can't reproduce this issue.


Maybe, we can avoid this issue to change lateinit property to nullable property.
https://github.com/DroidKaigi/conference-app-2020/blob/master/corecomponent/androidcomponent/src/main/java/io/github/droidkaigi/confsched2020/ui/widget/FilterChip.kt#L146

However, this workaround is not good because the root cause cannot be fix.
To investigate this issue I want reproduce, but I can't do.

So, I give up now. Sorry 🙏

@roana0229
Copy link
Contributor

No need to apologize 😄
Thank you for your dedicated investigation. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working welcome contribute
Projects
None yet
Development

No branches or pull requests

3 participants