Skip to content

Conversation

rohit9625
Copy link
Collaborator

Description (required)

Fixes #6410

What changes did you make and why?
Changes made:

  • Upgraded maplibre-native to version 11.3.5 and AGP to 8.13.0
  • Upgraded fresco library to latest version (3..6.0 and resolve build issuees

Tests performed (required)

Tests pending, we need to test:

  • Image upload flow with location
  • Ensure images are loading at all places, i.e., Explore, Contributions, Nearby, etc.
  • Test adding images to places in the Nearby

Tested {build variant, e.g. ProdDebug} on {name of device or emulator} with API level {API level}.

Screenshots (for UI changes only)
none

@RitikaPahwa4444
Copy link
Collaborator

@rohit9625 did you test it both on Android 15 and 16? Confirming because you'd an Android 16 device and had been testing on Android 15 but the PR description doesn't have those details.

@rohit9625
Copy link
Collaborator Author

I have an Android 15 device but I only tested on Android 15 emulator with 16kb enabled.

I couldn't find the option to enable 16kb page size on my physical device. However, I'll try uploading some images from my device without 16Kb as we need to make sure it works on both types of devices.

Copy link

github-actions bot commented Oct 5, 2025

✅ Generated APK variants!

@nicolas-raoul
Copy link
Member

I experience a crash on this branch, which can not be reproduced on main:

  1. Start the app
  2. Tap the Explore globe
  3. Tap Map
  4. Problem 1: It shows latitude=0 longitude=0 even though it has location permission.
  5. Tap the round button to center the map on your location
  6. Problem 2: Crash
java.lang.ArrayIndexOutOfBoundsException: length=3; index=4
at java.util.concurrent.CopyOnWriteArrayList.elementAt(CopyOnWriteArrayList.java:394)
at java.util.concurrent.CopyOnWriteArrayList.get(CopyOnWriteArrayList.java:407)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.recenterMarkerToPosition(ExploreMapFragment.kt:967)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.locationPermissionGranted(ExploreMapFragment.kt:561)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.recenterMap(ExploreMapFragment.kt:597)
at fr.free.nrw.commons.explore.map.ExploreMapPresenter.setActionListeners$lambda$0(ExploreMapPresenter.kt:101)
at fr.free.nrw.commons.explore.map.ExploreMapPresenter.$r8$lambda$oeKwezOmrjNThitzH6gJZdvS3es(Unknown Source:0)
at fr.free.nrw.commons.explore.map.ExploreMapPresenter$$ExternalSyntheticLambda3.onClick(D8$$SyntheticClass:0)
at android.view.View.performClick(View.java:8228)
at android.view.View.performClickInternal(View.java:8205)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:31785)
at android.os.Handler.handleCallback(Handler.java:1041)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.dispatchMessage(Looper.java:315)
at android.os.Looper.loopOnce(Looper.java:251)
at android.os.Looper.loop(Looper.java:349)
at android.app.ActivityThread.main(ActivityThread.java:9041)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Oct 5, 2025

Something strange is going on with Bookmarks>Pictures too, I am afraid. But I have not find a reproduction procedure yet.

java.lang.IllegalStateException: Fragment ExploreMapFragment{a0b6405} (1e0f8cd0-f2e4-42cf-a0ad-f41f557a246a) not attached to an activity.
at androidx.fragment.app.Fragment.requireActivity(Fragment.java:928)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.isNetworkConnectionEstablished(ExploreMapFragment.kt:482)
at fr.free.nrw.commons.explore.map.ExploreMapPresenter.updateMap(ExploreMapPresenter.kt:36)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.handleLocationUpdate(ExploreMapFragment.kt:476)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.onLocationChangedSlightly(ExploreMapFragment.kt:468)
at fr.free.nrw.commons.location.LocationServiceManager.onLocationChanged(LocationServiceManager.kt:205)
at android.location.LocationListener.onLocationChanged(LocationListener.java:63)
at android.location.LocationManager$LocationListenerTransport$1.operate(LocationManager.java:3303)
at android.location.LocationManager$LocationListenerTransport$1.operate(LocationManager.java:3300)
at com.android.internal.listeners.ListenerExecutor.lambda$executeSafely$0(ListenerExecutor.java:127)
at com.android.internal.listeners.ListenerExecutor$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at android.os.Handler.handleCallback(Handler.java:1041)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.dispatchMessage(Looper.java:315)
at android.os.Looper.loopOnce(Looper.java:251)
at android.os.Looper.loop(Looper.java:349)
at android.app.ActivityThread.main(ActivityThread.java:9041)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)

