Hi Johannes, I have been studying your email but still don't have a clue what's going on...
Are you maybe using your own ITK, maybe build statically? From your description, it sounds like some sort of race condition is happening but unless you are loading plug-ins / modules from different threads within your code, I cannot see the reason for something like this. Let me know when you have more information or found the issue. Thanks, Sascha On 04/16/2013 06:39 PM, Johannes Totz wrote: > Hi, > > We've got a problem with PlanarFigure.dll: it causes more or less > regular crashes at start up of our MITK based application. > > This is on Windows 8, x64, build with vc10 as debug, and MITK 2013.03 > (but also happened with an older version). > > From what we could figure out, during start up, PlanarFigure.dll is > loaded, the static initialiser RegisterPlanarFigureObjectFactory is run > and some other stuff happens. Then the destructor of > RegisterPlanarFigureObjectFactory is run and the DLL is unloaded. So far > so good. > A few milliseconds later, PlanarFigure.dll is loaded again, the > constructor of RegisterPlanarFigureObjectFactory runs and a null pointer > crash happens further down the call stack in: > > PlanarFigure.dll!RegisterPlanarFigureObjectFactory::RegisterPlanarFigureObjectFactory() > PlanarFigure.dll!mitk::PlanarFigureObjectFactory::New() > PlanarFigure.dll!itk::ObjectFactory<mitk::PlanarFigureObjectFactory>::Create() > ITKCommon.dll!itk::ObjectFactoryBase::CreateInstance(const char * > itkclassname) > > (beware of line-break) > The crash is at ITK\Code\Common\itkObjectFactoryBase.cxx, line 120-ish, at: > LightObject::Pointer newobject = (*i)->CreateObject(itkclassname); > > itkclassname is "class mitk::PlanarFigureObjectFactory", i (the > iterator) seems fine as well, however looking at the assembly code, the > crash is due to an indirect jump, dereferencing a null pointer. > > A work-around is to preload the PlanarFigure.dll, so it does not get > unloaded: > > Poco::Util::MapConfiguration* sbConfig(new Poco::Util::MapConfiguration()); > // ... > sbConfig->setString(berry::Platform::ARG_PRELOAD_LIBRARY, "PlanarFigure"); > > (beware of line break again) > > But even that does not work reliably. If there is a certain change in > some other part of our code (haven't figured out yet what exactly), the > same crash happens again. This time I have to delete the local cache > directory with the file "plugins.db" in it. > > At first I thought it's got something to do with a change of class > member layout or virtual function order when we do changes to our code. > But it keeps crashing with PlanarFigure, so it's pretty weird... > > Any ideas? > > > > Johannes > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
