NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

HEAP[tscvirun_dbg.exe] error yields Break in tscvirun, but doesn't tell anybody?

HEAP[tscvirun_dbg.exe]: Invalid Address specified to RtlFreeHeap(001400000,0018bc10). occurs at the end of some steps in the tscvirun debug window and code is stopped as if a breakpoint, but no cursor to a location. My code that was executing has no Free nor Discard after the last known position(lcd panel displays activity). TestStand just waits. TestExec needs to execute in debug mode, as our customer will need to debug the contents of his generated sequences. How do I remove this breakpoint?
0 Kudos
Message 1 of 5
(3,509 Views)
Hi Bob,

It definitely does not sound like the code is at a breakpoint, it sounds like an error is occuring somewhere in the code module and one of two CVI settings is turned ON:

Break on Library Errors
or
Break on First-chance Exceptions

I would suggest that you first do the following: go step-by-step through all of your CVI code and figure out which is the LAST successful line of code that executes. Perhaps an error occuring on the next statement is the source that is causing RtlFreeHeap() problems.

If you cannot figure out what is the source of these errors or you suspect that these errors are something you want to ignore, then you will want to disable the "breakpoint effect" that you're seeing. Do this by turning OFF the two CVI settings I mentioned a
t the beginning of my post. If you need to find out where these settings are at, or more information about them, please consult the LabWindows/CVI helpfile.

David Mc.
NI Applications Engineer
0 Kudos
Message 2 of 5
(3,509 Views)
Bob -
Some questions:
1) What version of TestStand are you using?
2) Are you using the standard prototype for your CVI code modules?
3) Does your code ever try to reallocate a string or other data that TestStand passes to the DLL?

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 3 of 5
(3,509 Views)
1)I am running TestStand 3.0 (we are near delivery and can't upgrade at this point).
2)Our prototype is
void __declspec(dllexport) __stdcall function(CAObjHandle handle, char *result), where handle is ThisContext, and result is passed as &Step.Result.Status
3) No. We do copy the sequence context to a local variable and we strcpy "Passed" or "Failed" to result.
0 Kudos
Message 4 of 5
(3,509 Views)
Bob -
When you say that the result is passes as &Step.Result.Status, are you specifying the parameter in the specify module dialog box as "C String Buffer" or "Unicode String Buffer" and is the buffer size large enough?

If yes, can you append the code snippet in your DLL and the step that calls it?

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 5 of 5
(3,509 Views)