I was having problems with libxml2 in win32 crashing also... I could call DOM and XMLReader interface functions just fine, but as soon as my app started some threads, it would crash every time.
My first thought was that the MS alphabet soup of C libraries were conflicting, so I rebuilt it and iconv (no zlib) using every variation there was an option for. Either none of them matched my mutli-threaded debug DLL build from MSVC in Visual Studio (unlikely), or something else was the problem. All my crashes were related to the GlobalState stuff with threads. In the end, since I only create, use, and destroy libxml2 objects from within one thread, I compiled libxml2 without thread support, and everything worked fine. Bottom line: my experience is that compiling libxml2 as a DLL for Win32 is a lot trickier than compiling it as a shared library for Linux. Dan > Message: 3 > Date: Tue, 17 Jan 2006 17:56:53 +0100 > From: Kasimier Buchcik <[EMAIL PROTECTED]> > Subject: Re: [xml] thanks a lot ---some more help --- > To: venkat naidu <[EMAIL PROTECTED]> > Cc: ML-libxml2 <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain <SNIP> > I have only time for 23.53% support today ;-) > > The crashes you encounter may originate from the usage of different > runtime libraries by the libxml2.dll and your apps respectively. > > Try a "dumpbin /dependents libxml2.dll" and an equal dumpbin on your > apps and compare the runtime DLLs. > Normally both, libxml2 and your app, should depend on MSVCRT.DLL. If > this is not the case, i.e. the runtime DLLs differ, then this will > be the major problem. > You could as well use the "Dependency Walker for Win32"; it has a nice > GUI but can be used from the console as well. It's a MS app, so try a > "depends" in your console to see if it's already installed on your box. > > I had a similar problem for a long time, actually until today; I never > got it right to build libxml2 and its apps under the msvc++ GUI: I ran > into exceptions on fprint and its friends from time to time. > The problem was, that I always tried to use MSVCRTD.DLL > (note the last "D") for the libxml2.dll and C-apps, since I use the > msvc++ GUI for debugging libxml2. I always thought that my setup was > just miserable and a tiny piece was missing somewhere. Today I > tried building a minimal libxml2, without zlib, iconv, FTP- and > HTTP-support, so that at the end libxml2 and my apps had only > dependencies to MSVCRTD.DLL, NTDDL.DLL and KERNEL32.DLL. But this > still produced exceptions. So I reverted using MSVCRT.DLL and it > works like a charm. > > Regards, > > Kasimier _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
