microg / microg/GmsCore

Mapbox crashes sometimes

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

Initially app runs and map is shown, after sometime it forcecloses with Stacktrace as below,

android.content.res.Resources$NotFoundException: Resource ID #0x7f070099 type #0x4 is not valid
	at android.content.res.Resources.getDimension(Resources.java:757)
	at com.mapbox.android.gestures.StandardScaleGestureDetector.setSpanSinceStartThresholdResource(StandardScaleGestureDetector.java:271)
	at com.mapbox.android.gestures.AndroidGesturesManager.initDefaultThresholds(AndroidGesturesManager.java:155)
	at com.mapbox.android.gestures.AndroidGesturesManager.<init>(AndroidGesturesManager.java:140)
	at com.mapbox.android.gestures.AndroidGesturesManager.<init>(AndroidGesturesManager.java:87)
	at com.mapbox.android.gestures.AndroidGesturesManager.<init>(AndroidGesturesManager.java:77)
	at com.mapbox.mapboxsdk.maps.MapGestureDetector.<init>(MapGestureDetector.java:113)
	at com.mapbox.mapboxsdk.maps.MapView.initialiseMap(MapView.java:173)
	at com.mapbox.mapboxsdk.maps.MapView.access$800(MapView.java:63)
	at com.mapbox.mapboxsdk.maps.MapView$6.run(MapView.java:353)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7670)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

I have checked for error and lookedup com.mapbox.android.gestures package it contains dimen resource and has dp added as shown,

<dimen name="mapbox_defaultScaleSpanSinceStartThreshold">7dp</dimen>

If this error occurs, only clearing app data resolves the issue, kindly help to resolve.

mapbox dependency seems outdated, whether updating dependency will solve issues.

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 with MapView.initialiseMap and follow the stack trace through MapGestureDetector, AndroidGesturesManager, and StandardScaleGestureDetector. Check how the Mapbox gestures dependency resolves mapbox_defaultScaleSpanSinceStartThreshold and try to reproduce the crash, including whether clearing app data changes the result. Done means the map can initialize and remain usable without the Resources$NotFoundException.

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.