@RitikaPahwa4444
Copy link
Collaborator

RitikaPahwa4444 commented Oct 5, 2025

I have this commit installed on my device and it crashes on tapping the target button on explore map: 6.0.2-debug-HEAD~f641e70. I'd reported a similar issue recently (user crash reports for v6.0.2). I've not installed the above APKs yet.

STACK_TRACE=java.lang.ArrayIndexOutOfBoundsException: length=33; index=33
at java.util.concurrent.CopyOnWriteArrayList.elementAt(CopyOnWriteArrayList.java:394)
at java.util.concurrent.CopyOnWriteArrayList.get(CopyOnWriteArrayList.java:407)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.recenterMarkerToPosition(ExploreMapFragment.kt:940)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.locationPermissionGranted(ExploreMapFragment.kt:534)
at fr.free.nrw.commons.explore.map.ExploreMapFragment.recenterMap(ExploreMapFragment.kt:570)
at fr.free.nrw.commons.explore.map.ExploreMapPresenter.setActionListeners$lambda$0(ExploreMapPresenter.kt:101)
at fr.free.nrw.commons.explore.map.ExploreMapPresenter.$r8$lambda$oeKwezOmrjNThitzH6gJZdvS3es(Unknown Source:0)
at fr.free.nrw.commons.explore.map.ExploreMapPresenter$$ExternalSyntheticLambda3.onClick(D8$$SyntheticClass:0)
at android.view.View.performClick(View.java:7684)
at android.view.View.performClickInternal(View.java:7661)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:30344)
at android.os.Handler.handleCallback(Handler.java:1000)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loopOnce(Looper.java:242)
at android.os.Looper.loop(Looper.java:362)
at android.app.ActivityThread.main(ActivityThread.java:8448)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:992)

@rohit9625
Copy link
Collaborator Author

Yes, I'm also able to repro the crash on Explore for both this PR branch and main branch. Also, the problem 1 in this comment also seems to be happening on main. I can't see anything or any map at the Explore->Map, like on Nearby tab.

@rohit9625
Copy link
Collaborator Author

Something strange is going on with Bookmarks>Pictures too, I am afraid. But I have not find a reproduction procedure yet.

Do you have any bookmarks when got the above crash?

@nicolas-raoul
Copy link
Member

Explore>Map: Interesting, for me both problems do not happen on main, only on this branch.

Bookmarks: Yes, I have some pictures bookmarked, and tapped one of them on the Bookmarks activity. The crash did not happen immediately. I will need to test more.

adb shell getconf PAGE_SIZE tells me 4096 for that device.

@rohit9625
Copy link
Collaborator Author

Explore>Map: Interesting, for me both problems do not happen on main, only on this branch.

Bookmarks: Yes, I have some pictures bookmarked, and tapped one of them on the Bookmarks activity. The crash did not happen immediately. I will need to test more.

Okay, I'll also test this Bookmark flow.

adb shell getconf PAGE_SIZE tells me 4096 for that device.

Okay, so running on 4KB. That's great, we need to test on both page sizes and I'll also try to repro the issue on my physical device. Thanks :)

@nicolas-raoul
Copy link
Member

When uploading a pic, depiction search does not seem to work, there are always zero suggestions:

Screenshot_20251006-140912~2.png

@RitikaPahwa4444
Copy link
Collaborator

How about breaking this down and figuring out which one is causing the crashes? If it's fresco, we can migrate. If MapLibre, we can look for a different version. Will help in narrowing down the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support 16 KB page sizes
3 participants