View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014671 | VTK | (No Category) | public | 2014-04-08 09:54 | 2015-01-09 13:39 | ||||
Reporter | Dr. Frank Heimes | ||||||||
Assigned To | Sean McBride | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 6.0.0 | ||||||||
Target Version | Fixed in Version | 6.2.0 | |||||||
Summary | 0014671: Null pointer dereference in ~vtkRenderWindow | ||||||||
Description | At line 125 of file vtkRenderWindow.cxx The command this->PainterDeviceAdapter->Delete(); causes a null pointer dereference, because this->PainterDeviceAdapter is null. Reason: In line 82, this->PainterDeviceAdapter = vtkPainterDeviceAdapter::New(); yields null, because vtkPainterDeviceAdapter.cxx is designed and documented to do just that. Fix: Either 1) In line 29 of vtkPainterDeviceAdapter.cxx, replace the default macro definition with this: #ifndef vtkAbstractObjectFactoryNewMacro #error You must redefine macro vtkAbstractObjectFactoryNewMacro before including this header #endif or 2) In line 123ff of vtkRenderWindow.cxx, prepare the destructor for the null pointer case: if (Renderers != nullptr) Renderers->Delete(); if (PainterDeviceAdapter != nullptr) PainterDeviceAdapter->Delete(); BTW.: Is it really necessary to make the code so extraordinary verbose by prefixing all members with "this->"? | ||||||||
Tags | hackaton | ||||||||
Project | Kitware | ||||||||
Type | crash | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0033390) Sean McBride (developer) 2014-10-01 10:31 |
Dr Heimes, seems someone has added a "if (this->PainterDeviceAdapter)" since you filed this. There's no "if (Renderers != nullptr)" defence, but since you proposed it, I guess you have a way to repro it, so I can add it trivially... |
(0033396) Sean McBride (developer) 2014-10-01 13:02 |
http://review.source.kitware.com/17303 [^] |
(0033418) Sean McBride (developer) 2014-10-02 09:23 |
Merged. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-04-08 09:54 | Dr. Frank Heimes | New Issue | |
2014-10-01 10:24 | Sean McBride | Assigned To | => Sean McBride |
2014-10-01 10:24 | Sean McBride | Status | backlog => tabled |
2014-10-01 10:31 | Sean McBride | Note Added: 0033390 | |
2014-10-01 10:31 | Sean McBride | Tag Attached: hackaton | |
2014-10-01 12:40 | Berk Geveci | Status | tabled => backlog |
2014-10-01 13:02 | Sean McBride | Note Added: 0033396 | |
2014-10-01 13:02 | Sean McBride | Status | backlog => gerrit review |
2014-10-02 09:23 | Sean McBride | Note Added: 0033418 | |
2014-10-02 09:23 | Sean McBride | Status | gerrit review => closed |
2014-10-02 09:23 | Sean McBride | Resolution | open => fixed |
2014-10-02 09:23 | Sean McBride | Fixed in Version | => 6.2.0 |
2015-01-09 13:38 | Sean McBride | Source_changeset_attached | => VTK master aab8c86a |
2015-01-09 13:39 | Sean McBride | Source_changeset_attached | => VTK master 64e66d78 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |