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 Dectected in Math Expressions/Equations Screen #4477

Closed
MihirShirgaonkar opened this issue Jul 28, 2022 · 2 comments · Fixed by #4478
Closed

Crash Dectected in Math Expressions/Equations Screen #4477

MihirShirgaonkar opened this issue Jul 28, 2022 · 2 comments · Fixed by #4478
Assignees
Labels
Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@MihirShirgaonkar
Copy link

Crash Dectected in Math Expressions/Equations Screen on taping editext

To Reproduce
Steps to reproduce the behavior:

  1. Open oppia app
  2. open navigation drawer
  3. open Developer options
  4. tap on Math Expressions/Equations
  5. tap on Expressions/Equations EditText present on top

Demonstration

crash.report.mp4

Environment Tested

  • Device/emulator being used: Samsung M12
  • Android or SDK version (e.g. Android 5 or SDK 21): Android 11
  • App version (you can get this through system app settings or via the admin controls menu in-app): 1.0
@BenHenning
Copy link
Member

Thanks for filing this @MihirShirgaonkar! I tried reproing on the tip-of-tree APK built by CI, and I actually encountered a crash upon opening the screen:

2022-07-29 00:24:16.769 23849-23849/org.oppia.android E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.oppia.android, PID: 23849
    android.content.res.Resources$NotFoundException: Resource ID #0x7f120109
        at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:224)
        at android.content.res.Resources.getDrawableForDensity(Resources.java:876)
        at android.content.res.Resources.getDrawable(Resources.java:819)
        at android.content.Context.getDrawable(Context.java:605)
        at android.widget.Editor.updateCursorPosition(Editor.java:2312)
        at android.widget.Editor.updateCursorsPositions(Editor.java:1934)
        at android.widget.TextView.getUpdatedHighlightPath(TextView.java:6695)
        at android.widget.TextView.onDraw(TextView.java:6880)
        at android.view.View.draw(View.java:19192)
        at android.view.View.updateDisplayListIfDirty(View.java:18142)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1882)
        at android.view.View.updateDisplayListIfDirty(View.java:18133)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at android.view.View.draw(View.java:19195)
        at android.widget.ScrollView.draw(ScrollView.java:1739)
        at android.view.View.updateDisplayListIfDirty(View.java:18142)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1882)
        at android.view.View.draw(View.java:19195)
        at android.view.View.updateDisplayListIfDirty(View.java:18142)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at android.view.View.updateDisplayListIfDirty(View.java:18133)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at android.view.View.updateDisplayListIfDirty(View.java:18133)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at android.view.View.updateDisplayListIfDirty(View.java:18133)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at android.view.View.updateDisplayListIfDirty(View.java:18133)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at android.view.View.updateDisplayListIfDirty(View.java:18133)
        at android.view.View.draw(View.java:18920)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4236)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4022)
        at android.view.View.draw(View.java:19195)
        at com.android.internal.policy.DecorView.draw(DecorView.java:788)
        at android.view.View.updateDisplayListIfDirty(View.java:18142)
        at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:669)
        at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:675)
        at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:783)
        at android.view.ViewRootImpl.draw(ViewRootImpl.java:2992)
        at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2806)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2359)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1392)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6752)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
2022-07-29 00:24:16.769 23849-23849/org.oppia.android E/AndroidRuntime:     at android.view.Choreographer.doFrame(Choreographer.java:658)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

This could be due to the dark mode changes, but an investigation will be needed.

@BenHenning
Copy link
Member

Verified that this breaks on commit 3496373 and works on commit 517964c (where dark mode was introduced for that screen).

There aren't many commits to check, and only a few tied to dark mode so I'm just checking them sort of in reverse order:

It looks like c3b42a4 is the culprit. Will try to see if we can revert the commit, otherwise we'll need to fix forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-ibt Temporary label for Ben to keep track of issues he's triaged.
2 participants