[Qt] Crashes with qt-4.7

zeljko zeljko at holobit.net
Tue Nov 23 20:24:38 CET 2010


On Tuesday 23 November 2010 19:47, Den Jean wrote:
> > That binary doesn't crash - works fine.
>
> As you mentioned redhat, I compiled on linux,
> but does it really crash on linux ?

Yes it crashes on all fedora (14) and ubuntu (10.SOMETHING) distros with 
Qt-4.7.XX.

> I cannot reproduce it yet. I compiled Qt 4.7.1 (sse was
> enabled in .qmake.cache) and all just worked fine.

1.Try to install fresh installation of Fedora 14. That definitelly 
crashes "out of the box". 
2.I'm not sure that you can provoke crash without lazarus. (see point 6.) 
below).
3.There are 2 kinds of crashes , but both finishes in qt sse2 optimisation 
functions.
  a) Crash when lazarus is builded with -dQT_NATIVE_DIALOGS
  b) Crash when lazarus randomly crashes when some of QLCLAbstractScrollArea 
becomes visible (so TSynEdit, TTreeView are most used such controls in IDE).

4.What says config.status of your qt-4.7.1 build (mean what extensions are 
disabled eg. you must see there -no-sse4.2).


> I did not find a way to detect in qmake and .pro
> that sse is set,to add -mstackrealign only when needed.

Really don't know how to recognize when -mstackrealign should be enabled or 
not. What's problem if it's enabled all the time ? 
I've readed somewhere last days that PyQt is using -mstackrealign because of 
same problems.
This could raise potential problem with distro packagers of libQt4Pas ?

> Reading the Qt source code it is apparently a windows mingw problem ??
> http://lists.freepascal.org/lists/fpc-devel/2010-November/023061.html


No, it's not just mingw.
Look here for example:
http://www.qtcentre.org/threads/34519-Qt-4.7-SSE2-causing-my-app-to-crash

1. When sse is enabled that doesn't mean that sse2 is enabled (and problematic 
sse2 optimisation functions) since qt tries to guess compiler versions and 
sse extensions (sse,sse2,sse3,sse4.1,sse4.2) - haven't look into scripts 
yet - just wild guess.

2. sse2 wasn't enabled for qt's < 4.7.0, that's fixed somewhere in mid July.

3. Fedora 14 have qt-4.7.0.8 (some patches from 4.7.1 already included) - 
lazarus crashes - with -mstackrealign compiled bindings it does not crash.

4. I've downloaded qt-4.7.0.8 for Fedora 13 (which have 4.6.3 as default and 
won't be updated to 4.7) from koji rpms - it crashes, -mstackrealign builded 
bindings - it does not crash.

5.Yes, problem can raise with mingw installations too (win32 dlls) - haven't 
tested yet , and it will be hard to test (look point 6).

6.Best test (crash reproducible all the time).
a)Build lazarus with -dQT_NATIVE_DIALOGS and run it under KDE-4.5.3 with 
oxygen theme.
b)Now click Open File in main menu or simple Ctrl + O in source editor -> 
Crash.


zeljko





More information about the Qt mailing list