On Sunday 28 March 2010 11:23:02 Catalin Iacob wrote:
> Hi everybody,
>
> I would like to help the PySide project and at this moment the port to
> Windows seems interesting, useful and not that hard.
>
> Following Hugo's mail I installed everything the needed stuff and,
> using VS 2008, I built libxml2 and libxslt, built ApiExtractor.
>
> When I run the test suite for the Release configuration of
> ApiExtractor (HEAD of master branch) I get 4 tests failing:
> The following tests FAILED:
> 11 - testmodifyfunction (SEGFAULT)
> 13 - testrefcounttag (SEGFAULT)
> 14 - testreferencetopointer (SEGFAULT)
> 16 - testreverseoperators (SEGFAULT)
>
> I would try to look into why the tests are crashing but it seems that
> QTestLib is eating the crashes so I can't drop in the debugger to
> investigate. I tried running just testmodifyfunction.exe manually and
> I only get:
> ********* Start testing of TestModifyFunction *********
> Config: Using QTest library 4.6.2, Qt 4.6.2
> PASS : TestModifyFunction::initTestCase()
> No crash but premature ending.
>
> I also tried to modify one of the test cases to force a crash by
> adding something like:
> int* i = 0;
> *i = 42;
> Even so, I don't see any crash when running that test.
>
> So I looked into why is QTestLib eating crashes. In
> C:\Qt\4.6.2\src\testlib\qtestcase.cpp I see:
> #ifndef QT_NO_EXCEPTIONS
> } catch (...) {
> do internal Qt stuff
> // Rethrow exception to make debugging easier.
> throw;
> return 1;
> }
> # endif
>
> Seeing this I thought that catch (...) is eating all C++ exceptions
> AND other stuff like access violations. And that this happens because
> ApiExtractor is compiled without /EHsc. The code above does rethrow
> but I have no idea what happens to the rethrown exception if /EHsc- is
> used.
>
> But I did some testing, and it seems /EHsc doesn't influence things in
> this particular situation:
>
> 1. If I use /EHsc (instead of /EHsc-) in CMakeLists.txt I get the same
> 4 tests failing. No difference.
>
> 2. If I use /DQT_NO_EXCEPTIONS in CMakeLists.txt I get just 1 test failing:
> The following tests FAILED:
> 11 - testmodifyfunction (SEGFAULT)
>
> 3. If I use /EHsc and /DQT_NO_EXCEPTIONS in CMakeLists.txt I get the
> same 1 test failing.
>
> The failure of the 1 test is still silent so something is still eating
> this crash.
>
> Given all this:
> 1. does anybody know whether the precompiled Qt for VS2008 is compiled
> with QT_NO_EXCEPTIONS defined or not?I don't known, but my guess is that it's compiled with support for exceptions, despite of Qt itself do not use exceptions at all. > 2. why is apiextractor explicitly using /EHsc- to disable exceptions > since they seem to be used by Qt (at least if QT_NO_EXCEPTIONS is not > defined) ? I see /EHsc- was added in commit 4908d with message: "Fixes > flags used with msvc" I added it because ApiExtractor does not use exceptions, but if adding this flag on windows causes various tests to fail, better remove it, or just define QT_NO_EXCEPTIONS First time I compiled and tested ApiExtractor on windows it was failing with a segfault in one test, IIRC a crash inside libxml2 or libxslt, but at the time I used precompiled packages for these libraries. > 3. do you have any other ideas regarding how to tell QTestLib to stop > eating exceptions and crashes so that I can debug them? Maybe someone on #qt on freenode know the answer. > Sorry for the very long mail but I wanted to explain everything I tried so > far. > > Catalin > _______________________________________________ > PySide mailing list > [email protected] > http://lists.openbossa.org/listinfo/pyside -- Hugo Parente Lima INdT - Instituto Nokia de Tecnologia
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
