[vtkusers] IterativeClosestPointsTransform Example error

Ben Boeckel ben.boeckel at kitware.com
Mon Apr 6 12:42:59 EDT 2015


On Thu, Apr 02, 2015 at 16:57:46 +0100, João wrote:
> I can run the example fine if I don't print anything to the console,
> but printing the matrix gives me a "First-chance exception at
> 0x000000005F435B7C (msvcp100.dll) in Example.exe: 0xC0000005: Access
> violation reading location 0x0000000000000000."
> I'm using Visual Studio 2013, 64 bit project. Anyone have any idea
> what's going on?
> Link to the example:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/IterativeClosestPointsTransform

Looks like it is reading from NULL. I assume the line you're referring
to for "print anything" is:

    std::cout << "The resulting matrix is: "...

What is printed if you change it to (void*)m instead of *m? Does it
print a pointer value or "(null)" (or similar[1])?

--Ben

[1]I forget exactly what msvcrt prints for null pointers here.


More information about the vtkusers mailing list