<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000066">
<font size="-1"><font face="Helvetica, Arial, sans-serif">I've created
a simple wxWidgets application which uses the
wxVTKRenderWindowInteractor. I'm able to draw a cone using a wxVTK
sample, but when I use the following code to draw a dicom file, I get a
crash. Using breakpoints, I find the crash happens in the AddRenderer
function.<br>
<br>
pRenderWindow = vtkWindow-&gt;GetRenderWindow();<br>
pRenderWindow-&gt;AddRenderer(pRenderer);<br>
vtkDICOMImageReader *imgReader = vtkDICOMImageReader::New();<br>
imgReader-&gt;SetFileName("test.dcm");<br>
vtkImageViewer* imgViewer = vtkImageViewer::New();<br>
imgViewer-&gt;SetInputConnection(imgReader-&gt;GetOutputPort());<br>
pRenderWindow-&gt;AddRenderer(imgViewer-&gt;GetRenderer()); &lt;-- Crash<br>
<br>
I'm using VC++2008, VTK is compiled as a shared lib, and wxWidgets as a
static lib. Both are compiled as Debug. I've tried compiling the
libraries as static, shared, release, debug, etc, but doesn't make a
difference in the location of the crash.<br>
<br>
Here's the rather large callstack:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp; msvcr90d.dll!_VEC_memcpy(void * dst=0x0012e774, void *
src=0x0366ef30, int len=0)&nbsp; + 0x7c bytes&nbsp;&nbsp;&nbsp; C<br>
&gt;&nbsp;&nbsp;&nbsp; vtkFiltering.dll!vtkImageAlgorithm::RequestData(vtkInformation
* request=0x0367a5d8, vtkInformationVector * * __formal=0x00000000,
vtkInformationVector * outputVector=0x0366bed8)&nbsp; Line 78 + 0x2b
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkFiltering.dll!vtkExecutive::CallAlgorithm(vtkInformation *
request=0x0367a5d8, int direction=1, vtkInformationVector * *
inInfo=0x00000000, vtkInformationVector * outInfo=0x0366bed8)&nbsp; Line 748
+ 0x21 bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp;
vtkFiltering.dll!vtkDemandDrivenPipeline::ExecuteData(vtkInformation *
request=0x0367a5d8, vtkInformationVector * * inInfo=0x00000000,
vtkInformationVector * outInfo=0x0366bed8)&nbsp; Line 502 + 0x1d bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp;
vtkFiltering.dll!vtkDemandDrivenPipeline::ProcessRequest(vtkInformation
* request=0x0367a5d8, vtkInformationVector * * inInfoVec=0x00000000,
vtkInformationVector * outInfoVec=0x0366bed8)&nbsp; Line 274 + 0x1e bytes&nbsp;&nbsp;&nbsp;
C++<br>
&nbsp;&nbsp;&nbsp;&nbsp;
vtkFiltering.dll!vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation
* request=0x0367a5d8, vtkInformationVector * * inInfoVec=0x00000000,
vtkInformationVector * outInfoVec=0x0366bed8)&nbsp; Line 158 + 0x14 bytes&nbsp;&nbsp;&nbsp;
C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkFiltering.dll!vtkDemandDrivenPipeline::UpdateData(int
outputPort=0)&nbsp; Line 444 + 0x28 bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkFiltering.dll!vtkStreamingDemandDrivenPipeline::Update(int
port=0)&nbsp; Line 202 + 0x1c bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkFiltering.dll!vtkDataObject::Update()&nbsp; Line 1040 + 0x18
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkImageMapper::RenderStart(vtkViewport *
viewport=0x0366dbb8, vtkActor2D * actor=0x0366e8e0)&nbsp; Line 237 + 0x23
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkOpenGLImageMapper::RenderOverlay(vtkViewport *
viewport=0x0366dbb8, vtkActor2D * actor=0x0366e8e0)&nbsp; Line 45 + 0x10
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkFiltering.dll!vtkActor2D::RenderOverlay(vtkViewport *
viewport=0x0366dbb8)&nbsp; Line 104 + 0x20 bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkRenderer::UpdateGeometry()&nbsp; Line 599 + 0x30
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkOpenGLRenderer::DeviceRender()&nbsp; Line 269 +
0x12 bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkRenderer::Render()&nbsp; Line 296 + 0x12 bytes&nbsp;&nbsp;&nbsp;
C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkRendererCollection::Render()&nbsp; Line 52 + 0x12
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkRenderWindow::DoStereoRender()&nbsp; Line 711&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkRenderWindow::DoFDRender()&nbsp; Line 677 + 0x12
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkRenderWindow::DoAARender()&nbsp; Line 564 + 0x12
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; vtkRendering.dll!vtkRenderWindow::Render()&nbsp; Line 377 + 0x12
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxVTKRenderWindowInteractor::Render()&nbsp; Line 714
+ 0x1a bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp;
VTKPointPicker.exe!wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent
&amp; __formal={...})&nbsp; Line 369 + 0x1c bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxAppConsole::HandleEvent(wxEvtHandler *
handler=0x0364b528, void (wxEvent &amp;)* func=0x0054860c, wxEvent
&amp; event={...})&nbsp; Line 323&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxEvtHandler::ProcessEventIfMatches(const
wxEventTableEntryBase &amp; entry={...}, wxEvtHandler *
handler=0x0364b528, wxEvent &amp; event={...})&nbsp; Line 1233&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxEventHashTable::HandleEvent(wxEvent &amp;
event={...}, wxEvtHandler * self=0x0364b528)&nbsp; Line 907 + 0x1c bytes&nbsp;&nbsp;&nbsp;
C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxEvtHandler::ProcessEvent(wxEvent &amp;
event={...})&nbsp; Line 1293 + 0x1c bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxWindow::HandlePaint()&nbsp; Line 4596 + 0x1c
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxWindow::MSWWindowProc(unsigned int
message=15, unsigned int wParam=0, long lParam=0)&nbsp; Line 2742 + 0xb
bytes&nbsp;&nbsp;&nbsp; C++<br>
&nbsp;&nbsp;&nbsp;&nbsp; VTKPointPicker.exe!wxWndProc(HWND__ * hWnd=0x000208a0, unsigned
int message=15, unsigned int wParam=0, long lParam=0)&nbsp; Line 2613 + 0x1c
bytes&nbsp;&nbsp;&nbsp; C++<br>
<br>
</font></font>
</body>
</html>