History File Corruption with MCEBuddy 2.5.8 64bit - 20230215

Request Type:
BUG / NEW FEATURE

MCEBuddy Version and Type (32bit or 64bit):
2.5.8 64bit - 20230215
Operating System and Type (32bit or 64bit):
Windows 10 Pro 64b
Summary of the problem or suggestion:
With this version I keep getting the titled corruption. I’ll reset, (everything works) but error persists after an unknown period of time.

Reverting back to my prev. build solves problem.

Removing last 2 sections from the history file (see Below) also solves problem, until at some point MCEB writes to the file.


Section of logs

ERROR> --> Unable to open INI file -> C:\Program Files\MCEBuddy2x\config\history.
Error : SharpConfig.ParserException: Line 184: closing bracket missing.
   at SharpConfig.ConfigurationReader.ParseSection(String line, Int32 lineNumber)
   at SharpConfig.ConfigurationReader.Parse(StringReader reader, Configuration config)
   at SharpConfig.ConfigurationReader.ReadFromString(String source)
   at MCEBuddy.Util.Ini..ctor(String file)
ERROR> 2023-02-19T04:02:36 MCEBuddy.Engine.QueueManager --> Unable to process files in location G:\VideoCaptures\Channel_DVR\TV for monitor task Channels DVR Recorded TV
ERROR : Value cannot be null.
Parameter name: source
INFORMATION> 2023-02-19T04:02:36 MCEBuddy.Engine.QueueManager --> No accessible files founds in location G:\VideoCaptures\Channel_DVR\Movies for monitor task Channels DVR Recorded Movies
ERROR> 2023-02-19T04:03:21 MCEBuddy.Engine.QueueManager --> History file corruption detected: This can lead to unpredictable behavior, fix or clear history file
ERROR> --> Unable to open INI file -> C:\Program Files\MCEBuddy2x\config\history.
Error : SharpConfig.ParserException: Line 184: closing bracket missing.
   at SharpConfig.ConfigurationReader.ParseSection(String line, Int32 lineNumber)
   at SharpConfig.ConfigurationReader.Parse(StringReader reader, Configuration config)
   at SharpConfig.ConfigurationReader.ReadFromString(String source)
   at MCEBuddy.Util.Ini..ctor(String file)
ERROR> 2023-02-19T04:03:21 MCEBuddy.Engine.QueueManager --> Unable to process files in location G:\VideoCaptures\TV_RAW for monitor task SageTV Recordings
ERROR : Value cannot be null.
Parameter name: source
ERROR> --> Unable to open INI file -> C:\Program Files\MCEBuddy2x\config\history.
Error : SharpConfig.ParserException: Line 184: closing bracket missing.
   at SharpConfig.ConfigurationReader.ParseSection(String line, Int32 lineNumber)
   at SharpConfig.ConfigurationReader.Parse(StringReader reader, Configuration config)
   at SharpConfig.ConfigurationReader.ReadFromString(String source)
   at MCEBuddy.Util.Ini..ctor(String file)
ERROR> 2023-02-19T04:03:21 MCEBuddy.Engine.QueueManager --> Unable to process files in location G:\VideoCaptures\Channel_DVR\TV for monitor task Channels DVR Recorded TV
ERROR : Value cannot be null.
Parameter name: source

History File:

history - Copy.zip (1.1 KB)

I also recently (on 2023-02-13) had my first (as far as I can remember) corrupted history file. Unfortunately, I didn’t think to capture it. I just assumed I caused it somehow. It has not yet reoccurred. (And that incident has been pruned out of mcebuddy.log.)

EDIT: I’m on version 2.5.7.1. In the prior post, I see there is a newer BETA version. So, obviously my history file corruption was not due to a problem introduced in the latest version.

Thanks for reporting this. We just updated the INI handler in the last BETA to make it more scalable. I will be looking into this further. Can you let me know if this happens when you have a large number of files being monitors or after a specific period of time / specific number of conversions?

If you’re on an any version before 2.5.8 Feb beta version it’s not related. File corruption can happen due to fileystem issues or hardware problems. It’s very very rare but not specifically related to MCEBuddy, usually indicates an underlying disk or fileystem issue. Try running a disk repair with chkdsk

Doesn’t really have a pattern I can discern, outside of when MCEB writes to the file.

Example: After I removed the offending section from the bottom of the history file, 3 conversions started, 2 appeared to have completed, with the last one causing corruption.

I’ve attached a copy of the newly corrupted file.

history.zip (1.2 KB)

Here’s what I came back too:

