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 loop on new installation #1159

Closed
Bambooin opened this issue Dec 23, 2023 · 1 comment · Fixed by #1152
Closed

Crash loop on new installation #1159

Bambooin opened this issue Dec 23, 2023 · 1 comment · Fixed by #1152

Comments

@Bambooin
Copy link
Collaborator

Describe the bug
A clear and concise description of what the bug is.
New installation on #1152 will lead to crash loop.

To Reproduce
Steps to reproduce the bug:

  1. Uninstall Trime
  2. Install Trime on CI of Load Rime in Background Thread #1152
  3. Crash loop

Expected behavior
A clear and concise description of what you expected to happen.
New setup guide show up.

Log
If applicable, add crash log to quick focus your problem.
Log is hard to export on crash loop.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. Xiaomi Mix 4]
  • OS: [e.g. Android 11]
  • Theme: [e.g. Tongwenfeng]
  • Version: [e.g. 3.2.1]
  • Build info:
    You could find build info in About Activity and click it to copy.
    e.g. 
    Build: Commit CI
    Date: 2022-06-12 10:09 UTC
    Commit: v3.2.6-58-gd9b4c1f, 2022-06-12 17:58:14 +0800
    Branch: develop
    Repository: https://github.com/osfans/trime
    

Additional context
Add any other context about the problem here.

@Bambooin
Copy link
Collaborator Author

Root cause analysis: no storage permission was granted and the Trime can't read/write the media.

The permission can't granted due to crash loop which caused by permission deny.

goofyz added a commit to goofyz/trime that referenced this issue Dec 25, 2023
…missions

If permissions are not granted, `RimeWrapper.canStart` will be set to false, so
`RimeWrapper` will save the `Runnable` and wait to start later.  When permission are
granted, `RimeWrapper.canStart` will be set to true in `onCreate()`, `onCreateInputView()`
and `onStartInputView()`.  And rime deployment will be triggered accordingly.

For UI display:  If permissions are not granted, an error message will be displayed
in `InitialKeyboard`.  If permissions are granted, `InitialKeyboard` with deployment
progress will be displayed.  If deployment is completed, the normal keyboard will be
displayed.

Fixes osfans#1159
goofyz added a commit to goofyz/trime that referenced this issue Dec 28, 2023
…missions

If permissions are not granted, `RimeWrapper.canStart` will be set to false, so
`RimeWrapper` will save the `Runnable` and wait to start later.  When permission are
granted, `RimeWrapper.canStart` will be set to true in `onCreate()`, `onCreateInputView()`
and `onStartInputView()`.  And rime deployment will be triggered accordingly.

For UI display:  If permissions are not granted, an error message will be displayed
in `InitialKeyboard`.  If permissions are granted, `InitialKeyboard` with deployment
progress will be displayed.  If deployment is completed, the normal keyboard will be
displayed.

Do not set `initialKeyboard` to null to prevent NPE. As the callback in `RimeWrapper`
maybe perform faster or slower, we will not be sure when `setInputView()` will run.
We should either check for null for all call to `initialKeyboard`, or do not set it
to null.

Refs osfans#1159
goofyz added a commit to goofyz/trime that referenced this issue Dec 30, 2023
…missions

If permissions are not granted, `RimeWrapper.canStart` will be set to false, so
`RimeWrapper` will save the `Runnable` and wait to start later.  When permission are
granted, `RimeWrapper.canStart` will be set to true in `onCreate()`, `onCreateInputView()`
and `onStartInputView()`.  And rime deployment will be triggered accordingly.

For UI display:  If permissions are not granted, an error message will be displayed
in `InitialKeyboard`.  If permissions are granted, `InitialKeyboard` with deployment
progress will be displayed.  If deployment is completed, the normal keyboard will be
displayed.

Do not set `initialKeyboard` to null to prevent NPE. As the callback in `RimeWrapper`
maybe perform faster or slower, we will not be sure when `setInputView()` will run.
We should either check for null for all call to `initialKeyboard`, or do not set it
to null.

Refs osfans#1159
goofyz added a commit to goofyz/trime that referenced this issue Jan 11, 2024
…missions

If permissions are not granted, `RimeWrapper.canStart` will be set to false, so
`RimeWrapper` will save the `Runnable` and wait to start later.  When permission are
granted, `RimeWrapper.canStart` will be set to true in `onCreate()`, `onCreateInputView()`
and `onStartInputView()`.  And rime deployment will be triggered accordingly.

For UI display:  If permissions are not granted, an error message will be displayed
in `InitialKeyboard`.  If permissions are granted, `InitialKeyboard` with deployment
progress will be displayed.  If deployment is completed, the normal keyboard will be
displayed.

Fixes osfans#1159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant