Page 1 of 1
[VLC Beta] Corrupt media database file
Posted: 27 Dec 2021 01:55
by lee321987
VLC (Android) version: 3.4.3 Beta 6
I just did:
Settings > Advanced > Dump Media Database
The resulting "vlc_media.db" file can not be opened in an SQLite database viewer (I tried 4 different viewers).
The errors I get when trying to open the .db file mention:
Malformed database schema (playlist_update_nb_media_on_media_deletion) - near "FROM": syntax error.
Re: [VLC Beta] Corrupt media database file
Posted: 27 Dec 2021 14:44
by Spike1
Not all "databases" are SQL databases. Someone smarter may be along to say whether there is a VLC error here. If OP's perception is widespread, perhaps VLC ought not describe its survey of media files as a "database".
Re: [VLC Beta] Corrupt media database file
Posted: 27 Dec 2021 19:00
by lee321987
All the tutorials I can find say to use an SQL database viewer / editor to read the file.
Re: [VLC Beta] Corrupt media database file
Posted: 28 Dec 2021 02:43
by evadedave
The main source of info. about VLC Android's SQLite DB seems to be the following unofficial Nepali website:
https://www.vlchelp.com/android-backup- ... lcmediadb/
Shame that VLC's own wiki here has hardly any useful info. about the Android version. However a dev did
confirm that the DB was indeed an SQLite one, so there may be an actual bug here.
For now they [playlists] are stored in the underlying media library, in an sqlite database.
Re: [VLC Beta] Corrupt media database file
Posted: 28 Dec 2021 02:46
by Spike1
Very well. (Tutorials? Links?) Then I am back to waiting for an implementor to drop in and investigate it. Cheers!
PS - evadedave filed simultaneously but has a link, such as it is. OP may have others. I'm out.
Re: [VLC Beta] Corrupt media database file
Posted: 28 Dec 2021 03:10
by evadedave
FWIW, the SQLite Database Editor app mentioned on that site failed to open VLC 3.4.2's DB as well. Might indicate that the bug (if it is indeed one) has existed for a while now, but I'll leave it to the devs to check.
Re: [VLC Beta] Corrupt media database file
Posted: 29 Dec 2021 06:36
by rstone
Give
DB Browser for SQLite a try. The trigger in question uses the
UPDATE FROM syntax which was recently added to SQLite in v3.33.0.
Re: [VLC Beta] Corrupt media database file
Posted: 29 Dec 2021 21:04
by lee321987
@rstone
Thank you, but it does not work. Same error as the other database viewers.
Re: [VLC Beta] Corrupt media database file
Posted: 31 Dec 2021 02:09
by evadedave
@lee: If possible you should add it to the
issue tracker. Probably more chance of getting a proper dev response that way.
Re: [VLC Beta] Corrupt media database file
Posted: 31 Dec 2021 13:19
by Spike1
Yes, if VLC writes the playlist database using statements only recently added to SQLite, it would be guaranteed not to run on older phones. On some phones/carriers, getting a newer Android version is not an option.
Re: [VLC Beta] Corrupt media database file
Posted: 31 Dec 2021 22:39
by evadedave
Not necessarily. If VLC relies on the inbuilt Android SQLite library then yes, naturally older devices with older Android versions installed won't support the latest SQLite versions/statements. However it's entirely possible for an app like VLC to use a third-party SQLite support library that is Android version independent, or even to use a different but equivalent set of SQL statements depending on the version of Android it's running on. Mind you I don't know anything about VLC's code so I'm not saying that's what it does; just wanted to note that an older Android version doesn't automatically imply an app can't access newer SQLite on it.
In any case the issue here is whether the app's SQLite DB is malformed, since even the latest updated SQLite editors are failing to open it.
Re: [VLC Beta] Corrupt media database file
Posted: 05 Jan 2022 13:52
by Aza
However it's entirely possible for an app like VLC to use a third-party SQLite support library that is Android version independent
That's exactly the case.
Give DB Browser for SQLite a try. The trigger in question uses the UPDATE FROM syntax which was recently added to SQLite in v3.33.0.
You guessed well. We are using a pretty recent SQLite version and your browser have to use at least the 3.33.0 version.
For example, it's working on my system:
Re: [VLC Beta] Corrupt media database file
Posted: 06 Jan 2022 00:09
by lee321987
@Aza
THANK YOU IT WORKS!
Even though the stable build says it's based on SQLite 3.34.1 it would not open the .db file.
I had to download the
nightly build of DB Browser for SQLite.
I am very happy.
Re: [VLC Beta] Corrupt media database file
Posted: 06 Jan 2022 04:21
by evadedave
Thanks @Aza.
Re: [VLC Beta] Corrupt media database file
Posted: 06 Jan 2022 08:31
by Aza
You're welcome