-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Freezes when going back and forth between activites #2018
Comments
This also seem to happen if i moved the map first and then click on a button which opens the new activity. I don't see any information in the Log regarding this. I suspected this may be a memory issue when opening the map several times, so i even tried to make the mapview static, but with same result. I suspect now that some state is getting set when you move the map, but i have no idea what causes the crash. |
I just made a simple example now on latest 4025da6 and this seem to work now! I close this for now. |
This issue is back after i added loading mapView as a fragment described in #2042 |
Was able to reproduce this occasionally with following setup: Actions: Used Activities: |
I think the app crashes when trying to open a new activity whilst the MapView is still loading tiles. Threading issue? |
I also wonder if it is related to state saving. |
@kkaefer Is there anything in the C++ layer to be aware of when there are multiple instances of a map? |
@ljbade it should be possible and I'm not aware of an issues, but of course there could be bugs when using multiple instances. |
We are handling multiple maps in iOS ok right now. |
Hmm going to have to create a simple test app to see if I can reproduce it. @incanus Do you recall if there were any specific fixes/changes that perhaps did not make it to Android to enable multiple maps? |
Thanks @tobrunvannuland |
Simple test case: |
I done some reading at it appears the Android system does not support two So this bug might be due to limitations as a result of using Perhaps we will need to switch to |
We are pushing @bleege ? |
@ljbade Thanks for looking into this. Before we can make a decision on milestone can you provide more detail as to why you believe |
@bleege Basically we use
|
Although we also need to test if |
@erf Do you mind recreating the bug against the I would like to know if this is a solution. |
Will do. Just really busy right now.. |
@bleege Can you give https://github.com/mapbox/mapbox-gl-native/tree/2018-shared-sqlite a test drive? Testing on the Samsung S6 I don't get the database lock errors. But I still get the freeze on rotation and the occasional crash. |
Exited for this progress! Cheering =) |
@ljbade can we use a uv_once/pthread_once? |
Actually never mind, the existing code looks good. |
I'm adding a |
I'm looking into the |
Ok, I've done my time in C++ land and can test this out now. |
To round this out, we should probably get rid of iOS's |
To be clear: it's not a blocker and we can ticket off the iOS refactor separately. |
The plan is to remove 3764b051e4c9944ddbc3bcc9c8fd1beb8a28451e from Concurrently @lucaswoj @mikemorris will work on getting /cc @jfirebaugh |
Refs #2344 re: |
Merged. Now the cherrypick to |
Speculatively fixed in #2345. |
Awsome work !! I would like to test this out but i get the following build error: deps/run_gyp geojsonvt.gyp -Iconfig.gypi --depth=. -Goutput_dir=. --generator-output=./build -f make make -C build install CXX(target) Release/obj.target/geojsonvt/src/geojsonvt.o CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_clip.o CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_convert.o CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_simplify.o CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_tile.o LIBTOOL-STATIC Release/libgeojsonvt.a error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_clip.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_convert.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_simplify.o is not an object file (not allowed in a library) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_tile.o is not an object file (not allowed in a library) make[3]: *** [Release/libgeojsonvt.a] Error 1 make[2]: *** [install] Error 2 make[1]: *** [config/android-arm-v7.gypi] Error 2 make: *** [android-lib] Error 2 |
Ok, thanks! |
i checked out the 'release-android-v0.1.0' branch, built it and tried it with my test app here: https://github.com/erf/mapbox-drawer-glitch/tree/open-activity-whilst-scrolling 09-17 12:21:23.961 32460-32671/? A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x3c in tid 32671 (sm-v1/2/2/1.pbf) 09-17 12:28:04.231 3204-3483/? A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x3c in tid 3483 (-v1/6/33/16.pbf) |
If you add a button to the main view in the test app, and open an arbitrary activity on a click event and then closes it, moves the map and click the button again, the app freezes on my nexus 7 (2012).
I made a simple test case here:
https://github.com/erf/mapbox-gl-native/tree/freezes
The text was updated successfully, but these errors were encountered: