Points icons lost after Android update

Bucky Kid shared this problem 3 years ago
Solved

Hello, I'm testing Locus on Android 7.1 now and I observe problem on stored waypoints with own icons.

All of them have the icon missing (show as parent category icon). The Locus main directory is set to /sdcard which is supposedly same as on previous Android, but because sdcard is hardlink it may expand to different paths on different OSs. If the icon path on waypoint entry is stored as absolute path, that may cause the problem. I suggest to change the icon path to path relative to Locus base dir if that's the cause. Btw. if I clisk on any custom icon in edit dialog, Locus crashes (ie. I can't fix the icon). Also other entries referring to absolute paths may cause problem on Android change.

Comments (1)

photo
1

Good day Bucky Kid,

as I'm aware, on all possible places, I'm trying to use relative paths. And in case, it was done incorrectly in past, there should be some "automatic" conversion.


In this case it really looks like some quite old problem.


Anyway it's also problem for me to simulate this issue. Btw. are you sure that only path has changed? Isn't there also change in name of zip file that keep custom icons? I'm just asking before I start to do some more testing ... thanks

photo
1

Hi menion, I'm sure the path to icons file isn't changed, ZIP is same. I'm now revert to old Android and Locus can show all icons on all waypoint from the same db and icons archive.

photo
1

Hi, this is really weird.

I'm testing it and definition in point for custom icon is really just "file:banks.zip:postovni.png" . Which say that icon is in file "banks.zip" and is named "postovni.png". And that's all. Zip file have to be in "icons" directory on root directory of Locus. I have already changed device many times and I always move whole Locus directory into new device and I never had any troubles.


Weird ... only what we may try is some special test version that will print out some information, I have no other idea ...

photo
1

Hello menion, another week, another test.

I admit the problem is not with database but icon files instead.

If I try to add own waypoint under Android 7 and tap the icon button, Locus does crash.

Then I rename Locus/icons folder and restart Locus, tapping icon button works now.

By removing various icon archives I found the one that makes Locus crash (attached).

I remark that the same icon archive makes no problem to Locus under Android 5.

Is Android 7 having a limitation on maximum archive length? I have verified that Locus app has granted storage permission (Locus base dir is in internal memory = read/write)

photo
1

Perfect, we got it.

Issue is not in number of files in zip but in nameValášek.png". Seems that this name is not correctly encoded in zip file.

I've improved handling of these files in Locus so it will no more crash in this case.

Solution I suggest is just rename this file (remove 'š' should be enough). To be true, I do not know what tool you used to compress images to zip, so I cannot suggest how to do it correctly.

Thanks for bug report and help with it's solution.

photo