LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

menu ID error

I am using CVI OI Full Feature with teststand. Inconsistently it return a error, please see attached bmp.

 

In the RebuildEditMenu() function the error shows in TS_CleanupMenu for menuBar item.

 

static int RebuildEditMenu()
{
 int   error = 0;
 CAObjHandle viewMgr = 0;
 int   menuBar;
 
 menuBar = GetPanelMenuBar(gMainWindow.panel);
 
 // determine which view manager the menu commands apply to
 errChk( GetActiveViewManager(&viewMgr));

    // discard any current menu items that were inserted by TS_InsertCommandsInMenu
 errChk( TS_RemoveMenuCommands(menuBar, BAR_EDIT, FALSE, FALSE));

 // rebuild Edit menu
 errChk( TS_InsertCommandsInMenu(sEditMenuCommands, menuBar, BAR_EDIT, -1, viewMgr, NULL, TRUE, errMsg));

 // remove duplicate separators and shortcut keys
 errChk( TS_CleanupMenu(menuBar, 0));  //jjl

Error:
 return error;
}

 

The function RebuildEditMenu() is called from MainCallback()...something like:

 case EVENT_LOST_FOCUS:
   if (gMainWindow.guiThreadId == CmtGetCurrentThreadID()) // these events might also be generate by CVI panels displayed in execution threads. In that case we want to ignore the events to avoid unnecessary multithreading issues in the application UI code.
    if (gMainWindow.engine != 0) // these events can also occur while shutting down and should be ignored then as well
     errChk( RebuildEditMenu());
   break;

 

Any suggestion, what is causing the error?

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 2
(2,543 Views)

lvrat, 

 

When you get a chance, please provide some additional background information: 

 

What version of TestStand and LabWindows/CVI do you currently have installed? 

 

What operating system are you running (64bit or 32bit)? 

 

Have  you made any modifications to the LabWindows/CVI OI Full Feature source files to customize for your application? 

 

Are you testing with the same sequence file? Do some sequence files load and execute successfully, and others do not? Did the OI ever work properly? 

 

Thanks!

 

Best,

 

--
Peter Rifken - Field Engineer & Business Manager
Boston / North New England & Maine
0 Kudos
Message 2 of 2
(2,527 Views)