JaffaKetchup / flutter_map_tile_caching

Plugin for flutter_map providing advanced & performant caching and bulk downloading functionality, with many options for region shapes and extra tools
https://pub.dev/packages/flutter_map_tile_caching
GNU General Public License v3.0
117 stars 73 forks source link

[BUG] IOS malloc_error_break crash #121

Closed eidolonFIRE closed 1 year ago

eidolonFIRE commented 1 year ago

What is the bug?

Crash on launch. (including the very first launch with v7)

iOS: 16.1.1 Flutter: 3.7.12 FMTC: 7.2.0

I have the isar dependency fix in place and it works fine on Android.

dependency_overrides:
  isar: 3.0.6-dev.0
  isar_flutter_libs: 3.0.6-dev.0
flutter: ╔══════════════════════════════════════════════════════════╗
flutter: ║                   ISAR CONNECT STARTED                   ║
flutter: ╟──────────────────────────────────────────────────────────╢
flutter: ║           Open the link to connect to the Isar           ║
flutter: ║          Inspector while this build is running.          ║
flutter: ╟──────────────────────────────────────────────────────────╢
flutter: ║ https://inspect.isar.dev/3.0.6-dev.0/#/60346/9JQf1qJWK0Y ║
flutter: ╚══════════════════════════════════════════════════════════╝
Runner(75844,0x16ed4f000) malloc: *** error for object 0xffffffffffffffff: pointer being freed was not allocated
Runner(75844,0x16ed4f000) malloc: *** set a breakpoint in malloc_error_break to debug
* thread #33, name = 'isarworker', stop reason = signal SIGABRT
    frame #0: 0x00000001c86a0200 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x1c86a0200 <+8>:  b.lo   0x1c86a0220               ; <+40>
    0x1c86a0204 <+12>: pacibsp
    0x1c86a0208 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1c86a020c <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Lost connection to device.

I'm migrating to v7 (from v6) and following the example provided here in the repo. Unfortunately, iOS just crashes while Android is fine.

Any hints or suggestions welcome 👍 Maybe someone has seen this before or has some intuition on where to start looking.

Is it even worth looking into? Should I just jump back to /v6-backporting ?

What is the expected behaviour?

Expected isar system comes up...

How can we reproduce this issue?

No response

Do you have a potential solution?

No response

Can you provide any other information?

No response

Platforms Affected

iOS

Severity

Fatal: Causes the application to crash

Frequency

Consistently: Always occurs at the same time and location

Requirements

eidolonFIRE commented 1 year ago

( I did see #118 , btw. I felt mine looked a bit different. 🤷 Maybe it's the same? )

JaffaKetchup commented 1 year ago

Hey @eidolonFIRE, can you try the v8 prerelease? It's stable, and just waiting for the next FM release. It might fix your issue, as it uses Isar 3.1.0 which had some stability fixes.

JaffaKetchup commented 1 year ago

Hey @eidolonFIRE, v8 has now been released with Isar v3.1 & flutter_map v4 support. This issue looks like it might be fixed by Isar v3.1, so please give it a try and let me know if it resolved your issue.

eidolonFIRE commented 1 year ago

I got started upgrading to FM v4 / FMTC v8. Unfortunately, it broke too many of my plug-ins and features, so that'll have to wait till I have bandwidth to pull forward everything I'm using (prolly next quarter).

In the meantime, I've reverted to v6-backporting.

Thank you so much for all the hard work! FMTC is an important part of my app. ❤️

JaffaKetchup commented 1 year ago

Sure, no problem at all. If you can spare any change, please consider donating if you haven't already - it's always appreciated!