1

We have a CF.NET 3.5 app that seems to work fine for about 4 hours before a specific bug appears: Once buggy, there is a delay of approx 30 seconds after a mouse click before the corresponding ..._MouseDown event is called. This indicates to me some corruption with the message pump, or possibly an excess amount of stuff in the windows message queue. Can anybody suggest ideas on how to attack this bug, especially since every attempt takes at least 4 hours to test...
Thanks!
PS - loads of unmanaged code in the mix, can C++ bugs mess with the .Net message queue?

erict
  • 1,394
  • 2
  • 14
  • 28
  • 1
    If I were you I would search for a method call blocking the message queue or windows timer set to some small interval. – yms May 09 '11 at 18:14
  • Ohh. Of course! No other messages are processed while I'm in a Timer_Tick... So if my tick takes 30 seconds, that could be the bug. – erict May 09 '11 at 18:43
  • If you use Windows.Forms.Timer, yes, that is how it is. – yms May 09 '11 at 18:45

1 Answers1

1

Some points to check:

  • A method call blocking the message queue.
  • An instance of System.Windows.Forms.Timer that was set to some small interval.
  • A non-async IO access to some hardware device performed in the GUI thread (irda, serial port, etc)
yms
  • 10,361
  • 3
  • 38
  • 68
  • Routine called in the timer_tick started to take 30 seconds to complete. Thanks for the clue! – erict May 10 '11 at 15:00