MantisBT - VTK | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0009883 | VTK | (No Category) | public | 2009-11-11 13:44 | 2016-08-12 09:55 |
| Reporter | Mathieu Coursolle | ||||
| Assigned To | Kitware Robot | ||||
| Priority | normal | Severity | crash | Reproducibility | sometimes |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Project | |||||
| Type | |||||
| Summary | 0009883: vtkXYPlotActor clipping causes crash and/or rendering problems. | ||||
| Description | When a vtkXYPlotActor is use to display data, it clips the values that are out of the specified range. In the function vtkXYPlotActor::ClipPlotData, it checks all the points are creates new cells for which the points outside the specified range are kept. The ones outside the range are excluded. One case is not handled. In the following code, if there are no trivial rejection, nor trivial acceptance, than we check if x1 is out of range. If so, we assume that x2 is not, which is not always true. In that case, an id of -1 will be set to a cell, which may cause a crash at rendering time. //intersect each segment with the four planes if ( (x1[0] < p1[0] && x2[0] < p1[0]) || (x1[0] > p2[0] && x2[0] > p2[0]) || (x1[1] < p1[1] && x2[1] < p1[1]) || (x1[1] > p2[1] && x2[1] > p2[1]) ) { ;//trivial rejection } else if (x1[0] >= p1[0] && x2[0] >= p1[0] && x1[0] <= p2[0] && x2[0] <= p2[0] && x1[1] >= p1[1] && x2[1] >= p1[1] && x1[1] <= p2[1] && x2[1] <= p2[1] ) {//trivial acceptance newPts[0] = pointMap[pts[i]]; newPts[1] = pointMap[pts[i+1]]; newLines->InsertNextCell(2,newPts); } else { if (x1[0] >= p1[0] && x1[0] <= p2[0] && x1[1] >= p1[1] && x1[1] <= p2[1] ) {//first point in newPts[0] = pointMap[pts[i]]; } else {//second point in newPts[0] = pointMap[pts[i+1]]; } for (j=0; j<4; j++) { this->ClipPlanes->GetPoints()->GetPoint(j, px); this->ClipPlanes->GetNormals()->GetTuple(j, n); if ( vtkPlane::IntersectWithLine(x1,x2,n,px,t,xint) && t >= 0 && t <= 1.0 ) { newPts[1] = newPoints->InsertNextPoint(xint); break; } } newLines->InsertNextCell(2,newPts); } } | ||||
| Steps To Reproduce | |||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://www.vtk.org/Bug/file/7651/vtkXYPlotActorPatch.txt | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2009-11-11 13:44 | Mathieu Coursolle | New Issue | |||
| 2009-11-11 13:44 | Mathieu Coursolle | File Added: vtkXYPlotActorPatch.txt | |||
| 2009-11-11 13:45 | Mathieu Coursolle | Note Added: 0018393 | |||
| 2009-11-19 15:28 | Mathieu Coursolle | Note Added: 0018487 | |||
| 2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) | ||
| 2016-08-12 09:55 | Kitware Robot | Note Added: 0037119 | |||
| 2016-08-12 09:55 | Kitware Robot | Status | expired => closed | ||
| 2016-08-12 09:55 | Kitware Robot | Resolution | open => moved | ||
| 2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||