[android] SecurityException on opening GPX / KML files on a cold start #6944
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#6944
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
In the latest release version of Organic Maps (2023.12.21-1-Google), opening *.gpx files in Organic Maps causes the app to crash. In certain scenarios, this also causes data loss (deleted files) and turns the user's folder into a 0 byte folder that cannot be interacted with any more.
Describe the issue
When inserting a MicroSD card into an Android device, the Android operating system gives two options: extended internal phone storage, or just normal non-encrypted SD card storage. I was initially using a MicroSD Card as extended internal phone storage.
Shortly after updating to the most recent version of Organic Maps, I added a new GPX file to a GPS Files folder that I have on my Android phone. I then tried opening the GPX file in Organic Maps using the default Android File Explorer (Files by Google).
Organic Maps started to open and displayed the green splash screen, but then closed (crashed) just as the map showed. After Organic Maps crashed, I went to try again, but all the GPX files in the folder had been deleted – the folder was completely empty. Therefore, I decided to just delete the folder and import the folder again from a PC via USB cable. However, it was not possible to delete, or even rename the folder either from a PC or the Android file explorer. The folder showed as 0 bytes and it was not possible to interact with it in any way. It was permanently stuck there with no way to get rid of it.
Next, I created a new folder with a different folder name, transferred it across from PC to Android and the same thing happened again: Organic Maps crashed, the files were deleted and it was not possible to delete or even rename the folder. I tried a third time and the same thing happened again.
I then formatted the SD card and set it to be used in Android as just a normal external memory card – rather than as internal storage. I also deleted Organic Maps and reinstalled it from the Google Play Store again.
However, the problem still persisted. This time, some times it was possible to open GPX files with Organic Maps, but the rest of the time it just crashed. The only difference was this time the files weren't being deleted and leaving a zombie folder when it crashed.
It's possible the issue may be affected by the zoom level that the app was at when it was last closed. For example, it doesn't appear to crash as often if I open Organic Maps, zoom out a long way, close the app, open the app, then open a GPX file. But this was somewhat inconclusive and may be just coincidence.
This issue did not occur in previous versions of Organic Maps. It's possible the issue was present in 2023.12.18-12-Google – as it was only released recently as well – however I never experienced the issue in that version the short time I used it.
Steps to reproduce
Export a GPX file using the bikerouter.de verylowtraffic profile and save it to Desktop.
Copy the *.gpx file from the Desktop to the Android device via USB cable. I had it saved in the following location and that particular "Name (On-road)" folder had around 50 GPX route files in it. That particular GPX file is 48 miles long, but the lengths of the routes make no difference – short routes will still crash.
Organic Maps has already been used on this device before with [Open with > Organic Maps], therefore the GPX file already automatically opens in Organic Maps just by tapping on it.
Actual behaviour
After tapping the *.gpx file in the File Explorer, Organic Maps starts to open and displays the green splash screen for about 5 seconds. Just as the green splash screen changes to the map, it closes (crashes).
If this is the second time it has crashed in a row, Android displays a dialogue box stating "Organic Maps keeps stopping" and gives the option to view "App info" or "Close app".
Expected behaviour
After tapping the *.gpx file in the File Explorer, Organic Maps should open and add the GPX route as a blue overlay on top of the map. When successful, it will also display a notification bubble at the bottom of the screen for a few seconds saying "Bookmarks loaded successfully".
Organic Maps will then also show the imported route in "Bookmarks and Tracks" when clicking the Star icon at the bottom.
System information: