mapbox / mapbox/mapbox-navigation-android-examples

TutnByTurnExperienceActivity App crashes on startUp

Đang mở
#159 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

jira-sync-complete
Ngôn ngữ chính
Kotlin
Star
65
Fork
56
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
2

Mô tả

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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện quá trình khởi động trong TutnByTurnExperienceActivity và lần theo crash qua stack trace, bắt đầu từ BitmapUtils.kt và LocationIndicatorLayerRenderer.kt. Xác nhận rằng quá trình khởi tạo thành phần vị trí không còn gọi Bitmap.createBitmap với các kích thước bằng 0, sau đó kiểm tra rằng ứng dụng khởi động mà không gặp ngoại lệ nghiêm trọng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, kotlin
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.