[xml] RE: xml digest, Vol 1 #1149 - 14 msgs



Enno,

I guess I'm not surprised that you get a crash in this context. If I
understand things correctly, when the application and the libxml2 DLL are
using different run-time libraries, they're each going to have their own
"stdout", with their own file-locking mechanism in the multi-threaded case.
The DLL is going to have trouble accessing a "stdout" which is under the
control of the main application's run-time. 

The situation is a bit like trying to use malloc in the main application,
then passing the resulting pointer to a DLL and expecting it to be able to
free it. It can work if the runtime is in common, but will fail otherwise.

Perhaps it might be useful if libxml2 exported its version of the standard
IO units (e.g, xmlStdIn, xmlStdOut, xmlStdErr), so that the application
could use them in API functions that
make use of a FILE* as an argument. I suppose there could even be an
xmlFOpen and xmlFClose.

Does that make sense to anyone else, or am I way off base here?

-----Original Message-----
To: xml gnome org
From: Enno Rehling <enno despammed com>
Date: Wed, 26 Nov 2003 15:04:26 +0100
Subject: [xml] xmlDocDump crashing on windows

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig17736919414E0BD94F7AC439
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I have a very simple program:

   xmlDocPtr doc = xmlParseFile("small.xml");
   xmlDocDump(stdout, doc);

The xmlDocDump crashes on windows, not on linux. At first I 
thought it might 
be the precompiled win32 binaries, so I downloaded the libxml source 
(libxml2-2.6.2), compiled it myself, but get the same error.

This shouldn't crash, should it? It does when I'm setting 
code genreation to 
be anything but the "Multithreaded DLL" (so not non-DLL, and 
especially not 
Debug). xmlDocDump is the first function that's shown that behaviour.

 
Eric Zurcher
CSIRO Livestock Industries
Canberra, Australia
Eric Zurcher csiro au



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]