microg / microg/GmsCore

com.lwcx.lw061 NPE com.google.android.gms.maps.internal.IUiSettingsDelegate.setMyLocationButtonEnabled

Open
#1,482 1 comment 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

Affected app
Name: Eachine Pro
Package id: com.lwcx.lw061

Describe the bug
Start the app and get a crash.

To Reproduce
Steps to reproduce the behavior:

  1. Start app
  2. Select either indoor or outdoor mode
  3. Crash

Expected behavior
App should not crash and does not on a stock Google phone with play services.

System
Android Version: 11
Custom ROM: CalyxOS

Additional context

05-27 11:52:16.940  2380  2380 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lwcx.lw061/com.lewei.multiple.main.LW93MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.google.android.gms.maps.internal.IUiSettingsDelegate.setMyLocationButtonEnabled(boolean)' on a null object reference
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:223)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7660)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
05-27 11:52:16.940  2380  2380 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.google.android.gms.maps.internal.IUiSettingsDelegate.setMyLocationButtonEnabled(boolean)' on a null object reference
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at com.google.android.gms.maps.UiSettings.setMyLocationButtonEnabled(Unknown Source:2)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at com.lewei.map.GooglesMap.initMap(GooglesMap.java:404)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at com.lewei.map.GooglesMap.<init>(GooglesMap.java:200)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at com.lewei.multiple.main.LW93MainActivity.onCreate(LW93MainActivity.java:614)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:8000)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7984)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
05-27 11:52:16.940  2380  2380 E AndroidRuntime:        ... 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

Use the supplied stack trace as the entry point, especially GooglesMap.initMap at line 404 and LW93MainActivity.onCreate at line 614, then trace the corresponding Maps implementation in GmsCore. Reproduce the indoor and outdoor startup flow on Android 11 with the reported environment; done means the app no longer crashes when either mode is selected. No repository test is named in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.