microg / microg/GmsCore

Bestee offline Voice assistant crashing

Open
#1,350 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

I tried to install the app Bestee to make use of an offline voice assistant. Unfortunately the app crashes while starting.

Here's the log attached

time: 1609523584995 msg: java.lang.NullPointerException: Attempt to invoke interface method 'int android.content.SharedPreferences.getInt(java.lang.String, int)' on a null object reference stacktrace: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.emileferreira.bestee/com.emileferreira.bestee.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int android.content.SharedPreferences.getInt(java.lang.String, int)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940) Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'int android.content.SharedPreferences.getInt(java.lang.String, int)' on a null object reference at com.emileferreira.bestee.MainActivity.onInit(Unknown Source:5) at android.speech.tts.TextToSpeech.dispatchOnInit(TextToSpeech.java:835) at android.speech.tts.TextToSpeech.initTts(TextToSpeech.java:813) at android.speech.tts.TextToSpeech.<init>(TextToSpeech.java:744) at android.speech.tts.TextToSpeech.<init>(TextToSpeech.java:723) at android.speech.tts.TextToSpeech.<init>(TextToSpeech.java:707) at com.emileferreira.bestee.MainActivity.onCreate(Unknown Source:69) at android.app.Activity.performCreate(Activity.java:7824) at android.app.Activity.performCreate(Activity.java:7813) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) ... 11 more

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash during app startup and inspect MainActivity.onCreate and its onInit callback, where the log identifies the null SharedPreferences access. Confirm the app reaches the main screen without the reported NullPointerException, including the TextToSpeech initialization path.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.