Re: [xml] xmlOutputBufferCreateFile VS2015 I/O error : Bad file descriptor




On Sat, Apr 16, 2016 at 1:02 PM, gait.boxman <gait boxman tiekinetix com> wrote:
You're missing a backslash in the path..

--Gait 

Verzonden vanaf mijn Samsung Galaxy-smartphone.
-------- Oorspronkelijk bericht --------
Van: Sylvain Pointeau <sylvain pointeau gmail com>
Datum: 16-04-2016 10:23 (GMT+01:00)
Onderwerp: [xml] xmlOutputBufferCreateFile VS2015 I/O error : Bad file descriptor

Hello,

porting my program on windows, I noticed that xmlOutputBufferCreateFile raised a message  I/O error : Bad file descriptor. Below is the sample program that crashes for me:

FILE *f = fopen("C:\\myfolder\testdata.xml", "w");

xmlOutputBufferPtr output = xmlOutputBufferCreateFile(f, NULL);

xmlOutputBufferWriteString(output, "WHY DO YOU CRASH?");

xmlOutputBufferClose(output); <- at this moment it displays I/O error : Bad file descriptor

fclose(f);


I linked on libs pre-compiled for win32,
I also tried with the lib I compiled myself, it even crashes in this case (it does not display IO error)

Please note that the parsing (SAX) runs well.

Do you have any idea? is it a bug or something I am not doing well?

Best regards,
Sylvain 


Actually I made the mistake to replace the path at the last minute for the email, but the path was correct in my test program. I really don't understand where the issue could be...




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