#19 Aborting reconfigure crashes WinLIRC

Both or unknown
closed-fixed
nobody
5
2013-08-25
2012-10-29
Ahti Legonkov
No

1) Open the WinLIRC main dialog
2) Click 'reconfigure' button.
3) Press ESC.
WinLIRC crashes.

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.

Solution:
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.

Discussion

  • Ahti Legonkov
    Ahti Legonkov
    2012-10-29

    One way to fix it.

     
    Attachments
  • Ian
    Ian
    2012-10-31

    Hi leg0, thanks for the patches I'll look at them in a bit. Would you like to be added to the WinLIRC project ? I don't have a whole bunch of time these days to do stuff on it and any help would be greatly appreciated.

     
  • Ian
    Ian
    2012-10-31

    By the way, what plugin are you using that crashes? Maybe the issue is in the plugin itself.

     
  • Ahti Legonkov
    Ahti Legonkov
    2012-11-01

    This crash occurs regardless of what plugin is used. Happens with any plugin.

    I would be happy to be part of WinLIRC project.

     
  • Ian
    Ian
    2012-11-01

    Hmm, strange. I've never seen this crash, with any of the plugins, in debug or release mode on any of my pcs. I've also never had any other bug reports about it. I think though the problem could be with KillThread2. It should block until the thread is destroyed, but I am not sure this is happening. It's only blocking until the event is signalled, which maybe the cause of the problems.

     
  • Ian
    Ian
    2012-11-02

    • status: open --> open-fixed
     
  • Ian
    Ian
    2013-08-25

    • status: open-fixed --> closed-fixed