i commented out the setclasspriority()
and then i changed all the priorities to normal priority
and it froze.....
i am running an overnight test where i've commented out all the other threads, so that the thread in question is the only one running....we'll see how it goes in the morning.
Well, what about going for Aculab Prosody instead?
Just a tip. When you're logging/tracing to file trying to figure out why/where your system i crashing, remember to flush the file bufferes after every single write. I've been pulling my hair too many times, searching in the wrong places, just bacause the application crashes before the my last 'trace lines' are actually save to disk.
I've got a bad feeling that this has something to do with the hardware, firmware or the drivers.
I have basic Question.
Do you Create Window during Sleep() ?
In MSDN (Sleep()):
You have to be careful when using Sleep and code that directly or indirectly creates windows. If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. If you have a thread that uses Sleep with infinite delay, the system will deadlock. Two examples of code that indirectly creates windows are DDE and COM CoInitialize. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than Sleep.
A system-wide freeze, to me, really points to a driver problem - something that's running in kernel mode.. I don't know what a "CAC DPT4 card" is, but who wrote the driver for it?
I guess attaching a kernel debugger to your computer would be the only way to know for sure.
Are you leaking memory? Have you tried executing your application with Bounds Checker to check this?
Also is your application using (allocating) BSTRs that it does not de-allocate? Do you instantiate COM Objects - lots of them, and / or huge ones?
As it seems that your application runs for long, very long stretches of time - leaking lots of memory all night long will exhaust resources and can possibly bring the system to a halt.
Last edited by Siddhartha; October 25th, 2005 at 05:02 AM.
Are you leaking memory? Have you tried executing your application with Bounds Checker to check this?
Also is your application using (allocating) BSTRs that it does not de-allocate? Do you instantiate COM Objects - lots of them, and / or huge ones?
As it seems that your application runs for long, very long stretches of time - leaking lots of memory all night long will exhaust resources and can possibly bring the system to a halt.
nope, not leaking memory....unless the makers of the driver are...how would i check for memory leaks in their code?
i wrote a separate app that just goes through the surveying loop over and over....and it freezes the computer. i am running the same program on a different machine setup, and it hasn't frozen yet....so could it be a problem with the original machines?
i don't know what a BSTR is, so i don't think i am using it.
what's a COM Object? =X
Which means that for every new you are doing a delete and for every new [] you are doing a delete [] ??
Else, you are leaking memory.
Originally Posted by S Kim
i wrote a separate app that just goes through the surveying loop over and over....and it freezes the computer. i am running the same program on a different machine setup, and it hasn't frozen yet....so could it be a problem with the original machines?
It could be - when I asked you some posts back you said that the freeze was reproducible on many computers. So, perhaps you need to test on a fresh system.
Also, whilst drivers can leak (why not?!) - they are usually tested over and over again, and usually don't. Use BoundsChecker or a similar utility to check fi your application is not leaking.
Without checking one can't say for sure that your application doesn't leak. A quick-check would be to view the application in Task Manager.
Change to "Processes Tab", and go to -
View --> Select Columns --> Memory Usage Delta
You should see positive and negative allocations for your application on this column over a period of time. Only positive allocations is an unhealthy sign.
Else, you are leaking memory.
It could be - when I asked you some posts back you said that the freeze was reproducible on many computers. So, perhaps you need to test on a fresh system.
I guess that answer was misleading....it was reproduceable on 3 different machines which had identical hardware setups.
Originally Posted by Siddhartha
Change to "Processes Tab", and go to -
You should see positive and negative allocations for your application on this column over a period of time. Only positive allocations is an unhealthy sign.
Let us know what the statistics say.
it stays at 0 delta.
the people at CAC offered to try to test it out on some of their own machines...so i sent them the test code...so hopefully some insight will be gained from that.
but once again, in the meantime...any other ideas? =(
Don't know if this will help any, but I had an application that would fail after a long period of time, and it turned out to be resource leaks in a third party driver.
We found it by using the task manager to view the resources used by the application, and found that it wan't releasing handles properly - thus the system ran out of handles. (See taskman.jpg)
We also looked at GDI Objects in the taskmanager, and noticed that GDI resources were also being leaked. (See taskman2.jpg). If your taksman doesn't show the gdi resources, you can turn them on. (Refer to columns.jpg and columnselect.jpg)
All the jpg's are attached.
Hope it might help give you a clue.
Good luck.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
hmm....checked the handle thing...and I did notice that i had a "NTService.exe" that was going up a handle about every 5 seconds. I tracked that booger down and uninstalled the app.
however....my application still freezes the computer. =( at least i don't have my handles going up =)
well, it's been a while since this thing started, but i thought i should give an update on it.
the problem was in the PCI device that my application was using. we mailed our machine to the company, and they offered to check it out for us.
they said the problem was in mapping memory, unmapping memory, and mapping memory over and over. i'm not much of a device driver guy, so that's as much info i can give.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.