On Wed, 11 Mar 2009 16:22:01 +0100 Werner Smekal <sme...@iap.tuwien.ac.at> wrote:
WS> thank you for the patches - I reviewed and applied them. Thanks! WS> I use Visual C++ 2008, wxMWS 2.8.9 (shared, debug or release, WS> USE_GDIPLUS=1 and #define wxUSE_GRAPHICS_CONTEXT 1 in setup.h) and the WS> latest PLplot version from svn. I use the following line to configure WS> PLplot: WS> WS> cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug WS> -DwxWidgets_CONFIGURATION=mswd -DBUILD_TEST=ON path_to_source FWIW I used (after reading documentation and wiki) -DwxWidgets_LIB_DIR=$wxwin/lib/vc_dll -DwxWidgets_CONFIGURATION=mswud -DwxWidgets_USE_UNICODE=ON -DDEFAULT_NO_BINDINGS=ON -DENABLE_cxx=ON -DENABLE_wxwidgets=ON -DDEFAULT_NO_DEVICES=ON -DPLD_wxwidgets=ON WS> The program has stopped at line 51 of ltdl_win32.c where the dll is freed: WS> WS> FreeLibrary( lastHandle->hinstLib ); WS> WS> The call stack looks like that: WS> WS> GdiPlus.dll!4ebbfedd() WS> GdiPlus.dll!4ebbfeb4() WS> msvcr90d.dll!102560e2() WS> plplotd.dll!lt_dlexit() Line 51 + 0x11 bytes C I didn't try reproducing this yet but my guess would be that it's just another example of deadlocking on the loader lock: you can't call FreeLibrary() (nor LoadLibrary() but this is more rare) from DllMain() because the DLL load mutex is locked when DllMain() is called and attempting to lock it again from FreeLibrary() deadlocks. So if lt_dlexit() is itself called from DllMain() this would explain it. And you should be able to find plenty more about this (painful) topic on the web, here is one of the first Google matches from a reputable source: http://blogs.msdn.com/oldnewthing/archive/2004/01/28/63880.aspx But even if the problem is almost surely due to this, fixing it might be non-trivial. I don't know PLplot well enough to see if there is a possibility to do the cleanup earlier, is there? Regards, VZ
pgpwvvWLtZpvP.pgp
Description: PGP signature
------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel