MantisBT - ParaView
View Issue Details
0011686ParaViewBugpublic2011-01-12 06:182011-09-01 13:31
Paul Edwards 
Andy Bauer 
normalmajoralways
closedfixed 
LinuxUbuntu10.04
Development 
3.12 
0011686: D3 crashes when points are stored double precision and ghost cells are on
This only happens when points are stored as double precision and ghost cells are required.
This Python extract demonstrates the problem (you will need to start you parallel server and connect to it at the top):

8<---------------------------------------------------
# connect to the parallel server (2 procs are enough)

Sphere1 = Sphere( guiName="Sphere1", EndTheta=360.0, Center=[0.0, 0.0, 0.0], StartTheta=0.0, PhiResolution=38, Radius=0.5, ThetaResolution=38, EndPhi=180.0, StartPhi=0.0 )
ProgrammableFilter3 = ProgrammableFilter( guiName="ProgrammableFilter3", OutputDataSetType='Same as Input', RequestInformationScript='', Script='pdi = self.GetPolyDataInput()\npdo = self.GetPolyDataOutput()\nnewPoints = vtk.vtkPoints()\nnewPoints.SetDataTypeToDouble()\nnumPoints = pdi.GetNumberOfPoints()\nfor i in range(0, numPoints):\n coord = pdi.GetPoint(i)\n x, y, z = coord[:3]\n x = x * 1\n y = y * 1.3\n z = z * 0.3\n newPoints.InsertPoint(i, x, y, z)\npdo.SetPoints(newPoints)', PythonPath='', CopyArrays=0 )
D32 = D3( guiName="D32", BoundaryMode='Duplicate cells', MinimalMemory=0 )
ProcessIdScalars3 = ProcessIdScalars( guiName="ProcessIdScalars3", RandomMode=0 )
Show()
Render() # this works
ExtractSurface2 = ExtractSurface( guiName="ExtractSurface2", NonlinearSubdivisionLevel=1, PieceInvariant=1 )
Show() # now that ghost cells are required and D3 is rerun it crashes
--------------------------------------------------->8
In GetGhostPointIds the local variable called processId is getting set to -1 and then used to index an array. On lines 3752 & 3753 is where this happens:

    regionId = kd->GetRegionContainingPoint(pt[0], pt[1], pt[2]);
    processId = kd->GetProcessAssignedToRegion(regionId);

The point might be outside due to rounding a double to a float at some point? It is very close to an actual point.
No tags attached.
Issue History
2011-01-12 06:18Paul EdwardsNew Issue
2011-01-12 11:09Andy BauerAssigned To => Andy Bauer
2011-01-12 11:09Andy BauerStatusbacklog => tabled
2011-01-12 11:13Andy BauerNote Added: 0024622
2011-01-12 11:13Andy BauerStatustabled => @20@
2011-01-12 11:14Andy BauerNote Added: 0024624
2011-01-12 11:14Andy BauerStatus@20@ => @40@
2011-01-12 20:48Andy BauerNote Added: 0024639
2011-01-13 05:33Paul EdwardsNote Added: 0024641
2011-01-14 11:18Andy BauerNote Added: 0024679
2011-01-14 11:18Andy BauerStatus@40@ => @80@
2011-01-14 11:18Andy BauerFixed in Version => Development
2011-01-14 11:18Andy BauerResolutionopen => fixed
2011-02-11 21:45Alan ScottNote Added: 0025413
2011-02-11 21:45Alan ScottStatus@80@ => closed
2011-09-01 13:31Utkarsh AyachitFixed in VersionDevelopment => 3.12

Notes
(0024622)
Andy Bauer   
2011-01-12 11:13   
I tried it out on my machine and didn't encounter any problems. I'm using the latest version of ParaView checked out on 1/12/11. What version of ParaView are you using? Can you try updating ParaView and see if you're still getting the problem since I'm not sure how I'm going to reproduce it otherwise? If it still isn't working for you, let me know the details of your machine, compilers, ParaView SHA, etc.
(0024624)
Andy Bauer   
2011-01-12 11:14   
Sorry, I had a typo in the programmable filter that I didn't notice. I'm able to trigger the problem.
(0024639)
Andy Bauer   
2011-01-12 20:48   
It was a problem in vtkPKdTree. I fixed it by expanding the bounding box slightly. It will take a couple of days before it filters up to paraview and for me to check that it works properly everywhere. I'll mark it as resolved when this happens.
(0024641)
Paul Edwards   
2011-01-13 05:33   
Thanks - I've applied the patch and it is working for me.
(0024679)
Andy Bauer   
2011-01-14 11:18   
ParaView's VTK SHA is now updated to include the fix so this should work properly now.

Paul, please close this issue if everything is working fine for you.
(0025413)
Alan Scott   
2011-02-11 21:45   
Developer and reporter say it is fixed. Closing.