WFN icon indicating copy to clipboard operation
WFN copied to clipboard

EventViewer: InvalidOperationException (sporadic)

Open harrwiss opened this issue 5 years ago • 4 comments
trafficstars

Debug log only shows: "Exception thrown: 'System.InvalidOperationException' in System.Diagnostics.EventLog.dll"

When setting a breakpoint on the exception I get this (should be handled):

System.InvalidOperationException HResult=0x80131509 Message=Cannot read log entry number 7858563. The event log may be corrupt. Source=System.Diagnostics.EventLog StackTrace: at System.Diagnostics.EventLogInternal.GetEntryWithOldest(Int32 index)

Inner Exception 1: Win32Exception: The parameter is incorrect.

harrwiss avatar Mar 14 '20 16:03 harrwiss

Hi @harrwiss, looks like there is an internal cache to link the index and the internal ID. If data changed in the event log, the cache probably is missing an entry while it shouldn't => this could be a .Net issue... Will have to double check their code. Right now I cannot, I'm out for a week (winter sports.... except that they closed everything starting today haha).

wokhan avatar Mar 15 '20 18:03 wokhan

Well, might check it sooner than expected after all... maybe in the following days.

wokhan avatar Mar 16 '20 09:03 wokhan

So you're back home again? From today on everything not essential is closing as well here in Zurich 🤒

harrwiss avatar Mar 16 '20 18:03 harrwiss

Nope, still in the Alps, but everything's indeed closed so I cannot do as much outside as I would... Hence some activity on github ;-)

wokhan avatar Mar 16 '20 18:03 wokhan