Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtReportGridWnd::ReportItemUnregister Collapse All
Subject Author Date
Ian McIntosh Apr 12, 2007 - 6:03 AM

I get an ASSERT on the following line:

ASSERT_KINDOF( CExtTreeGridCellNode, pCell );

my code is as follows:
if (ReportItemIsRegistered(data.pItem))
{
     ReportItemUnRegister(data.pItem);
}

in that code, data.pItem is a CExtReportGridItem* and has previously been registered.

the assert happens only occasionally.

my call stack is:
>    ProfUIS264md.dll!CExtTreeGridCellNode::FromHTREEITEM(_TREEITEM * hTreeItem=0x03455968) Line 234 + 0x25 bytes    C++
    ProfUIS264md.dll!CExtTreeGridWnd::ItemEnsureExpanded(_TREEITEM * hTreeItem=0x03455968, bool bRedraw=false) Line 2661 + 0x9 bytes    C++
    ProfUIS264md.dll!CExtTreeGridWnd::ItemFocusSet(_TREEITEM * hTreeItem=0x03455968, long nColNo=-1, bool bRedraw=false) Line 2628 + 0x18 bytes    C++
    ProfUIS264md.dll!CExtTreeGridWnd::ItemFocusSet(_TREEITEM * hTreeItem=0x03455968, bool bRedraw=false) Line 2645 + 0x3a bytes    C++
    ProfUIS264md.dll!CExtReportGridWnd::_ReportItemUnRegisterImpl(CExtReportGridItem * pRGI=0x03455968, bool bResetFocus=true, bool bRedraw=true) Line 7591 + 0xe bytes    C++
    ProfUIS264md.dll!CExtReportGridWnd::ReportItemUnRegister(CExtReportGridItem * pRGI=0x0345580c, bool bResetFocus=true, bool bRedraw=true) Line 7801 + 0x1e bytes    C++
    GuiMdi.exe!CIndicatorGrid::IndicatorInfo(const char * szDisplay=0x03505368, const char * szComponent=0x03505310, const char * szDevice=0x035052b0, int nIndicatorId=9000, const char * szName=0x06e44fe0, CDeviceValueIndicator::t_Level eLevel=eIndicator_OK, const char * szMessage=0x0012e1a8, __int64 tTimeLastChanged=1176378414) Line 107 + 0x27 bytes    C++

Technical Support Apr 12, 2007 - 1:25 PM

There is not enough information in your message to understand what causes the assertion failure. This may be a corrupted data.pItem pointer or it may contain a pointer to a report row which in may have been already unregistered. In any case, you can try repeating the problem when the report grid control contains only one registered row. In this case, you could simply set breakpoints in the destructor of the CExtReportGridItem class and in the class which is the data object’s type. This should allow you to find out whether something that was destroyed continues using trash pointers.