[vtkusers] Why I can't create a global vtkPolyData instance?

David Doria daviddoria at gmail.com
Tue May 1 07:50:03 EDT 2012


On Tue, May 1, 2012 at 4:23 AM, Wenlong Wang <scc.wwl at gmail.com> wrote:
> Hi, David
>
> Thank you for your reply.
>
> I think you are right that a function cannot be called outside a scope. But
> my confusion is caused because other instances can be created such as
> vtkCellArray* poly = vtkCellArray::New().
>
> On the other hand, the error information is "unhandled exception:
> 0xC0000005: access violation reading location 0x0000000c". Then the
> application is break. The compiler opens "C:\Program Files\Microsoft Visual
> Studio 9.0\VC\include\vector". The pointer points to ling 726 where the code
> is
>
>         size_type size() const
>         {    // return length of sequence
>              return (_Mylast - _Myfirst);
>         }
>
> Many thanks.
>
> Wenlong

Again, please provide a very short but compilable example so we can
reproduce the problem.

David



More information about the vtkusers mailing list