program crashes (QtTestRunner)

i have a QtTestRunner from where i run some code, a object, which reads from an xml file
[ the object.read(.... ) ]

using the libxml2 library when i run the test a second time it crashes my application....and it

stops at this line :


1.
reader = xmlReaderForFile(filename.c_str(), NULL, 1);

but when i use the object to read from the xml file and i use it from an executable project so not Qt it works fine .... even if i put the read operations in a loop


1.(The loop is in an executable project)
for(int i=0;i<10;i++) TheObject.read(...) ;

Code from inside the object:


1.
....
2.
xmlTextReaderPtr reader=0;
3.
reader = xmlReaderForFile(filename.c_str(), NULL, 1);
4.
....


So what would be the reason ,that my program crashes at that line when run from QtTestRunner(QtTestRunner is a GUI .. from where you can run tests )

Last edited on
http://mail.gnome.org/archives/xml/2007-February/msg00140.html

in case of multithreading call xmlInitParser() in main before creating your thread

and call xmlCleanupParser() after your tread ends
Last edited on
Topic archived. No new replies allowed.