05-07-2009 07:28 AM
sorry, me again:
Using the resource tracking window, displaying the thread IDs, I have four entries: two have thread function IDs 1 and 2, my secondary threads, one is the primary thread, but then there is a forth listed there, and instead of a fucntion name it says source not available. Is this CVI itself or some thread that escaped my attention?
Thanks, Wolfgang
Solved! Go to Solution.
05-11-2009 03:42 AM - edited 05-11-2009 03:44 AM
05-12-2009 10:16 AM
Hello Wolfgang,
The short answer is that I don't know why you are seeing a "source not available" entry.
Each entry in the resource tracking window should correspond to an individual resource that you've allocated, not to a thread function. Although it's possible to show the thread ID in which each resource was allocated, you shouldn't expect to have one entry per thread, unless you've allocated exactly one resource in each thread.
I'm attaching a screenshot of what I see when I allocate some resources in a very basic multithreaded program. Can you send us a screenshot too, so that we can compare?
Luis
05-12-2009 10:45 AM
Hi Luis,
Thanks for taking care. I did not manage to include my screenshot in my message, so I'll attach it.
Wolfgang
05-13-2009 03:28 PM
Ah, that is the Threads window, not the Resource Tracking window. The Threads window shows you all the threads that are running in your process, which are not necessarily only the threads that you know about. Many drivers and other 3rd party libraries create their own threads in order to perform some tasks, and the CVI debugger will show them in this window. Normally, you won't have to worry at all about these threads, since they are not executing your code (hence the "source not available" designation).
If you're curious and would like to know what component of your program is creating those threads, you can probably find out by placing breakpoints at several points of your program and then checking the Threads window when each of those breakpoints is hit, to see when that thread appears. With a little bit of patience, you should be able to narrow it down to a single function call in your program. But unless you're having some other problem and you suspect that the existence of this thread is playing a role, you can simply ignore this thread.
Luis
05-13-2009 03:43 PM
Hi Luis,
Thanks a lot for the explanations!
Wolfgang