> I've created a quick class that logs an event every time a member > function is called, and that works well for seeing what paths the > program took on any particular run, but it doesn't allow me to force > certain paths to be taken. It is really useful for gaining an > understanding of what my code is actually doing, and it's helped me > optimize something.
Well, it actually helps debugging on the client site. Just ask the client which has encountered the problem to supply the log file for her system to you, and use that file to get a figure of what happened that the deadlock occurred. > I am thinking of writing a program that creates a set of events (one > for each thread in my app), and has a button that triggers that event. > > Then I would sprinkle WaitForSingleEvent() calls all over my code. > Then my program would be a "puppet" of the other one and the threads > would run in a completely deterministic order. But would that simlate real world usage of your app? Doesn't seem to me like that. > That would catch some race conditions, but it would miss those that > happen between my WaitForSingleEvent() calls. > > I would want to create a set of scripts for the controller program > that test every combination. > > There are some technical things to worry about, like the threads are > created and destroyed on the fly, so the controller would have to know > about new ones. > > In any case, it sounds like a lot of work, and possibly not very > thorough. I was hoping someone had gone down this path before. Do you have any idea what is causing the race condition? ------------- Ehsan Akhgari Farda Technology (http://www.farda-tech.com/) List Owner: [EMAIL PROTECTED] [ Email: [EMAIL PROTECTED] ] [ WWW: http://www.beginthread.com/Ehsan ] 'I generally take life as it comes my way', said Death.
