-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fatal crash on iOS when deleting tiles #159
Comments
Hi @TraceDeTrail, |
Thanks for your quick reply :-) |
This comment was marked as off-topic.
This comment was marked as off-topic.
The issue looks like a potential ObjectBox issue, very similar to objectbox/objectbox-dart#379. I wonder whether the fix/ The second issue has been reported before, but I think it occurs because iOS has a really strict filesystem, and it doesn't want the app to write to the specified location. This isn't directly an FMTC issue, and there's not a lot I can do about that - if you need the functionality, try a different location and make sure you have ALL possible filesystem permissions. But thanks for trying! |
The last breakpoint I can catch, before the app crashes, is in the deleteTiles function (worker.dart) on the line Here is a MRE (Flutter 3.22.2) :
|
Hi @TraceDeTrail,
|
Can this log help you ?
|
Thanks, that looks useful. Interestingly, there is no reference to 'ObjectBox' there, only 'path_provider_foundation'. Is this the same crash the initially reported one where it seemed to crash on this line: |
Yes, that's it |
Issue filed to 'path_provider': flutter/flutter#151072. |
Issue filed to ObjectBox: objectbox/objectbox-dart#654. |
Does this issue occur in release mode? Does it occur when you install the app in debug mode, then detach the debugger and Flutter tools, and just try to open the app? |
This issue occurs in debug and release mode. With the version that used Isar, everything worked fine. |
I'm getting the same issue on iOS indeed, on Android on the other hand everything works as expected 👀 |
I would appriciate any additional information! |
Can anyone experiencing this issue please try the following:
|
These were the information that I was able to collect: Problem Report for Runner
Flutter Debugger[ ] Lost connection to device.
[ +1 ms] DevFS: Deleting filesystem on the device
(file:///Users/azzeccagarbugli/Library/Developer/CoreSimulator/Devices/DA49F58D-7CAE-401A-83BF-B3D2A763490F/data/Containers/Data/Application/76C01
BF9-43C7-4B67-AE69-3B208787B21F/tmp/flutter-appUBZF06/flutter-app/)
[ +255 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[ +7 ms] "flutter run" took 94,921ms.
[ +118 ms] ensureAnalyticsSent: 64ms
[ ] Running 1 shutdown hook
[ +3 ms] Shutdown hooks complete
[ +1 ms] exiting with code 0
I'll try this as soon as possible, for now, I just disabled the feature on iOS. If I can help you any further just let me know 🫶🏻 |
I get this error : |
Please try using that as a normal dependency and remove the existing one? Looks like it's getting confused. Make sure you I need to make the distinction as to whether it's an ObjectBox or path_provider issue. |
I've already done that... Here's the pubspec.yaml
|
Please If that doesn't work, clone the repo, verify it's on that branch, then depend on it locally. I know (99%: tests are passing and example app is fine) there are no syntax errors, and I didn't even touch that area. I need to make the distinction as to whether it's an ObjectBox or path_provider issue. |
I clones the repo locally (the rootDirectory argument is required) ; the app crashes again EXC_BAD_ACCESS (no dependency on path_provider)... I don't know if this helps, but when I catch all the exceptions, I get this error: |
This is expected. It is fully internally handled and part of normal functioning. It occurs when you try to create a store multiple times (but FMTC silences this error). Can you post the iOS logs again (like #159 (comment)), using the new setup? Thanks for all the help! |
Sorry for my late reply...
|
Hi @JaffaKetchup, I guess we just need to wait for the ObjectBox issue to be resolved? Is there a workaround that can be used? I guess there is not currently a released version of flutter_map_tile_caching that works with flutter_map v7 that does not have this bug? Thanks! |
Hi @RedHappyLlama, |
Hi @JaffaKetchup, what info do you need that could help? I believe the V6-backport iteration is the most recent stable iOS version? Could you use elements from that for iOS only in your latest version? I know that still works on the latest iOS as it's what I'm still using. Although it may not be the fastest theoretical version, it could be a stable fix until the ObjectBox issue is resolved? I appreciate a lot has changed since V6 so unlikely to be feasible. |
There's no more information I could use for now, but I'll have a look tonight (BST) to see whether I can implement an alternative solution, so it would be useful to have someone that could test. Maybe if you're open to chatting on Discord? Its not possible to use any part of v6 in any version after v6. v6 used a filesystem storage mechanism, which is why it was slow, but more reliable. Now I look back on it, maybe using the filesystem wasn't so bad after all :D. Maybe I can implement an alternative backend at some point, but I really hope it's not necessary, since it will be difficult and even slower to implement the 'tiles-across-stores' functionality. |
I would appriciate it if someone could test out #166! Just needs a dependency replacement pointing to the git branch 'fix-deletetiles', no other changes to code. |
@JaffaKetchup Looks like your fix (in #166) is working! My app was crashing every time I've tried to remove a store, but after switching to this branch I am not able to replicate the crash or any errors in the console! |
Thanks for testing @zigapovhe. Quick question, do you use the import functionality on iOS (and if you do, I'm assuming it was working)? |
Fixed in v9.1.3. Although this is an issue with ObjectBox, I've found another method that works. Although streaming would be more efficient, this seems to have negligible effect. |
I don't use import functionality, so sorry :P No idea. |
Thanks for resolving @JaffaKetchup !!!! |
What is the bug?
Application crashes on IOS when trying to delete or empty the store since using ObjectBox
How can we reproduce it?
The example project reproduces the bug
Do you have a potential solution?
No response
Platforms
iOS 17
Severity
Fatal: Causes the application to crash
The text was updated successfully, but these errors were encountered: