Error "Abort due to constraint violation"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error "Abort due to constraint violation"

MoRBiD MaNGLeR
MJT,

It would be a great goal to reduce RTVHD's Event Viewer entries to just the ones that matter so we can provide useful errors and troubleshooting back to you.

Right now, my Event Viewer is flooded with this error at an interval of one error every 5-6 seconds.  This Error has an Event ID of 0:

Abort due to constraint violation
column FileLocation is not unique   at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
   at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
   at RecordedTVHDService.Service1.CheckFileAndAddMetadata(String FilePath, Boolean ReadFromDatabase, SQLiteConnection sql_con)

What exactly is this error referring to, and how can the root cause be addressed?

MoRBiD
Reply | Threaded
Open this post in threaded view
|

Re: Error "Abort due to constraint violation"

MJT Software
Administrator
That error is saying that it is trying to add a file into the episodes database, but it already exists. That technically shouldn't happen but sometimes the cached list in the service is wrong so it tries to add it anyway. I agree with you on the event viewer messages and I'll try to clean it up.