LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 9.1.0 crashes when looking at variables window

I get the following crash when I have my program at a breakpoint and I pop open the variables windows and try to scroll down to see my globals:

 

EventType : BEX     P1 : cvi.exe     P2 : 9.1.0.427     P3 : 4afcd035    
P4 : cvi.dll     P5 : 9.1.0.427     P6 : 4afcdb5b     P7 : 009d730e    
P8 : c0000409     P9 : 00000000     

 

Can anyone help with this?

0 Kudos
Message 1 of 13
(4,462 Views)

Hello KavehV - 

 

Do you have any idea what variable it might be that is causing the crash?  Does it only happen when displaying the global variables?  Does the crash only happen with this one application you're debugging?

 

Something that would give us a little more information is if you could generate  a crash dump for the crash by following the instructions here.  If you could then post back with the location of the .dmp file on our ftp site, I'd be happy to take a look.  In the meantime, you might try deselecting Options»Environment»Enable extended Variables/Watch window displays to see if that fixes the crash.

 

Let me know what results -

 

NickB

National Instruments 

0 Kudos
Message 2 of 13
(4,434 Views)

I am getting the exact same crash every time all of a sudden.  It seems to occur now that I've created a viSession variable and viFindlist variable..

 

My main looks like:

 

int main (int argc, char *argv[])
{
    int error = 0,j;
    static short addrList[31];
	static short listList[31];
	static int portList[255];
	int nPorts,index;
	char port_name[7];
	
	ViSession resourceManager;
	ViFindList findList;
	char desc[256];
	int numDevices;
	
	
	
    /* initialize and load resources */
    nullChk (InitCVIRTE (0, argv, 0));
    errChk (instHandle = LoadPanel (0, "Test Application Generator.uir", INST_SETUP));
    
    /* display the panel and run the user interface */
    errChk (DisplayPanel (instHandle));
	/*for (j=0;j<31;j++) {
		addrList[j] = j;	
	}
	addrList[30] = -1;
	
	SendIFC(0);
	FindLstn(0,addrList,listList,30);
	
	//Get list of available COM ports
	nPorts = LocateCom("",portList,255);
	for (index = 0; index < nPorts; index++) {
		sprintf(port_name,"COM%d",portList[index]);
		InsertListItem(instHandle,INST_SETUP_PORT_TYPE,-1,port_name,index);	   //Add to list
	}   */
	
	index = viOpenDefaultRM(&resourceManager);
	
	viFindRsrc (resourceManager, "?*INSTR", &findList, &numDevices, desc);
	
    errChk (RunUserInterface ());

Error:
	viClose(resourceManager);
    /* clean up */
    DiscardPanel (instHandle);
	//DiscardPanel (mainPanel);
    return 0;
}

 And I have a break on the viOpenDefaultRM function so it hasn't been ran.  And my variable looks fine except the variable resourceManager is blank.

 

0 Kudos
Message 3 of 13
(4,248 Views)

Hello -

 

I'm unable to reproduce the crash with the code you've provided.  Could you please follow the steps listed here and post a crash dump (*.dmp) to our ftp site (ftp://ftp.ni.com/incoming)?

 

Thanks -

 

NickB

National Instruments

0 Kudos
Message 4 of 13
(4,239 Views)

How do I get a crash dump if the issue only occurs while debugging my code with variables on?  I tried it that way but the dump file did not get updated.  

 

By the way, the above mentioned quick fix of unchecking extended variables seems to work.

0 Kudos
Message 5 of 13
(4,233 Views)

Hmm... I was expecting that you would see the standard windows crash dialog when the crash you are describing occurred.  Is that not the case?  Does LabWindows/CVI just disappear?

 

NickB

National Instruments

0 Kudos
Message 6 of 13
(4,225 Views)

I get the Send/Do Not Send prompt, and I hit Do Not Send.  Then CVI closes.  But my dump file is not getting updated.

 

i used to be able to debug with Visual Studio 2003, but since doing the -i with Dr Watson, it no longer is an option.

 

The error is related with viewing the ViSession as a variable before it is being initialized.

0 Kudos
Message 7 of 13
(4,218 Views)

Hmmm... ok - yeah, I've seen Dr. Watson be a little flaky every now and then. 

 

If you are willing, you could likely generate a dump for us to look at if you were to download windbg and follow the steps for windbg listed at the end of the Windows Vista/7 section of the crash dump blog I linked to previously.

 

NickB

National Instruments

0 Kudos
Message 8 of 13
(4,209 Views)

uploaded as CVI variable crash.zip with WinDbg

0 Kudos
Message 9 of 13
(4,198 Views)

Hello -

 

Thank you very much for posting the crash dump.  It's helped narrow the issue down some, but I'm not quite there yet.  If you're still willing to try one more thing, could you please download the file cvi.dll from ftp://ftp.ni.com/outgoing/ForumDebug/

 

Once you've downloaded the file, rename the existing cvi.dll in C:\Program Files\National Instruments\CVI2009 to something like cvi.dll.bak, and then place the downloaded copy in it's place.  I've added some additional debugging information that should help narrow the issue down.

 

Once you are able to obtain a new crash dump with the new cvi.dll, please post it back to the ftp site and I'll take a look.  You can then rename the downloaded version of cvi.dll to something like cvi.dll.debug (or just delete it), and restore the original file's name.

 

Thanks for your help -

 

NickB

National Instruments

0 Kudos
Message 10 of 13
(4,159 Views)