cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
program crashes (QtTestRunner)
program crashes (QtTestRunner)
Dec 12, 2008 at 3:50pm UTC
mariusd
(2)
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
Dec 12, 2008 at 3:58pm UTC
Dec 15, 2008 at 9:24am UTC
mariusd
(2)
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
Dec 15, 2008 at 9:39am UTC
Topic archived. No new replies allowed.