DebugView makes my application crash

1.4k Views Asked by At

I have an application done in C++ with Visual Studio 2010 and it is firing a lot of debug info with OutputDebugStringW (about 50 per seconds which is obviously a lot).

If I open close DebugView 3 ou 4 times then my application gets unstable and either crashes or behaves erratically. I've tried the same with another application firing the same amount of debug prints (also in C++ done with VS 2010) and I experienced the same behavior, same thing if I try on another computer. Both computers are running Windows 7 32bits.

The length of those prints is controlled to be not more than 512 characters so I don't think there is a buffer overrun (OutputDebugStringW seems limitated to 4kb strings).

I've tried with Hoo Win Tail (which is a software similar to DebugView) and the problem doesn't occur.

Does anybody already experienced this problem?

Best regards,

Jet

2

There are 2 best solutions below

0
On

You could try DebugView++ (https://github.com/djeedjay/DebugViewPP/) it introduces near to no delay into the traced application.

0
On

I would assume you have a (subtle) race condition in your application that only exposes itself when your program runs at different "speeds".

DebugView will make your app run slower and so introduces different timings. That other tools, which also capture debug output, do not exhibit this behavior in your app, could be related to the fact that they introduce a somehow different (faster/slower) timing.