maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
226 stars 125 forks source link

Using mapbox flutter and then the app crashed, #257

Closed gnuHnauT1 closed 1 year ago

gnuHnauT1 commented 1 year ago

When i click on each element of the list containing the fillLayers and it switches to the map screen it gives the error below and then it crashes the app (14224): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 14619 (Thread-12), pid 14224 (com.nylo.dev) [+1303 ms] [ ] Build fingerprint: 'google/sdk_gphone64_x86_64/emu64x:13/TE1A.220922.021/9526604:userdebug/dev-keys' [ ] Revision: '0' [ ] ABI: 'x86_64' [ ] Timestamp: 2023-06-22 09:23:05.039232600+0700 [ ] Process uptime: 111s [ ] Cmdline: com.nylo.dev [ ] pid: 14224, tid: 14619, name: Thread-12 >>> com.nylo.dev <<< [ ] uid: 10159 [ ] signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000 [ ] Cause: null pointer dereference [ ] rax 0000000000000000 rbx 00007cf19df5e710 rcx 0000000000000001 rdx 0000000000000001 [ ] r8 00007cf19df5e628 r9 0000000000000001 r10 000000000010142c r11 00007cf4bae5af58 [ ] r12 00007cf1beeb2434 r13 00007cf19df5e890 r14 0000000000000001 r15 00007cf2e4080598 [ ] rdi 0000000000000000 rsi 0000000000000000 [ ] rbp 0000000000000000 rsp 00007cf19df5e6c0 rip 00007cf1a677ecc9 [ ] backtrace: [ ] #00 pc 000000000012dcc9 /data/app/~~nslCNlL1x7DQVLUAG1TBXQ==/com.nylo.dev-qYYnHqqfaEbr2a2-bpPnhg==/lib/x86_64/libmapbox-gl.so
(BuildId: 2b1b382e74e191d84e840b9f99f12d3b2b84506e) [ ] #01 pc 000000000012dbf4 /data/app/~~nslCNlL1x7DQVLUAG1TBXQ==/com.nylo.dev-qYYnHqqfaEbr2a2-bpPnhg==/lib/x86_64/libmapbox-gl.so
(BuildId: 2b1b382e74e191d84e840b9f99f12d3b2b84506e) [ ] #02 pc 00000000000ac89e /data/app/~~nslCNlL1x7DQVLUAG1TBXQ==/com.nylo.dev-qYYnHqqfaEbr2a2-bpPnhg==/lib/x86_64/libmapbox-gl.so
(BuildId: 2b1b382e74e191d84e840b9f99f12d3b2b84506e) [ ] #03 pc 000000000037d70b /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+219) (BuildId: 44bc52550248fc712a381bef164b75c7) [ ] #04 pc 0000000000369aed /apex/com.android.art/lib64/libart.so (nterp_helper+3837) (BuildId: 44bc52550248fc712a381bef164b75c7)
[ ] #05 pc 0000000000428434 [anon:dalvik-classes.dex extracted in memory from /data/app/~~nslCNlL1x7DQVLUAG1TBXQ==/com.nylo.dev-qYYnHqqfaEbr2a2-bpPnhg==/base.apk] (com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onDrawFrame+12) [ ] #06 pc 0000000000369a88 /apex/com.android.art/lib64/libart.so (nterp_helper+3736) (BuildId: 44bc52550248fc712a381bef164b75c7)
[ ] #07 pc 000000000042b8f8 [anon:dalvik-classes.dex extracted in memory from /data/app/~~nslCNlL1x7DQVLUAG1TBXQ==/com.nylo.dev-qYYnHqqfaEbr2a2-bpPnhg==/base.apk]

JulianBissekkou commented 1 year ago

This is a known issue. The maplibre team introduced useDelayedDisposal which should decrease the possibility that this issue happens. However it doesn't fix the issue which is why the plugin is not usable (for us) on android at the moment.

JulianBissekkou commented 1 year ago

See #182

JulianBissekkou commented 1 year ago

@gnuHnauT1 Can you integrate the branch tappeddev:182-disposal-null-ref-crash and see if it works?

JulianBissekkou commented 1 year ago

@gnuHnauT1 If you need help testing this fix then let me know :)

JulianBissekkou commented 1 year ago

Closing this since its a duplicate of #182