Frame, View, Crash
I have a frame & richview that crashes on a paste. This is old stuff and
I haven't had a problem until latly.
this is what my call stack looks like:
gdi32.dll!77c72b1a()
...
comctl32.dll!7197f85a()
...
comctl32.dll!719b72dd()
user32.dll!77d43a68()
ntdll.dll!77fb4da6()
user32.dll!77d4438c()
About 25 of these...
....
mfc71d.dll!AfxInternalPumpMessage() Line 188 C++
> mfc71d.dll!CWinThread::PumpMessage() Line 916 C++
This is in fact my app object.
mfc71d.dll!CWinThread::Run() Line 637 + 0xb C++
....
It is an access error with the 0x00...05, typical of a null pointer?
This is a Frame with a RichEditView created like:
void CAccountView::OnEditSummary( )
{
if( summaries == NULL )
summaries= new CSummaryEditor( NULL, this );
else
summaries->Initialize( );
}
And:
CSummaryEditor::CSummaryEditor( LPCTSTR uid, CWnd* pParent )
:temp( IDR_SUMMARY,
RUNTIME_CLASS( CSummaryDoc ),
RUNTIME_CLASS( CRARichFrm ),
RUNTIME_CLASS( CRichView ) )
,bErr( false )
,doc( NULL )
{
ASSERT( pParent->IsKindOf( RUNTIME_CLASS( CWnd ) ) );
parent= pParent;
Initialize( );
}
temp is built on the DocTemplate, I use it all over:
CMultiDocTemplate temp;
All of the above classes are used in many other places without a
problem, but for the CSummeryDoc. But it is a simple vanilla like doc
and should have nothing to do with the paste as they are pastings
without objects. The parent thing doesn't do anything, just for
messaging in the future.
The view is created on the heap for convenience. It is often not used.
It becomes a top level window with its own icon and such. But I have
many top level windows available to the user. The only difference is
that the rest are doc template objects of the app. The parent thing
doesn't do anything, just for messaging in the future.
The message in the pump is WM_PAINT.
I'm baffled.
Thanks, Dan.