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 » Crash in Prof-UIS tree gird when resizing for no reason. Collapse All
Subject Author Date
Offer Har Feb 25, 2009 - 6:01 AM

Hi,


I have a tree with two columns. Sometimes when resizing the dialog, which resizes the tree inside (using anchors) the application crashes deep inside Prof-UIS. This only happens when making the window higher. This is the stack:



>    ProfUIS284md.dll!CExtTreeGridDataProvider::_Tree_MapRowToCache(unsigned long nRowNo=13)  Line 2273    C++
	 ProfUIS284md.dll!CExtTreeGridDataProvider::_Tree_NodeGetByVisibleRowIndex(unsigned long nRowNo=14)  Line 936 + 0x16 bytes    C++
	 ProfUIS284md.dll!CExtTreeGridDataProvider::TreeNodeGetByVisibleRowIndex(unsigned long nRowNo=14)  Line 921 + 0x16 bytes    C++
	 ProfUIS284md.dll!CExtTreeGridWnd::ItemGetByVisibleRowIndex(long nRowNo=14)  Line 3109 + 0xc bytes    C++
	 ProfUIS284md.dll!CExtTreeGridWnd::OnSiwQueryItemExtentV(long nRowNo=13, int * p_nExtraSpaceBefore=0x00000000, int * p_nExtraSpaceAfter=0x00000000)  Line 5121 + 0x16 bytes    C++
	 ProfUIS284md.dll!CExtGridBaseWnd::OnSiwCalcPageMetrics(int nDirection=0)  Line 7152 + 0x1d bytes    C++
	 ProfUIS284md.dll!CExtScrollItemWnd::OnSiwGetVisibleRange()  Line 6546 + 0x18 bytes    C++
	 ProfUIS284md.dll!CExtGridBaseWnd::OnGbwWalkVisibleAreas(CDC & dc={...}, bool bFocusedControl=false, CExtGridHitTestInfo * pHT=0x00000000)  Line 2582 + 0x16 bytes    C++
	 ProfUIS284md.dll!CExtGridBaseWnd::OnSiwPaintForeground(CDC & dc={...}, bool bFocusedControl=false)  Line 2169 + 0x1c bytes    C++
	 ProfUIS284md.dll!CExtScrollItemWnd::OnSwPaint(CDC & dc={...})  Line 6080 + 0x1a bytes    C++
	 ProfUIS284md.dll!CExtScrollWnd::OnPaint()  Line 4240 + 0x19 bytes    C++
	 mfc80d.dll!CWnd::OnWndMsg(unsigned int message=15, unsigned int wParam=0, long lParam=0, long * pResult=0x00125a0c)  Line 2028    C++
	 mfc80d.dll!CWnd::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0)  Line 1741 + 0x20 bytes    C++
	 ProfUIS284md.dll!CExtScrollWnd::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0)  Line 4312    C++
	 ProfUIS284md.dll!CExtGridBaseWnd::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0)  Line 12775    C++

In this function:



ULONG CExtTreeGridDataProvider::_Tree_MapRowToCache( ULONG nRowNo ) const
{
    ASSERT_VALID( this );
const CExtGridDataProvider & _DP = _Tree_GetCacheDP();
ULONG nReservedRowCount = 0;
     _DP.CacheReservedCountsGet( NULL, &nReservedRowCount );
ULONG nRowCountReservedForTree = _Tree_ReservedRowsGet();
    ASSERT( nReservedRowCount >= nRowCountReservedForTree );
    nReservedRowCount -= nRowCountReservedForTree;
ULONG nOffset = 0;
    if( nRowNo >= nReservedRowCount )
    {
        nRowNo -= nReservedRowCount;
        ASSERT( nRowNo < ULONG(m_arrGridVis.GetSize()) );
        CExtTreeGridCellNode * pNode = m_arrGridVis.GetAt( nRowNo );
        ASSERT_VALID( pNode );
        nOffset = pNode->TreeNodeCalcOffset( false, true );
        nOffset += nReservedRowCount;
    } // if( nRowNo >= nReservedRowCount )
    else
        nOffset = nRowNo;
    return nOffset + nRowCountReservedForTree;
}


I see that pNode is NULL (8 rows from the bottom)


Please check what causes this bug, and at least how to bypass it, becuase we cannot deliver our product with this bug.


Thanks,


Ron.

Technical Support Mar 1, 2009 - 4:53 AM
Offer Har Feb 25, 2009 - 8:13 AM

The crazy thing is that this line:



        CExtTreeGridCellNode * pNode = m_arrGridVis.GetAt( nRowNo );

has a velid value in nRowNo (13) when the size of m_arrGridVis is 20, but somehow it inserted a NULL pointer into the array... how can this be?


I have to add that this does not happen in all trees only in a specific one, so it seems that this bug is very tricky - but we must fix it.


So any ideas how you can insert a NULL pointer into this array?


Thanks,


Ron.

Technical Support Feb 26, 2009 - 11:59 AM

This crash looks like memory damage or incorrectly modified internal tree grid’s data. We need your help in reproducing it.

Offer Har Feb 27, 2009 - 4:25 AM

How can I help?