Here a section of the log… (seems to me the error in the log is not accurate as the history file line #208 seems to have closing brackets).

INFORMATION> 2023-02-19T09:43:21 --> Job for G:\VideoCaptures\Channel_DVR\TV\On Patrol Live\On Patrol Live S01E58 2023-02-18-2100.mpg converted successfully to A:\ServerFolders\Recorded\TV_SHOWS\On Patrol Live\SEASON-01\On Patrol Live - S01E58 - #157.mkv using conversion task -> TV Show Recordings and profile -> MKV Unprocessed
ERROR> --> Unable to open INI file -> C:\Program Files\MCEBuddy2x\config\history.
Error : SharpConfig.ParserException: Line 208: closing bracket missing.
   at SharpConfig.ConfigurationReader.ParseSection(String line, Int32 lineNumber)
   at SharpConfig.ConfigurationReader.Parse(StringReader reader, Configuration config)
   at SharpConfig.ConfigurationReader.ReadFromString(String source)
   at MCEBuddy.Util.Ini..ctor(String file)
ERROR> 2023-02-19T09:43:27 MCEBuddy.Engine.QueueManager --> Unable to process files in location G:\VideoCaptures\TV_RAW for monitor task SageTV Recordings
ERROR : Value cannot be null.
Parameter name: source
ERROR> --> Unable to open INI file -> C:\Program Files\MCEBuddy2x\config\history.
Error : SharpConfig.ParserException: Line 208: closing bracket missing.
   at SharpConfig.ConfigurationReader.ParseSection(String line, Int32 lineNumber)
   at SharpConfig.ConfigurationReader.Parse(StringReader reader, Configuration config)
   at SharpConfig.ConfigurationReader.ReadFromString(String source)
   at MCEBuddy.Util.Ini..ctor(String file)
ERROR> 2023-02-19T09:43:27 MCEBuddy.Engine.QueueManager --> Unable to process files in location G:\VideoCaptures\Channel_DVR\TV for monitor task Channels DVR Recorded TV
ERROR : Value cannot be null.
Parameter name: source
INFORMATION> 2023-02-19T09:43:27 MCEBuddy.Engine.QueueManager --> No accessible files founds in location G:\VideoCaptures\Channel_DVR\Movies for monitor task Channels DVR Recorded Movies
INFORMATION> 2023-02-19T09:43:33 MCEBuddy.Engine.Core --> Job for G:\VideoCaptures\Channel_DVR\TV\On Patrol Live\On Patrol Live S01E57 2023-02-17-2100.mpg completed
ERROR> --> Unable to open INI file -> C:\Program Files\MCEBuddy2x\config\history.
Error : SharpConfig.ParserException: Line 208: closing bracket missing.
   at SharpConfig.ConfigurationReader.ParseSection(String line, Int32 lineNumber)
   at SharpConfig.ConfigurationReader.Parse(StringReader reader, Configuration config)
   at SharpConfig.ConfigurationReader.ReadFromString(String source)
   at MCEBuddy.Util.Ini..ctor(String file)
ERROR> 2023-02-19T09:43:33 MCEBuddy.Engine.Core --> MCEBuddy Monitor Thread Crashed. Error: System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at MCEBuddy.Util.Ini.ReadString(String section, String key, String defVal)
   at MCEBuddy.Engine.Core.WriteJobHistory(ConversionJob job)
   at MCEBuddy.Engine.Core.MonitorEngineThread()
INFORMATION> 2023-02-19T12:30:49 MCEBuddy.Engine.Core --> MCEBuddy engine stopped
INFORMATION> 2023-02-19T12:30:49 MCEBuddy.Engine.Core --> Setting engine last running state to stop

Run chkdsk /f and then sfc /scannow and see if any repairs are done. I would like to know out of curiosity.

No errors, or sys. corruption and just to re-iterate, prev. build doesn’t corrupt the history file.

I encountered the same error as soon as I upgraded to the 20230215 beta build. Until 0214, there was no issue. I also take a full backup of each install before uninstall/upgrade, and tried to restore the history file from the previous install; no dice. My log file has the same errors from SharpConfig about a missing closing bracket.

Next step is to roll back to the previous build and check if the problem goes away.

Thanks for reporting this. Found the issue and it’s been fixed in today’s 2.5.8 beta build. Try it out and let us know if you still have any issues.

For reference the issue lay with files with a # in their names, it really wasn’t a corruption but a processing issue.

2 Likes

Thanks for the super fast turn-around @Goose, it is working now. History is visible in the app, and no errors in the log file so far.
That’s a good catch, about the “#” in the filenames. Now out of curiosity, I need to check which files are these and why they have a # in their names. :slight_smile:

On a side note: I know you have to test extensively before updating ffmpeg, handbrake et.; but is there any risk in individual users updating the executables in their local installs? (I can create a separate post for this if you prefer)

Feel free to update and continue the discussion here

1 Like

I have updated handbrake in the past with no problems but if handbrake syntax were to change then that might cause problems. It seems unlikely that you would have issues but I also don’t think you should do it unless you have a good reason for it.

1 Like