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

App crashes at startup #51

Closed
Kazurin-775 opened this issue Oct 15, 2021 · 8 comments
Closed

App crashes at startup #51

Kazurin-775 opened this issue Oct 15, 2021 · 8 comments

Comments

@Kazurin-775
Copy link

Kazurin-775 commented Oct 15, 2021

Logcat:

10-15 20:37:27.027  5080  5080 E AndroidRuntime: FATAL EXCEPTION: main
10-15 20:37:27.027  5080  5080 E AndroidRuntime: Process: info.plateaukao.einkbro, PID: 5080
10-15 20:37:27.027  5080  5080 E AndroidRuntime: kotlin.UninitializedPropertyAccessException: lateinit property ninjaWebView has not been initialized
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at de.baumann.browser.activity.BrowserActivity.initToolbar$lambda-13(BrowserActivity.kt:758)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at de.baumann.browser.activity.BrowserActivity.$r8$lambda$8D4by7gGDdtD2On6E3Vw1gV-xC8(Unknown Source:0)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at de.baumann.browser.activity.BrowserActivity$$ExternalSyntheticLambda5.onFocusChange(Unknown Source:2)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.View.onFocusChanged(View.java:6963)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.widget.TextView.onFocusChanged(TextView.java:9625)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.widget.AutoCompleteTextView.onFocusChanged(AutoCompleteTextView.java:1119)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.View.handleFocusGainInternal(View.java:6635)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.View.requestFocusNoSearch(View.java:10875)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.View.requestFocus(View.java:10854)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3167)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3167)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3167)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3167)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3167)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3167)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3167)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:3211)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.requestFocus(ViewGroup.java:3170)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.View.requestFocus(View.java:10821)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.View.restoreDefaultFocus(View.java:10800)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewGroup.restoreDefaultFocus(ViewGroup.java:3227)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2313)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1411)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6802)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.Choreographer.doFrame(Choreographer.java:658)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:793)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:164)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6496)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
10-15 20:37:27.027  5080  5080 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
10-15 20:37:27.041  1902  3184 W ActivityManager:   Force finishing activity info.plateaukao.einkbro/de.baumann.browser.activity.BrowserActivity
10-15 20:37:27.049  1902  3184 W ActivityManager:   Force finishing activity cn.modificator.launcher/.Launcher
  • App version: built from source on the main branch, Git revision c7b5c91 (the release builds on F-Droid or GitHub will generate stack traces with obfuscated symbols)
  • Device: Xiaomi Duokan Reader Pro
  • OS version: Android 8.1 (build number: MiReaderPro 1.1.8.210610)
@plateaukao
Copy link
Owner

Hi, @Kazurin-775

I just pushed a fix that might fix this issue. Could you fetch the latest codes and try again to see if it's really fixed? Thank you!

@Kazurin-775
Copy link
Author

Thanks for your quick reply! The app can be opened now (and it shows "EinkBro" on the bottom bar), but I still cannot interact with anything on the UI, or the app will still crash. This is the log when I tap on the menu button:

10-15 21:40:28.295  5911  5911 E AndroidRuntime: FATAL EXCEPTION: main
10-15 21:40:28.295  5911  5911 E AndroidRuntime: Process: info.plateaukao.einkbro, PID: 5911
10-15 21:40:28.295  5911  5911 E AndroidRuntime: kotlin.UninitializedPropertyAccessException: lateinit property ninjaWebView has not been initialized
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at de.baumann.browser.activity.BrowserActivity.showMenuDialog(BrowserActivity.kt:1481)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at de.baumann.browser.activity.BrowserActivity.initToolbar$lambda-10(BrowserActivity.kt:728)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at de.baumann.browser.activity.BrowserActivity.$r8$lambda$VRLLLoVHdallnoJKBTNARm8k9K4(Unknown Source:0)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at de.baumann.browser.activity.BrowserActivity$$ExternalSyntheticLambda3.onClick(Unknown Source:2)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at android.view.View.performClick(View.java:6298)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at android.view.View$PerformClick.run(View.java:24788)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:793)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:164)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6496)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
10-15 21:40:28.295  5911  5911 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
10-15 21:40:28.309  1902  2344 W ActivityManager:   Force finishing activity info.plateaukao.einkbro/de.baumann.browser.activity.BrowserActivity

(BTW, I may be able to help with debugging, so if there is anything I can do, please tell me.)

@plateaukao
Copy link
Owner

Is it happening after some version? or you just try to install EinkBro on your miReader device for the first time, and it just don't work normally? it looks like ninjaWebView is no initialized in the first place, but it should have in normal case.

@plateaukao
Copy link
Owner

I added some logic to make sure a proper webview being created. Could you try again with this version: c854c57

@plateaukao
Copy link
Owner

If you can set breakpoint for debugging, please help to check if it enters this line while starting the app: https://github.com/plateaukao/browser/blob/main/app/src/main/java/de/baumann/browser/activity/BrowserActivity.kt#L713

@Kazurin-775
Copy link
Author

The latest code (c854c57) seems to be fully working! No glitches / crashes right now. Thanks!


If you can set breakpoint for debugging, please help to check if it enters this line while starting the app

Yes, the breakpoint is hit on app startup.

Is it happening after some version? or you just try to install EinkBro on your miReader device for the first time, and it just don't work normally?

I've tried the F-Droid build (v8.17.0) and the GitHub release (v8.18.0), both versions have the same problem. Haven't tried any earlier version yet.

@plateaukao
Copy link
Owner

It should all crash for old versions. Because originally I don't expect any device will enter that line... so there's no implementation for that scenario. Thanks for verifying the fix for me. I'll have a release for this fix. :)

@plateaukao
Copy link
Owner

Here's the new version. :) https://github.com/plateaukao/browser/releases/tag/v8.18.1

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

No branches or pull requests

2 participants