<!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->GetRenderWindow();<br>
pRenderWindow->AddRenderer(pRenderer);<br>
vtkDICOMImageReader *imgReader = vtkDICOMImageReader::New();<br>
imgReader->SetFileName("test.dcm");<br>
vtkImageViewer* imgViewer = vtkImageViewer::New();<br>
imgViewer->SetInputConnection(imgReader->GetOutputPort());<br>
pRenderWindow->AddRenderer(imgViewer->GetRenderer()); <-- 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>
msvcr90d.dll!_VEC_memcpy(void * dst=0x0012e774, void *
src=0x0366ef30, int len=0) + 0x7c bytes C<br>
> vtkFiltering.dll!vtkImageAlgorithm::RequestData(vtkInformation
* request=0x0367a5d8, vtkInformationVector * * __formal=0x00000000,
vtkInformationVector * outputVector=0x0366bed8) Line 78 + 0x2b
bytes C++<br>
vtkFiltering.dll!vtkExecutive::CallAlgorithm(vtkInformation *
request=0x0367a5d8, int direction=1, vtkInformationVector * *
inInfo=0x00000000, vtkInformationVector * outInfo=0x0366bed8) Line 748
+ 0x21 bytes C++<br>
vtkFiltering.dll!vtkDemandDrivenPipeline::ExecuteData(vtkInformation *
request=0x0367a5d8, vtkInformationVector * * inInfo=0x00000000,
vtkInformationVector * outInfo=0x0366bed8) Line 502 + 0x1d bytes C++<br>
vtkFiltering.dll!vtkDemandDrivenPipeline::ProcessRequest(vtkInformation
* request=0x0367a5d8, vtkInformationVector * * inInfoVec=0x00000000,
vtkInformationVector * outInfoVec=0x0366bed8) Line 274 + 0x1e bytes
C++<br>
vtkFiltering.dll!vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation
* request=0x0367a5d8, vtkInformationVector * * inInfoVec=0x00000000,
vtkInformationVector * outInfoVec=0x0366bed8) Line 158 + 0x14 bytes
C++<br>
vtkFiltering.dll!vtkDemandDrivenPipeline::UpdateData(int
outputPort=0) Line 444 + 0x28 bytes C++<br>
vtkFiltering.dll!vtkStreamingDemandDrivenPipeline::Update(int
port=0) Line 202 + 0x1c bytes C++<br>
vtkFiltering.dll!vtkDataObject::Update() Line 1040 + 0x18
bytes C++<br>
vtkRendering.dll!vtkImageMapper::RenderStart(vtkViewport *
viewport=0x0366dbb8, vtkActor2D * actor=0x0366e8e0) Line 237 + 0x23
bytes C++<br>
vtkRendering.dll!vtkOpenGLImageMapper::RenderOverlay(vtkViewport *
viewport=0x0366dbb8, vtkActor2D * actor=0x0366e8e0) Line 45 + 0x10
bytes C++<br>
vtkFiltering.dll!vtkActor2D::RenderOverlay(vtkViewport *
viewport=0x0366dbb8) Line 104 + 0x20 bytes C++<br>
vtkRendering.dll!vtkRenderer::UpdateGeometry() Line 599 + 0x30
bytes C++<br>
vtkRendering.dll!vtkOpenGLRenderer::DeviceRender() Line 269 +
0x12 bytes C++<br>
vtkRendering.dll!vtkRenderer::Render() Line 296 + 0x12 bytes
C++<br>
vtkRendering.dll!vtkRendererCollection::Render() Line 52 + 0x12
bytes C++<br>
vtkRendering.dll!vtkRenderWindow::DoStereoRender() Line 711 C++<br>
vtkRendering.dll!vtkRenderWindow::DoFDRender() Line 677 + 0x12
bytes C++<br>
vtkRendering.dll!vtkRenderWindow::DoAARender() Line 564 + 0x12
bytes C++<br>
vtkRendering.dll!vtkRenderWindow::Render() Line 377 + 0x12
bytes C++<br>
VTKPointPicker.exe!wxVTKRenderWindowInteractor::Render() Line 714
+ 0x1a bytes C++<br>
VTKPointPicker.exe!wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent
& __formal={...}) Line 369 + 0x1c bytes C++<br>
VTKPointPicker.exe!wxAppConsole::HandleEvent(wxEvtHandler *
handler=0x0364b528, void (wxEvent &)* func=0x0054860c, wxEvent
& event={...}) Line 323 C++<br>
VTKPointPicker.exe!wxEvtHandler::ProcessEventIfMatches(const
wxEventTableEntryBase & entry={...}, wxEvtHandler *
handler=0x0364b528, wxEvent & event={...}) Line 1233 C++<br>
VTKPointPicker.exe!wxEventHashTable::HandleEvent(wxEvent &
event={...}, wxEvtHandler * self=0x0364b528) Line 907 + 0x1c bytes
C++<br>
VTKPointPicker.exe!wxEvtHandler::ProcessEvent(wxEvent &
event={...}) Line 1293 + 0x1c bytes C++<br>
VTKPointPicker.exe!wxWindow::HandlePaint() Line 4596 + 0x1c
bytes C++<br>
VTKPointPicker.exe!wxWindow::MSWWindowProc(unsigned int
message=15, unsigned int wParam=0, long lParam=0) Line 2742 + 0xb
bytes C++<br>
VTKPointPicker.exe!wxWndProc(HWND__ * hWnd=0x000208a0, unsigned
int message=15, unsigned int wParam=0, long lParam=0) Line 2613 + 0x1c
bytes C++<br>
<br>
</font></font>
</body>
</html>