Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Freezes when going back and forth between activites #2018

Closed

Description

@erf

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

Activity

  1. added
    Android
    on Aug 9, 2015
  2. erf commented on Aug 12, 2015

    @erf
    ContributorAuthor

    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.

  3. erf commented on Aug 12, 2015

    @erf
    ContributorAuthor

    I just made a simple example now on latest 4025da6 and this seem to work now! I close this for now.

  4. reopened this on Aug 12, 2015
  5. erf commented on Aug 12, 2015

    @erf
    ContributorAuthor

    This issue is back after i added loading mapView as a fragment described in #2042

  6. tobrun commented on Aug 17, 2015

    @tobrun
    Member

    Was able to reproduce this occasionally with following setup:
    Genymotion - Google Nexus 5.0.0 image - 0.0.1-SNAPSHOT

    Actions:
    Open activity with MapView, scroll-zoom actions like a maniac, open other Activity containing a MapView. Application becomes unresponsive and screens turns black. Only option is to kill-app by swiping it from recents.

    Used Activities:
    StyledMapActivity - SearchMapActivity

    Full stacktrace - code

  7. erf commented on Aug 17, 2015

    @erf
    ContributorAuthor

    I think the app crashes when trying to open a new activity whilst the MapView is still loading tiles.

    Threading issue?

  8. ljbade commented on Aug 17, 2015

    @ljbade
    Contributor

    I also wonder if it is related to state saving.

  9. ljbade commented on Aug 17, 2015

    @ljbade
    Contributor

    @kkaefer Is there anything in the C++ layer to be aware of when there are multiple instances of a map?

  10. kkaefer commented on Aug 17, 2015

    @kkaefer
    Member

    @ljbade it should be possible and I'm not aware of an issues, but of course there could be bugs when using multiple instances.

  11. incanus commented on Aug 18, 2015

    @incanus
    Contributor

    We are handling multiple maps in iOS ok right now.

  12. ljbade commented on Aug 18, 2015

    @ljbade
    Contributor

    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?

  13. tobrun commented on Aug 18, 2015

    @tobrun
    Member

    @ljbade a simple test app can be found here

  14. 51 remaining items

  15. bleege commented on Sep 16, 2015

    @bleege
    Contributor

    The plan is to remove 3764b051e4c9944ddbc3bcc9c8fd1beb8a28451e from 2018-shared-sqlite and then merge @ljbade's fix into master. We can then cherrypick that commit into release-android-0.1.0 so that both master and release-android-0.1.0 have it and a SNAPSHOT can be rolled because release-android-0.1.0 does not have the geojsonvt stuff.

    Concurrently @lucaswoj @mikemorris will work on getting geojsonvt working again so that regular Android development can continue on master.

    /cc @jfirebaugh

  16. incanus commented on Sep 16, 2015

    @incanus
    Contributor

    Refs #2344 re: geojsonvt problems introduced.

  17. bleege commented on Sep 16, 2015

    @bleege
    Contributor

    Merged. Now the cherrypick to release-android-0.1.0.

  18. incanus commented on Sep 16, 2015

    @incanus
    Contributor

    Speculatively fixed in #2345.

  19. erf commented on Sep 16, 2015

    @erf
    ContributorAuthor

    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
    
  20. incanus commented on Sep 16, 2015

    @incanus
    Contributor

    @erf We are tracking that in #2348. For now you can test out the release-android-v0.1.0 branch, where we cherry-picked the fix, to essentially be based off of an older version of master that builds fine.

  21. erf commented on Sep 16, 2015

    @erf
    ContributorAuthor

    Ok, thanks!

  22. erf commented on Sep 17, 2015

    @erf
    ContributorAuthor

    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
    It seems to work much better now, however i experienced a crash after going back and forth between the activites a few times, in the log i only got these:

    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)
    
  23. added 5 commits that reference this issue on Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidbug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions