hmm....thanks guys....i'll try it out, and let you all know what happens =)
i appreciate your help
Printable View
hmm....thanks guys....i'll try it out, and let you all know what happens =)
i appreciate your help
i have tried it, and it didn't work.....
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.
in the mean time....any suggestions?
Well, what about going for Aculab Prosody instead? ;)Quote:
in the mean time....any suggestions?
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.
- petter
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.
If you don't create window, I have no Question.
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.
nope, not leaking memory....unless the makers of the driver are...how would i check for memory leaks in their code?Quote:
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.
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 [] ??Quote:
Originally Posted by S Kim
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.Quote:
Originally Posted by S Kim
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 -
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.Quote:
View --> Select Columns --> Memory Usage Delta
Let us know what the statistics say.
I guess that answer was misleading....it was reproduceable on 3 different machines which had identical hardware setups.Quote:
Originally Posted by Siddhartha
it stays at 0 delta.Quote:
Originally Posted by Siddhartha
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.
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 =)
I ran a test last night where I ran the same code, and it hasn't frozen yet!
What was different? I turned off hyper-threading, and changed the boot.ini file to boot with one processor.
Now...this is not a good solution for us, because we want speed...we need multiple processors.
Any ideas on what might be causing the system to freeze in Multiprocessor mode, communicating with a PCI device?
What is "same code"Quote:
Originally Posted by S Kim
The one with which this thread started, or the one with SetPriorityClass commented out, and threads started at default priorities?
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.
thanks for all the help though =)