Can't select the map - sqlitedb

Started by Nick F, November 22, 2020, 22:11:07

0 Members and 1 Guest are viewing this topic.

Nick F

Hi
I'm having quite a lot of problems with Locus randomly rejecting Sqlitedb maps that I have downloaded.
A map file can work fine for a while, but then randomly Locus refuses to load the file (when Locus starts) stating 'Can't select the map' Error: Unknown problem.
I often keep back-up copies of maps in another folder, but when this happens it won't load the back-up copy of the same map either.
In the last few days Locus has decided that about half my downloaded maps are no longer useable. As far as I can tell the backup files have just been sitting on the SD card in my tablet unused. My only observation is that it generally happens to files I downloaded a while ago - but sometimes that is only a few months.

Has anyone got a clue why this might happen?
  •  

c.s.g.

  •  

Menion

Hello Nick,
interesting problem. I've never read about something like this.

Suggestions from c.s.g. may be useful in some cases, but I'm not sure if here. Mainly the first link is useful for cases when data really completely disappear from the device because of some system optimizations.

My only suggestion is to put maps into internal memory.

To fix such problems, best is to simulate the same problem on a different devices, which I believe will be almost impossible here. So alternative help is to create a bug report right after this problem happens. In log, may be some detailed info why map was refused.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Nick F

Thanks for the reply, which I have only just seen.
Initially I couldn't find the Developer Options on my Android 6.1 tablet, but the following seems to have enabled the option:

"On the device, go to Settings > About <device>. Tap the Build number seven times to make Settings > Developer options available. Then enable the USB Debugging option"

Now I'll try to get you a log.
  •  

Nick F

Bug report (2.8 MB, do hopefully ok) just sent to the requisite locus email address: locus.map@asamm.com

I hope that might throw some light on the puzzle.

It has happened several times, this isn't a one of.

Thanks very much.....
  •  

Menion

Hello Nick,
thanks for the bug-report - delivered.
Unfortunately, I'm unable to find any useful info inside. This may be because the log was taken too soon or too late (never know) or that Locus Map does not report any error when loading the problematic map.

Hard to help here. As I mentioned before, if you have maps on the SD card, suggest to move them to internal memory.

Unfortunately, such random problems are really complicated to solve because I can't simply simulate same problem on own device. So please observe this behavior and let me know if you notice any pattern. Thanks.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Nick F

Hi Menion

I do appreciate that this sort of things is hard to track down - and will do anything I can to help.
I note there were 2 modes of bug-capture - should I try the alternative "Full Report"?, I previously used the default "Interactive Report" for the one I recently sent you.

I generally store my maps on the SD card, because of the internal memory size limitations. But I suspect you may be right that the problem is somehow associated with the SD storage.
I attach a photo of the error message from Locus - in case that helps.

I actually have my 'in use maps' section on the SD and also a 'reserve maps' section in a separate folder. I have just included the 'reserve' folder into Locus and it has rejected a large number of the maps (>20) I have stored there. I notice  a different error message on a few; "Cannot obtain zoom levels".

You will realise why this is frustrating - I can't rely on any map I have stored actually staying accessible - although they often do for quite some months (and I am not aware that this is synchronized with any Android update).

One puzzle is that when a map 'goes wrong', copies held in the different folders on the SD card are simultaneously rejected - that might be a clue. It certainly suggests it is something related to the SD card storage at a high level, rather that just a particular file. BUT it doesn't happen to every map on the SD card at the same time, some still work.

Perhaps more importantly, I have one map I downloaded fairly recently that I still have held in internal memory (that is OK), but the copy I put on the SD card has failed.
I notice the file manager is reporting a slightly different file size on both the files (sqlitedb and sqlitedb-journal) for the files on the SD card - but that appears to be the case with every map, so maybe that is not significant.

Would a copy of one of the failed map files assist you at all?

Kind regards,
Nick
  •  

Nick F

P.S.
I have also just found one map that is held in 2 places on the SD card where 1 copy is OK, the other has failed - so it is not a rule that all copies always fail simultaneously, although usually they do.
  •  

michaelbechtold

Nick, years back I had a similar problem and the root cause was an internally "broken" SD card.
How old is your's?
To compare, you can try Cruiser on your device (simple mapsforge reference app, free) and try to access those map files.
  •  

Nick F

Quote from: michaelbechtold on December 21, 2020, 14:31:31
Nick, years back I had a similar problem and the root cause was an internally "broken" SD card.
How old is your's?
To compare, you can try Cruiser on your device (simple mapsforge reference app, free) and try to access those map files.
Thanks Michael.
I've loaded Cruiser - but can it read sqlitedb files? I'm not succeeding at all.
My SD card is probably 5 years old, I've rather lost track. I haven't seen any other signs of problems with it - but it is certainly a question to consider. I'm wondering if there might bee a 'test app' that would reveal anything (aka memtest on a PC).
  •  

Nick F

Well I've decided to purchase and install a new SD card.
Inevitably, the jury is still out as to whether that solves the problem - only time will tell.
I'll update in due course.
  •  

Nick F

Well 2 months on I think I can conclude that my 2.5-year-old SD card was probably the source of the problems with the map files. (I had noticed a few photo files that had corrupted too)

With a new SD card I have not had any recurrences of the map loading problems on my Locus tablet.

My only remaining puzzle is why some maps I had stored off on my PC as a back-up seem to have failed as well; if I restore them to my Locus tablet they don't work either. I doubt that one will get solved.
  •  

Menion

Hello Nick,
if there are still some maps that cause problems after upload, it may be good to verify by any "SQLite Manager" tool that the database is correct in your PC and also at least by the file-size, that copied file is correct on the device.

If so, what means "does not work"? Do you see any error messages?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Nick F

Hi Menion

I wasn't really expecting you to spend any more time on my problems.
It seems the main problem was a failing SD card, which I wanted to report. That has resolved the main issue, thanks.

The problems with the restored map files from my PC are exactly the same as the original problem I reported - Locus refuses to read them with the same error messages.

I have just run the sqlite3 Pragma Integrity_Check on one of my PC-stored map files called 'France.sqlitedb'. See attached screenshot.
The file clearly has problems, which I simply can't explain - but just maybe it was already corrupted when I copied it, it is the only explanation that makes much sense.

I think it is simpler just to re-download the failed map files and hope the tablet/SD card continue to function correctly now. It isn't worth any more of your time, or mine, trying to work out what might have happened. But thank you for always being so willing to assist.

Regards,
Nick

  •