[vtkusers] R: Migration problem vtk 5.8 - vtk 6.1

Lorenzo Cesario lorenzo.cesario at softeco.it
Thu Jul 10 02:54:36 EDT 2014


Hi Marcus,
I tried to semplify the code I sent in my last mail.
Now the class exported by my .dll doesn't do anything. I left only the "auto 
init" of the modules inside the file initVtkObjFactory.h.
Now it gives memory leaks in all the debug architectures, but still crashes 
only in Release x64 when I close the application.
I hope this example code can be clear for you.
Tks,
Lorenzo


-----Messaggio originale----- 
From: Lorenzo Cesario
Sent: Monday, July 07, 2014 4:33 PM
To: Marcus D. Hanwell
Cc: VTK Users
Subject: Re: [vtkusers] R: Migration problem vtk 5.8 - vtk 6.1


Hi Marcus,
please find attached a simple test project I made extracting and simplifying
as much as I could my original software application.
Inside the file Test_VtkMFC.zip there is a README.txt file explaining how to
build and reproduce the bug.
It is a templated MFC-based application from VS2010 (single doc and Office
2007 Ribbon style).
Let me know if it crashes in Release 64 bit and if you can see where it is
the problem (e.g. in one of my project settings).
Tks,

Lorenzo

-----Messaggio originale----- 
From: Marcus D. Hanwell
Sent: Thursday, July 03, 2014 5:27 PM
To: Lorenzo Cesario
Cc: markus.hanwell at kitware.com ; VTK Users
Subject: Re: [vtkusers] R: Migration problem vtk 5.8 - vtk 6.1

Hi Lorenzo,

On Thu, Jul 3, 2014 at 7:40 AM, Lorenzo Cesario
<lorenzo.cesario at softeco.it> wrote:
>
> Anyway, I think that the problem is that I could fix it (although not in
> all
> the configurations/architecture) calling the
> vtkObjectFactory::UnRegisterAllFactories(); that it should be done by “vtk
> itself”.

To be totally clear I agree, I still need a minimal example I can
reproduce in order to fix it.
>
> My application is a single-document MFC executable, that uses for the
> visualization in its main CWnd another dll including vtk libraries.
>
> As I think it isn’t correct to call that method, could be a bug in vtk? or
> in any properties of my visual studio projects?
>
Yes, and figuring out which one is the challenge. If you try removing
the init from the Visual Studio properties, and simply include it in
your application code does this help? I have not seen this method of
injecting code, it should work but I am not aware of others using it.
I never work with Visual Studio projects without using CMake to
generate them, but the object factory code is pretty robust.

To be clear this is not expected behavior, but it is unclear to me if
it is an issue with your Visual Studio build files or in VTK's C++
code.

Marcus 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test_VtkMFC.zip
Type: application/x-zip-compressed
Size: 166434 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140710/654e87db/attachment-0001.bin>


More information about the vtkusers mailing list