Skip to content
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

[android] Crash when remove bookmark #6217

Open
Jean-BaptisteC opened this issue Oct 5, 2023 · 5 comments
Open

[android] Crash when remove bookmark #6217

Jean-BaptisteC opened this issue Oct 5, 2023 · 5 comments
Assignees
Labels
Android Android development Bug Something isn't working CrashReports Crash Reporting

Comments

@Jean-BaptisteC
Copy link
Member

Steps to reproduce

  1. Select POI and add to bookmarks
  2. Leave place page and touch in same time the POI and bottom menu bookmarks
  3. List bookmark is opened -> remove bookmark
  4. Go back to map -> crash
WindowOnBackDispatcher  app.organicmaps.beta W  sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda17@4e3f86d
BaseMwmFragmentActivity app.organicmaps.beta I  Fragment 'BookmarkCategoriesFragment{bacf5d7} (8d4d9b5c-43a0-4171-9c8a-16fdf57df51f id=0x7f0b015f tag=app.organicmaps.bookmarks.BookmarkCategoriesFragment)' doesn't handle back press by itself.
OMcore app.organicmaps.beta I  organicmaps/Framework.cpp:878 Java_app_organicmaps_Framework_nativePlacePageActivationListener(): Set global map object listener
libc app.organicmaps.beta A  Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 23126 (rganicmaps.beta), pid 23126 (rganicmaps.beta)

System information:

  • Operating system and its version: Android 14
  • Organic Maps version: beta R8 optimizations
  • Device Model: Pixel 6
@Jean-BaptisteC Jean-BaptisteC added Android Android development CrashReports Crash Reporting labels Oct 6, 2023
@biodranik
Copy link
Member

@rtsisyk regression for R8?

@biodranik biodranik added this to the Release Blockers milestone Oct 7, 2023
@Jean-BaptisteC
Copy link
Member Author

Not, I'm able to reproduce on 2023.03.22-27-Google

@rtsisyk
Copy link
Contributor

rtsisyk commented Nov 1, 2023

It doesn't look related to R8, rather a some logical issue caused by refactoring of PlacePage. The problem that exists for 7 months and doesn't cause widespread pain shouldn't block the release. I will take a look if @arnaudvergnet is busy.

@Jean-BaptisteC
Copy link
Member Author

Reproduced during navigation when I remove POI from list bookmarks and the place page is opened

Cmdline: app.organicmaps
pid: 27437, tid: 27437, name: app.organicmaps  >>> app.organicmaps <<<
#00 pc 000000000082b43c  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/split_config.arm64_v8a.apk!liborganicmaps.so (offset 0x1000) (Java_app_organicmaps_bookmarks_data_BookmarkManager_nativeGetBookmarkXY+52) (BuildId: dfa27bf5fd08e99a775310b419ab62dfb90b5576)
#01 pc 00000000000a9fc0  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/oat/arm64/base.odex (art_jni_trampoline+112)
#03 pc 0000000000210970  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/oat/arm64/base.vdex (app.organicmaps.bookmarks.data.BookmarkManager.getBookmarkXY+0)
#05 pc 0000000000211b90  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/oat/arm64/base.vdex (app.organicmaps.bookmarks.data.Bookmark.<init>+124)
#09 pc 0000000000823da4  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/split_config.arm64_v8a.apk!liborganicmaps.so (offset 0x1000) (_JNIEnv::NewObject(_jclass*, _jmethodID*, ...)+116) (BuildId: dfa27bf5fd08e99a775310b419ab62dfb90b5576)
#10 pc 000000000084cd88  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/split_config.arm64_v8a.apk!liborganicmaps.so (offset 0x1000) (usermark_helper::CreateBookmark(_JNIEnv*, place_page::Info const&, jni::ScopedLocalRef<_jobjectArray*> const&, jni::ScopedLocalRef<_jobject*> const&, jni::ScopedLocalRef<_jobject*> const&)+568) (BuildId: dfa27bf5fd08e99a775310b419ab62dfb90b5576)
#11 pc 0000000000827cf8  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/split_config.arm64_v8a.apk!liborganicmaps.so (offset 0x1000) (usermark_helper::CreateMapObject(_JNIEnv*, place_page::Info const&)+280) (BuildId: dfa27bf5fd08e99a775310b419ab62dfb90b5576)
#12 pc 0000000000868060  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/split_config.arm64_v8a.apk!liborganicmaps.so (offset 0x1000) (BuildId: dfa27bf5fd08e99a775310b419ab62dfb90b5576)
#13 pc 000000000083a9f4  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/split_config.arm64_v8a.apk!liborganicmaps.so (offset 0x1000) (Java_app_organicmaps_Framework_nativePlacePageActivationListener+492) (BuildId: dfa27bf5fd08e99a775310b419ab62dfb90b5576)
#14 pc 00000000000a83dc  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/oat/arm64/base.odex (art_jni_trampoline+124)
#15 pc 00000000002cec8c  /data/app/~~gHFdVIl44sgFvUWec4D02g==/app.organicmaps-Il0MssgWt-R5FeQXxdfRNg==/oat/arm64/base.odex (app.organicmaps.MwmActivity.onStart+108)

@biodranik
Copy link
Member

Aha, so in navigation it is possible to open Place Page and then open Bookmarks and delete the selected bookmark.

Interesting, does Place Page in C++ keeps a pointer to the bookmark that is deleted? Or is it Java code that keeps a pointer to the already deleted bookmark?

@rtsisyk rtsisyk self-assigned this Dec 29, 2023
@rtsisyk rtsisyk removed this from the Next Release milestone Dec 29, 2023
@rtsisyk rtsisyk changed the title Crash when remove bookmark [android[ Crash when remove bookmark Dec 29, 2023
@rtsisyk rtsisyk changed the title [android[ Crash when remove bookmark [android] Crash when remove bookmark Dec 29, 2023
@rtsisyk rtsisyk added the Bug Something isn't working label Dec 29, 2023
fnael added a commit to fnael/organicmaps that referenced this issue Apr 5, 2024
App crashes when removing bookmark and returning to map after pressing
POI and bottom menu bookmarks at the same time. The crash happens
because after the delete, the app tries to find the deleted bookmark
id, which does not exist. The best solution I found, is to make so if
the app wants to use the getBookmark function and it doesnt find it, to
get the last bookmark present in the container, this eliminates the bug
but only if there are more than one bookmarks present on the container.

fixes organicmaps#6217

Signed-off-by: Francisco Nael Salgado <francisco.nael.salgado@tecnico.ulisboa.pt>
fnael added a commit to fnael/organicmaps that referenced this issue Apr 5, 2024
POI and bottom menu bookmarks at the same time. The crash happens
because after the delete, the app tries to find the deleted bookmark
id, which does not exist. The best solution I found, is to make so if
the app wants to use the getBookmark function and it doesnt find it, to
get the last bookmark present in the container, this eliminates the bug
but only if there are more than one bookmarks present on the container.

fixes organicmaps#6217

Signed-off-by: Francisco Nael Salgado <francisco.nael.salgado@tecnico.ulisboa.pt>
fnael added a commit to fnael/organicmaps that referenced this issue Apr 5, 2024
POI and bottom menu bookmarks at the same time. The crash happens
because after the delete, the app tries to find the deleted bookmark
id, which does not exist. The best solution I found, is to make so if
the app wants to use the getBookmark function and it doesnt find it, to
get the last bookmark present in the container, this eliminates the bug
but only if there are more than one bookmarks present on the container.

fixes organicmaps#6217

Signed-off-by: Francisco Nael Salgado <francisco.nael.salgado@tecnico.ulisboa.pt>
fnael added a commit to fnael/organicmaps that referenced this issue Apr 5, 2024
App crashes when removing bookmark and returning to map after pressing
POI and bottom menu bookmarks at the same time. The crash happens
because after the delete, the app tries to find the deleted bookmark
id, which does not exist. The best solution I found, is to make so
if the app wants to use the getBookmark function and it doesnt find
it, to get the last bookmark present in the container, this eliminates
the bug but only if there are more than one bookmarks present on the
container.

fixes organicmaps#6217

Signed-off-by: Francisco Nael Salgado <francisco.nael.salgado@tecnico.ulisboa.pt>
fnael added a commit to fnael/organicmaps that referenced this issue Apr 9, 2024
App crashes when removing bookmark and returning to map after pressing
POI and bottom menu bookmarks at the same time. The crash happens
because after the delete, the app tries to find the deleted bookmark id,
which does not exist. The best solution I found, is to make so if the app
wants to use the getBookmark function and it doesnt find it, to get the
last bookmark present in the container, this eliminates the bug but only if
there are more than one bookmarks present on the container.

fixes organicmaps#6217

Signed-off-by: Francisco Nael Salgado <francisco.nael.salgado@tecnico.ulisboa.pt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android development Bug Something isn't working CrashReports Crash Reporting
Projects
Status: No status
Development

No branches or pull requests

3 participants