|
Boost Users : |
Subject: [Boost-users] Boost.Test and QProcess (Linux) memory access violation at address 0x00000000
From: ariasgore_at_[hidden]
Date: 2010-02-24 03:56:40
Hello,
Since boost do not provide a convenient way of calling processed I had to use Qt and QProcess to invoke an executable.
I also have written tests for this situation. Which run great but fail while on OpenSuse 11.1 32 bit with boost test in 1.41.0 package.
the test is fairly simple
BOOST_AUTO_TEST_CASE(test_)
{
Myobject g;
// wrong path, this should throw
BOOST_REQUIRE_NO_THROW(g.checkGdalwarp());
}
The checkGdalwarp code is
void checkGdalwarp()
{
QProcess testproc(this);
testproc.start(MyObject::GDALWARP_PATH.c_str());
bool finished = testproc.waitForFinished();
if(!finished || ( finished && testproc.exitStatus()!=QProcess::NormalExit ))
{
throw errors::GdalWarpNotLocated();
}
}
The function works if called without boost test but it terribly fails while in the auto test case.
Sometimes I get "exception thrown" in the test, if I repeat the method again I get a memory access violation at address 0x00000000 and this test method is stuck. So the execution of the test never finished (at least not the 10 hours since yesterday)
This perfectly works on windows but never on linux.
Thanks
Sam
-- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net