mapbox / mapbox/mapbox-navigation-android-examples

TutnByTurnExperienceActivity App crashes on startUp

Offen
#159 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

jira-sync-complete
Vorherrschende Sprache
Kotlin
Sterne
65
Forks
56
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
2

Beschreibung

2022-10-30 05:48:26.574 4553-4553/com.delaxesoft.smarttransportcity E/Mapbox: [nav-sdk]: [ViewportDataSourceProcessor] Provided following padding does not fit the map size:
mapSize: [width: 64.0, height: 64.0]
padding: [top: 360.0, left: 80.0, bottom: 300.0, right: 80.0]
Using an empty fallback padding instead: [top: 360.0, left: 80.0, bottom: 300.0, right: 80.0]
2022-10-30 05:48:26.607 4553-4553/com.delaxesoft.smarttransportcity E/Mapbox: [nav-sdk]: [ViewportDataSourceProcessor] Provided following padding does not fit the map size:
mapSize: [width: 64.0, height: 64.0]
padding: [top: 360.0, left: 80.0, bottom: 300.0, right: 80.0]
Using an empty fallback padding instead: [top: 360.0, left: 80.0, bottom: 300.0, right: 80.0]
2022-10-30 05:48:27.170 4553-4553/com.delaxesoft.smarttransportcity E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.delaxesoft.smarttransportcity, PID: 4553
java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.createBitmap(Bitmap.java:1042)
at android.graphics.Bitmap.createBitmap(Bitmap.java:1009)
at android.graphics.Bitmap.createBitmap(Bitmap.java:959)
at android.graphics.Bitmap.createBitmap(Bitmap.java:920)
at com.mapbox.maps.plugin.locationcomponent.utils.BitmapUtils.getBitmapFromDrawable(BitmapUtils.kt:31)
at com.mapbox.maps.plugin.locationcomponent.LocationIndicatorLayerRenderer.setupBitmaps(LocationIndicatorLayerRenderer.kt:80)
at com.mapbox.maps.plugin.locationcomponent.LocationIndicatorLayerRenderer.initializeComponents(LocationIndicatorLayerRenderer.kt:27)
at com.mapbox.maps.plugin.locationcomponent.LocationPuckManager.initialize(LocationPuckManager.kt:102)
at com.mapbox.maps.plugin.locationcomponent.LocationComponentPluginImpl$activateLocationComponent$1.invoke(LocationComponentPluginImpl.kt:207)
at com.mapbox.maps.plugin.locationcomponent.LocationComponentPluginImpl$activateLocationComponent$1.invoke(LocationComponentPluginImpl.kt:184)
at com.mapbox.maps.plugin.MapDelegateProviderImpl.getStyle$lambda-0(MapDelegateProviderImpl.kt:21)
at com.mapbox.maps.plugin.MapDelegateProviderImpl.$r8$lambda$prB63jRkHNgIjSUbBTljg7oBEc8(Unknown Source:0)
at com.mapbox.maps.plugin.MapDelegateProviderImpl$$ExternalSyntheticLambda0.onStyleLoaded(Unknown Source:2)
at com.mapbox.maps.StyleObserver.onStyleLoaded(StyleObserver.kt:96)
at com.mapbox.maps.NativeObserver.notify(NativeObserver.kt:63)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:330)
at android.os.Looper.loop(Looper.java:169)
at android.app.ActivityThread.main(ActivityThread.java:7143)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876)

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den Start in TutnByTurnExperienceActivity zu reproduzieren, und verfolge den Absturz anhand des Stacktraces zurück, beginnend bei BitmapUtils.kt und LocationIndicatorLayerRenderer.kt. Bestätige, dass die Initialisierung der Standortkomponente Bitmap.createBitmap nicht mehr mit Dimensionen von null aufruft, und überprüfe anschließend, dass die App ohne die fatale Ausnahme startet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, kotlin
Bereich
mobile
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.