LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand 3.1 and LabWindows 7.1 00000001 suspend execution error

I periodically get an error in my test programs that I have running TestStand 3.1f1 and LabWindows 7.1.1.  The error message is a LabWindows/CVI Message "A non-debuggable thread is trying to suspend execution at address 00000001.  Do you want to suspend execution?"  If I click Yes is pauses the CVI execution, if I click no the program goes on apparently without problems.
 
While it happens randomly in my test program, I have found a way to reliably reproduce this same error popup.  I have created a CVI DLL, in this case I called it Error00000001.dll, and added the DllMain and a function EditTestStep.  EditTestStep takes no parameters and just returns a double 3.0.  I then specified SeqEdit.exe as my external debug process.  In TestStand I created a sequence that has a custom step.  The custom step was one I just created in the Type Palette editor.  I added my step then edited the properties and added a substep "Edit" which was in the list of substeps to add.  I specified my CVI DLL as the module for this substep and had it call my EditTestStep function.
 
Ok, now if I execute SeqEdit.exe from CVI as my debug executable it will bring up my sequence which only has the custom step I just created in it.  If I right click on that step and select "Edit" I will get the 00000001 error in CVI before it gets to the DllMain or EditTestStep function in my CVI DLL.  I have to do this twice, IE the first time I load TestStand from CVI and click the edit it will work fine, I then exit TestStand and rerun the debugger from CVI and do the same thing and I get the error.
 
Now I know this is somewhat convoluted, but it is so far the only reliable example I have been able to generate to display this error.
0 Kudos
Message 1 of 11
(4,500 Views)
I have followed your instructions, but, have been unable to replicate the issue that you are seeing.  I implemented the following in TestStand 3.1f1 and CVI 7.1.1:

(1)  I built a custom step type.
(2)  I created a CVI project from TestStand.  I added a DLLMain to start the CVI RTE and I added an EditSubStep that returns the double value 3.0.
(3)  I configured the custom step type to execute the EditSubStep function.
(4)  I attached the SeqEdit.exe process to debug the application.

Both the DLLMain and EditSubStep function are correctly executed and the values are properly returned into TestStand.  Are there any other changes that have been made to your custom step type?  Are there other steps included in the Sequence File that you are loading?

One thing you can try is to rerun the TestStand version selector which will reset all the TestStand ActiveX controls.

However, it sounds to me like you may have some resources still in memory when the execution is supposed to be complete.  That would explain why you are able to correctly execute the Edit SubStep the first time but not the second time.

Make sure that your DLLMain looks like this:

int __stdcall DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
    switch (fdwReason)
        {
        case DLL_PROCESS_ATTACH:
            if (InitCVIRTE (hinstDLL, 0, 0) == 0)
                return 0;      /* out of memory */
            break;
        case DLL_PROCESS_DETACH:
            CloseCVIRTE ();
            break;
        }
   
    return 1;
}

I'll try to dig a little deeper to see if I find anything.

Thanks,

Tyler T.

0 Kudos
Message 2 of 11
(4,466 Views)
Here is my sequence, C code, and project.  I will also try as you suggest and post my results.
0 Kudos
Message 3 of 11
(4,454 Views)

Here is a second test program I have been able to cause the problem with that I think is slightly simpler.  I have a simple 'c' dll that I create, and what it does is pretty unimportant.  I setup seqedit.exe as the external debugger.  Run the debugger and it loads TestStand.  In TestStand I have a simple sequence that calls into my DLL and has a Local named ProgramDescriptionLongFilename (name seems to make a difference).  I setup TestStand to break at first step and execute the main sequence.  Then perform the below:

Load up test.cws and build the DLL.  Execute it, it should run SeqEdit.exe.  Open test.seq when you get in TestStand.  Make sure Break at first step is selected in the execute men, then execute the main sequence.  You should be paused at the first step.  Now double click the Watch Expression frame to bring up the “Watch Expression Settings” window.  For the Expression type “Locals.ProgramDescriptionLongFilename” and hit the f(x) button.  This should bring up the Expression Browser Window.  Click the Operators/Functions tab, click the OK Button, then click the OK button in the Watch Expression Settings window.  If this did not cause the error, then do it again with the exception of double clicking the “Locals.ProgramDescriptionLongFilename” watch so it brings up the Watch Expression Settings window already populated with Locals.ProgramDescriptionLongFilename so you don’t have to type it.  Do the same thing with hitting the f(x) button then the Operators/Functions tab, then the OK buttons.  You should have definitely gotten the error at this point.

0 Kudos
Message 4 of 11
(4,443 Views)
We also get the LabWindows/CVI Message "A non-debuggable thread is trying to suspend execution at address 00000001..." with our own sequencer software.
We use CVI Version 7.1.0 (306) in this case.
Is there already a solution or a workaround for this problem available?
0 Kudos
Message 5 of 11
(4,315 Views)
Hi Thomas,

This issue will be fixed in a future version of CVI.

Have a great day,

Ecleamus Ricks, Jr.
National Instruments
Applications Engineer

Message Edited by Support on 10-11-2006 10:34 AM

0 Kudos
Message 6 of 11
(4,285 Views)

What is meant with "the latest version"?

We compiled our application with the following compiler versions:

CVI 7.0.0 (393)   is Ok
CVI 7.1.0 (306)   not Ok
CVI 7.1.1 (314)   not Ok
CVI 8.0.0 (273)   is Ok

Is there another patch for CVI 7.1.1 available or do we have
to upgrade to CVI 8.0.0 or downgrade to CVI 7.0.0 ?

Mit freundlichen Grüßen / Best regards, Thomas Fechtel

0 Kudos
Message 7 of 11
(4,263 Views)
Hi Thomas,

Can you email NI support to address this issue? Or simply post your email and I can email you directly.

Have a great day,

Ecleamus R.
0 Kudos
Message 8 of 11
(4,246 Views)
Hello Ecleamus,
I think it is useful to post the solution here in the forum, so other users will benefit from
that without consulting the support.

Mit freundlichen Grüßen / Best regards

Thomas Fechtel

0 Kudos
Message 9 of 11
(4,229 Views)

I am also having this problem with TestStand Version 2.0 and CVI 7.1. Since we are devlivering this to a customer - would like to patch 7.1 instead of upgrading the software.

 

Todd Berry - tberry@teledyne.com

0 Kudos
Message 10 of 11
(3,920 Views)