Category: Uncategorized

Wow Microsoft… just wow.

So I’m sitting here writing some code in .NET and I have myself a File System Watcher in my code to check if a file has been changed and if it has, it’s supposed to load the file and process any changes. In this case, it’s a log file and if the log file changes anywhere else in the program the log viewing window should reload it. Seems right? Yes.

OK, so now onto the bug. Apparently there’s a bug in which the File System Watcher will fire off multiple file changed events one after another even though there was only one change to one file. Yes, that’s right. Multiple events.

So here’s the code…

private System.DateTime dateLastFileSystemWatcherEventRaised;

private void logFileWatcher_Changed(object sender, IO.FileSystemEventArgs e)
{
    // This hack is required because of a bug in the File System Watcher that causes it to fire multiple events one after
    // another even though there was only one change to the file we are watching. ARG Microsoft! You stupid idiots!
    if (System.DateTime.Now.Subtract(dateLastFileSystemWatcherEventRaised).TotalMilliseconds < 500) {
        return; // Crap, multiple events have been fired... we need to exit this routine.
    }
    dateLastFileSystemWatcherEventRaised = System.DateTime.Now;
  
    // Put your event code here.
}

Of you want a VB.NET example…

Private dateLastFileSystemWatcherEventRaised As Date

Private Sub logFileWatcher_Changed(sender As Object, e As IO.FileSystemEventArgs) Handles logFileWatcher.Changed
	' This hack is required because of a bug in the File System Watcher that causes it to fire multiple events one after
	' another even though there was only one change to the file we are watching. ARG Microsoft! You stupid idiots!
	If (Date.Now.Subtract(dateLastFileSystemWatcherEventRaised).TotalMilliseconds < 500) Then
		Exit Sub ' Crap, multiple events have been fired... we need to exit this routine.
	End If
	dateLastFileSystemWatcherEventRaised = Date.Now
	
	' Put your event code here.
End Sub

The Samsung 840 EVO performance bug is back… Part 2

Some more users have confirmed that their 840 EVOs are still bugged even with the last firmware fix. Even PCPerspective has confirmed that they too are seeing the same issues. Samsung 840 EVO Performance Restoring Firmware Only Partially Effective Samsung… you tried to fix this problem before with a firmware fix, obviously it didn’t work. …

Read More The Samsung 840 EVO performance bug is back… Part 2