[vtkusers] Assertion while creating vtkMFCWindow object

Divya Rathore divyaksr at iitk.ac.in
Sun Feb 4 13:49:58 EST 2007


Hi! Everybody,

As in vtkMFC example in the source code for VTK 5.02, I am doing the
following in a separate project (for VS6.0) that I built from scratch:

void CMyView::OnInitialUpdate()
{
	CView::OnInitialUpdate();

	// TODO: Add your specialized code here and/or call the base class
	if (this->pvtkMFCWindow) delete this->pvtkMFCWindow;
	this->pvtkMFCWindow = new vtkMFCWindow(this);
}

But it gives 2 runtime assertions in the Release Mode at:
this->pvtkMFCWindow = new vtkMFCWindow(this);

It says:
Debug Assertion Failed!
File: afxwin1.inl
Line 19

Debug Mode is fine. So I can't make out the where the error is. Moreover
it works perfectly fine in the vtkMFC example that ships VTK5.02.

Some special Project Settings in the Release mode? I have enabled RTTI in
C++ Language options.

Any suggestions are most welcome  :)



More information about the vtkusers mailing list