Page 1 of 1

Every file in my folder is flagged as corrupted on startup.

Posted: Wed Mar 24, 2021 11:09 am
by Pasch
Hey there,

first thanks for making this awesome program. I've used it for a couple of months now and never had any problems. Today I realised it took forever to load and the files won't show on my PS4. So I looked in the log file and for every file the same problem. Restarted, deleted the media database, always the same. As a small sample size I took a debug log from one of the smaller folders. The files work without problem on my computer.

Help would be much appreciated. Nothing changed on my computer so I don't get whats causing it. I used it the last time on sunday and I am on the newest version. Reinstalling didn't help either

Re: Every file in my folder is flagged as corrupted on startup.

Posted: Wed Mar 24, 2021 1:43 pm
by mik_s
Looks like there is definitely something wrong as the database is not loaded properly on startup.

Code: Select all

DEBUG 2021-03-24 00:02:10.140 [main] net.pms.dlna.DLNAMediaDatabase Database connection error, retrying in 10 seconds
DEBUG 2021-03-24 00:02:20.205 [main] net.pms.dlna.DLNAMediaDatabase Failed to show database connection error message, probably because GUI is not initialized yet. Error was {}
java.lang.NullPointerException: Cannot invoke "java.awt.Component.getParent()" because "<parameter1>" is null
	at java.desktop/javax.swing.SwingUtilities.getWindowAncestor(Unknown Source)
	at net.pms.dlna.DLNAMediaDatabase.init(DLNAMediaDatabase.java:253)
	at net.pms.PMS.getDatabase(PMS.java:261)
	at net.pms.database.Tables.<clinit>(Tables.java:50)
	at net.pms.PMS.init(PMS.java:426)
	at net.pms.PMS.createInstance(PMS.java:916)
	at net.pms.PMS.main(PMS.java:1082)
DEBUG 2021-03-24 00:02:20.205 [main] net.pms.dlna.DLNAMediaDatabase 
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Datei fehlerhaft beim Lesen des Datensatzes: null. Mögliche Lösung: Recovery Werkzeug verwenden
File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:617)
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
	at org.h2.message.DbException.get(DbException.java:194)
	at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:205)
	at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:173)
	at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95)
	at org.h2.engine.Database.getPageStore(Database.java:2739)
	at org.h2.engine.Database.open(Database.java:769)
	at org.h2.engine.Database.openDatabase(Database.java:319)
	at org.h2.engine.Database.<init>(Database.java:313)
	at org.h2.engine.Engine.openSession(Engine.java:69)
	at org.h2.engine.Engine.openSession(Engine.java:201)
	at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178)
	at org.h2.engine.Engine.createSession(Engine.java:161)
	at org.h2.engine.Engine.createSession(Engine.java:31)
	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336)
	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:169)
	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:148)
	at org.h2.Driver.connect(Driver.java:69)
	at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:189)
	at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:352)
	at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:384)
	at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:234)
	at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:199)
	at net.pms.dlna.DLNAMediaDatabase.getConnection(DLNAMediaDatabase.java:203)
	at net.pms.dlna.DLNAMediaDatabase.init(DLNAMediaDatabase.java:248)
	at net.pms.PMS.getDatabase(PMS.java:261)
	at net.pms.database.Tables.<clinit>(Tables.java:50)
	at net.pms.PMS.init(PMS.java:426)
	at net.pms.PMS.createInstance(PMS.java:916)
	at net.pms.PMS.main(PMS.java:1082)
Caused by: java.lang.IllegalStateException: File corrupted in chunk 21095, expected page length 4..192, got 979125359 [1.4.199/6]
	at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883)
	at org.h2.mvstore.MVStore.readBufferForPage(MVStore.java:1055)
	at org.h2.mvstore.MVStore.readPage(MVStore.java:2186)
	at org.h2.mvstore.MVMap.readPage(MVMap.java:554)
	at org.h2.mvstore.Page$NonLeaf.getChildPage(Page.java:1086)
	at org.h2.mvstore.Page.get(Page.java:221)
	at org.h2.mvstore.MVMap.get(MVMap.java:402)
	at org.h2.mvstore.MVMap.get(MVMap.java:389)
	at org.h2.mvstore.MVStore.getChunk(MVStore.java:1088)
	at org.h2.mvstore.MVStore.readBufferForPage(MVStore.java:1025)
	at org.h2.mvstore.MVStore.readPage(MVStore.java:2186)
	at org.h2.mvstore.MVMap.readPage(MVMap.java:554)
	at org.h2.mvstore.Page$NonLeaf.getChildPage(Page.java:1086)
	at org.h2.mvstore.Cursor.hasNext(Cursor.java:53)
	at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:793)
	at org.h2.mvstore.MVStore.<init>(MVStore.java:401)
	at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343)
	at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162)
	... 26 common frames omitted
DEBUG 2021-03-24 00:02:20.205 [main] net.pms.database.Tables Starting check of database tables
ERROR 2021-03-24 00:02:20.229 [main] net.pms.PMS Database was not initialized.

At first I thought it was a problem with the character ö as my log viewer program shows it as "ö", but running the message though the translator it just says the same thing as the English error message so that can't be the cause.

One thing I have seen in the past is that when UMS is already running as a service when trying to run the GUI it can cause problems, having 2 copys of UMS trying to access the same file. I think that issue has been addressed but not sure.

Just in case check that it is not running as a service.

My next suggestion would be to rename or delete the database so UMS will build a new one, but you already tried that so don't know what else to suggest except to try it again. The database is located in "C:\ProgramData\UMS\database"

If that doesn't work then one of the devs might be better help.

Re: Every file in my folder is flagged as corrupted on startup.

Posted: Wed Mar 24, 2021 7:55 pm
by Pasch
Another delete of the database seems to have worked. Perhaps I restarted to quick..

I will try after work with the bigger folder.

UMS is not running as a windows service and I have limited it to one instance.

Thanks a bunch :)