1) Open the WinLIRC main dialog
2) Click 'reconfigure' button.
3) Press ESC.
The cuplrit is DaemonThread. There is a race condition: decodeFunction is modified in another thread, also the dll that this function was loaded from is closed while the thread attemts to call it.
part 1: protect decodeFunction and the dll handle with mutex.
part 2: Make the thread die when exitEvent is signalled. Force if necessary (buggy plug-in).
I have attached a fix.