-
Notifications
You must be signed in to change notification settings - Fork 502
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
[iOS] Reopening map offline throws exception from SQLite and breaks #703
Comments
I suspect that style files are actually somewhere online and because in the implementation Is there a way to put styles offline too? Why doesn't this happen on Android? Some logs that I get
|
The style itself is, of course, bundled into the offline package and should be used by default instead of loading it from the network and failing. |
The reason behind is a leak. I will continue investigation if it's in my codebase or in mapbox for ios |
Fixing the leaks, it doesn't seem to be related. |
The first start of the map, when offline map loads correctly, the errors look like
The second start of the screen with the map, when offline map does not display anymore correctly, errors look like:
Nothing changes between two screens, second screen with the map just doesn't work because it can't load style even though it's already bundled into the map database that was side-loaded. @m0nac0 Do you have any iOS knowledge or maybe ideas why this could be happening? |
Unfortunately, my iOS dev knowledge is very limited, so I'm afraid I don't have an idea of what is going on here. @TimothySealy wrote a lot of the iOS code for this plugin, maybe he has got an idea? |
I have also noticed this in logs
|
This gets outputed on second call to |
I have also opened mapbox/mapbox-gl-native-ios#637 because it's highly likely issue is somewhere in original Mapbox-iOS SDK |
It looks like original mapbox-gl-native-ios SDK is not in active development for the last 2 years, they have probably been working on new v10 implementation |
@AAverin how did you managed to workaround this situation? |
@raphaaugustosilva I didn't. Another theoretical possibility are memory leaks that are now investigated in All in all, I don't know how to solve this problem yet. Some input of experienced iOS developer is needed here. @raphaaugustosilva If you will manage to reproduce the issue using original Mapbox iOS SDK sample app and post the example here, it would help greately with investigation |
@AAverin thanks! I also tried to download offline region in background with internet before opening the map for the first time without internet (using flutter mapbox downloadOfflineRegion method), but the error is the same. Thanks for the inputs, I`ll subscribe here in order to get more updates. |
It seems that database communication is implemented in the C++ layer of Mapbox. |
Another major flutter issue related to memory leaks: flutter/flutter#79605 |
Debugging some more I can confirm that even if there are completely no memory leaks in Flutter code Mapbox on iOS still throws @tobrun Is there any way to get some insight from Mapbox developers on this topic? |
Some issues that can be related: |
I can reproduce the bug with the following minimal example. The problem seems to be that MapboxMap is holding connection to Because I have eliminated all possible issues in dart code I think problem lies in ios implementation of mapbox sdk.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue is still relevant and not fixed |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue is still relevant and not fixed downstream |
Hi, I faced the same problem. Is there any workaround? |
@BartoszStasiurka If issue is still there, then probably it is related to some problem in the underlying mapbox ios sdk and it won't be fixed. |
@AAverin we are using this package in production for Android. Our customer is asking after an iOS port. Is this issue still a known issue? We run mostly offline so if it is likely to crash we need to advise them to wait on mapbox_maps_flutter. |
@raphael-bmec-co I have removed offline support from my product for now and didn't test since then. |
Thanks @AAverin. Appreciate the feedback. |
Neither
onMapReady
noronStyleLoaded
are not called when device is offlineThe text was updated successfully, but these errors were encountered: