Question application freezes after hours

Adagio

Well-known member
Joined
Dec 12, 2005
Messages
162
Programming Experience
Beginner
After several hours my application freezes sometimes (not just during debug, but also on the client machines)

Two hours ago I started my application (using debug). My application gathers information from an SQL database all the time (using threads), but this part seems to work just fine even when the application freezes
After about an hour I noticed that the application stopped responding to input from mouse and keyboard (I have a mousemove event, mouseclick event, keypress event and keydown event, just to name a few. During freezing none of these events are fired, but the graphics (using GDI+) on the form is updated (based on information from the database)

On the form I also have a thread running, a thread that goes into an unlimited loop (only stops when the application closes) that does some work then sleeps for a number of seconds. For some unknown reason this thread has stopped (setting a break point where it should always hit is never hit). Any exceptions that should happen here should crash the application (though it should be impossible for it to throw exceptions there), so it's not because of a try-catch that it stopped

About 30 minutes later Visual Studio does exactly the same thing. I can bring VS to front (not "Not responding" messages, neither from VS nor from my application), but I can't press anything at all.

Does anybody know what could be the problem here?


Edit:

I have noticed that during these 30 minutes VS has cleared a lot of memory (it uses 200-400 MB less than usual)
 
same problem; no windows events but app running

i wish i could help here, but i'm searching for help on the same problem, and was hoping you have found something?

i have a complex application that watches for a number of different files, does some processing on their data, and ships the results out to other apps via tcp or rs232, and populates a dataview grid on the main form/screen...

generally it runs fine for days...
once in a while, it stops accepting any 'windows' events... there are buttons to switch screens that no longer work... you can minimize, but maximize has a huge delay if it works at all...
it continues processing files just fine... even has a clock on the main form that continues to update every second

i have broken in through the ide at this time...
it is not using outrageous memory
the only threads are the one currently running my code, and 4 or 5 .net/windows threads that are always there...

any thoughts on how i could debug this would be greatly appreciated!!
or is there an internal call i could make to kick it back to life when it gets in this mode? my next test is adding code to the clock timer code to throw up a message box if a particular file exists, to see if the user click on the mesage box is accepted... sometimes it never gets in this state, sometimes it takes awhile....

thank you for your time!
sjohns10
 
Back
Top