LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GenericMessagePopup causes error 17502 in TestStand

Using the standard CVI dll proto type adapter any attempts to use "GenericMessagePopup" in TestStand causes a GPF.
 
Any Ideas?
 
Steve
0 Kudos
Message 1 of 15
(4,848 Views)
Hey Steve,

I tried to replicate the error here, and I was unable to get any errors using the "GenericMessagePopup" from CVI in TestStand.  Could you post a snippet of code that exhibits this behavior?
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 2 of 15
(4,819 Views)

This is it.... Doesn't get much simpler that this:

 

#include

"stdtst.h"

#include

"tsutil.h"

#include

"tsapi_utilities.h"

void

__declspec(dllexport) PassFail(tTestData * testData, tTestError * testError)

{

char buffer[256];

GenericMessagePopup (

"Test Panel", "Sample Project", "OK", "Quit", "",

buffer, 255, 0, VAL_GENERIC_POPUP_BTN1,

VAL_GENERIC_POPUP_BTN1, VAL_GENERIC_POPUP_BTN2);

return;

}

Some new information though:

The fault only occurs when multiple dlls are being loaded into TestStand. These dlls are a mix of CVI 6.0 and CVI 8.0.1. If I tell TestStand to load the step that calls this code dynamically the fault disappears.

With the number of test sequences and test code; rebuilding all of the test code in 8.0.1 or modifying all of our test sequences is not going to be an acceptable work around.

Hopefully someone has some better ideas than this approach as a work around.

Thanks, Steve

 

0 Kudos
Message 3 of 15
(4,809 Views)

Check the size of your buffer.  The error usually points to an array (buffer) overbound. 

It is trying to place something larger than the size of the buffer (or array).

 

Message 4 of 15
(4,778 Views)

Hi,

Why dont you just use the TestStand Message StepType?

Also, how are you filling buffer? Your code snippet just shows it declare then its used so its going to have grabbage in it.

Regards

Ray Farmer

Regards
Ray Farmer
Message 5 of 15
(4,751 Views)

Many people here have started using The TestStand Message StepType. Many have changed thier sequences to have TestStand load the step that calls this type of code dynamically which causes the fault to disappear. I'm presently rebuilding all of the process model code in CVI 8.0.1.

The buffer is of course filled by "GenericMessagePopup". I must not understand the question 😞

Upgrading to latest NI versions..... Sounds so simple!

0 Kudos
Message 6 of 15
(4,752 Views)
>>The buffer is of course filled by "GenericMessagePopup". I must not understand the question
 
No, my mistake, it the response buffer.
 
I think the only way is ti make sure your step is loaded dynamically and unloaded when completed.
 

>>Upgrading to latest NI versions..... Sounds so simple!

and sometimes a bold move.

Regards

Ray Farmer

Regards
Ray Farmer
Message 7 of 15
(4,738 Views)


@Ray Farmer wrote:
No, my mistake, it the response buffer.
 
and sometimes a bold move.


I thought it might be related to the buffer..  at least that's what the error code was in my past experience.

Upgrade???  now that's bold!  😮

Probably not necessary in this case 😉

0 Kudos
Message 8 of 15
(4,729 Views)

You got to love that screen name "JoeLabView". That's right up there with "JoeTestEngineer". I wonder if there is a "JoeTestStand" out there. Maybe something has changed in TestStand in how it loads DLLs into memory and "JoeTestStand" is reluctant to join in on this thread.

 

Where is "JoeTestStand"? Smiley Very Happy

Message 9 of 15
(4,724 Views)

LOL!! 😄

Yeah... I always saw Ray Farmer as some sort of JoeTestStand... 

The name's up for grab, though..  😉

Hey!!  Someone tried to copy my nick!! 😮  Some dude calling himself joeLabviewEngineer...  -wow-  😛

0 Kudos
Message 10 of 15
(4,716 Views)