Plan-G
https://plan-g.app/
Print view

readonly database - cannot build data files
https://plan-g.app/viewtopic.php?t=56
Page 1 of 1
Author:  deadmeat [ Sun Jul 23, 2023 8:27 pm ]
Post subject:  readonly database - cannot build data files

Hi All

I am unable to properly build my database for MSFS or XPlane11. MSFS ends up with airspaces but XP11 the data button is still greyed out.

I previously had v3 and a v4 alpha installed but removed them and all their data (as far as I could tell). I then installed the latest version and ran the MSFS data scan. When most of the data was missing, I uninstalled again and then ran as administrator with the same results

My log is attached (I may have re-run the scan again, I cannot remember exactly) and contains the error

Code: Select all

SQLite Error 8: 'attempt to write a readonly database'.
but also at least one other I can see:

Code: Select all

20:47:53.0 Apt:   Id: 0x0 prev: 0xe8
20:47:53.0 WARNING! endPos > file length
20:47:53.0 WARNING! endPos > file length
20:47:53.0 WARNING! endPos > file length
20:47:53.0 WARNING! endPos > file length
Any help appreciated. Thank you.
Author:  Tim [ Sun Jul 23, 2023 9:17 pm ]
Post subject:  Re: readonly database - cannot build data files

The error you're getting is

Code: Select all

SQLite Error 8: 'attempt to write a readonly database'
That usually means the folder containing the database has been made readonly. Please check the permissions for your Plan-Gv4 Files folder and its subfolders. If you think the folder permissions are fine, you could try renaming the Plan-Gv4 Files folder and letting it build a new one.

BTW, the endPos > file length warnings are usually because some scenery files are encrypted, and that generates the error.

Also, it could be worth restarting Plan-G between consecutive database builds, to reduce memory fragmentation.
Author:  deadmeat [ Mon Jul 24, 2023 2:03 pm ]
Post subject:  Re: readonly database - cannot build data files

Thanks Tim.

For some reason my 'Documents' folder was set to read only. Plan-G was able to create it's folders and files but they would get locked part way through the scan. I would have assumed that if the parent folder was read only then nothing could be created, but I guess having write but not modify for a specific user might have that effect (Win permissions always confuse me!).

No idea why this happened or when. No anti-virus other than Defender. No relevant changes I can think of for years on this PC and no issues with using that folder before.

Anyway, it works. Thanks again Tim and thanks for the excellent Plan-G!
All times are UTC Page 1 of 1