Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2010-11

Crashes with qt-4.7

11 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

zeljko

Hi all,

Lazarus and qtlcl apps crashes with qt-4.7 due to sse2 enabled. More links and informations why it crashes can be found here: http://bugs.freepascal.org/view.php?id=17384

I've fixed problem by rebuilding bindings with -mstackrealign , now it works as expected and no more crashes with qt-4.7.

Den, can you add (if you have gcc which supports -mstackrealign) an binary download of 2.1 bindings with -mstackrealign compiled binaries (which should be marked as binary for Qt-4.7.0 and higher).
If not, you can download it from my private machine and test (compiled on FC13 , gcc-4.4.4 20100630 (Red Hat 4.4.4-10). Please drop me an email and I'll send you link to download.

zeljko

Reply by email

Den Jean
to zeljko
zeljko wrote
I've fixed problem by rebuilding bindings with -mstackrealign , now it works as expected and no more crashes with qt-4.7.

Why do not all Qt 4.7s suffer from this problem.

Reply by email

Den Jean
to zeljko: Lazarus and qtlcl apps crashes with qt-4.7 due to sse2 enabled. More links and…
zeljko wrote
Den, can you add (if you have gcc which supports -mstackrealign) an binary download of 2.1 bindings with -mstackrealign compiled binaries (which should be marked as binary for Qt-4.7.0 and higher).

try this before I change webpage
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/bin-qt4pas-V2.1_Qt4.7.X.tar.gz

I do not have Qt 4.7 yet, I just compiled with -mstackrealign by adding QMAKE_CXXFLAGS += "-mstackrealign " to Qt4Pas.pro

Reply by email

zeljko
to Den Jean: Why do not all Qt 4.7s suffer from this problem.
Den Jean wrote 5 lines
On Sunday 21 November 2010 13:14:22 zeljko wrote: > I've fixed problem by rebuilding bindings with -mstackrealign , now it > works as expected and no more crashes with qt-4.7. Why do not all Qt 4.7s suffer from this problem.

Yes, there's problem with all Qt-4.7 builded with -sse2.If qt is builded without that flag then everything works ok.

eg. My devel machine is glibc-2.3.4 and gcc-3.4.2 and I cannot use qt libs even with -sse - it segfaults immediatelly, so I've rebuilded qt with -no-sse -no-sse2, and then it works ok.

zeljko

Reply by email

zeljko
to Den Jean: try this before I change webpage http://users.telenet.be/Jan.Van.hijfte/qtforfpc/bin-qt4pa…
Den Jean wrote 11 lines
On Sunday 21 November 2010 13:14:22 zeljko wrote: > Den, can you add (if you have gcc which supports -mstackrealign) an > binary download of 2.1 bindings with -mstackrealign compiled binaries > (which should be marked as binary for Qt-4.7.0 and higher). try this before I change webpage http://users.telenet.be/Jan.Van.hijfte/qtforfpc/bin-qt4pas-V2.1_Qt4.7.X.tar .gz I do not have Qt 4.7 yet, I just compiled with -mstackrealign by adding QMAKE_CXXFLAGS += "-mstackrealign " to Qt4Pas.pro

That binary doesn't crash - works fine.

zeljko

Reply by email

Den Jean
That binary doesn't crash - works fine.

As you mentioned redhat, I compiled on linux,
but does it really crash on linux ?
I cannot reproduce it yet. I compiled Qt 4.7.1 (sse was enabled in .qmake.cache) and all just worked fine.

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

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

Reply by email

zeljko
to Den Jean
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

Reply by email

Den Jean
to zeljko
zeljko wrote
a)Build lazarus with -dQT_NATIVE_DIALOGS and run it under KDE-4.5.3 with oxygen theme.

was able to reproduce it with latest Qt (4.7.1) on Mandriva 2010.1 The oxygen theme did it. -dQT_NATIVE_DIALOGS was not necessary.

Reply by email

zeljko
to Den Jean
Den Jean wrote 6 lines
On Tuesday 23 November 2010 20:24:38 zeljko wrote: > a)Build lazarus with -dQT_NATIVE_DIALOGS and run it under KDE-4.5.3 with > oxygen theme. was able to reproduce it with latest Qt (4.7.1) on Mandriva 2010.1 The oxygen theme did it. -dQT_NATIVE_DIALOGS was not necessary.

Nice :), but -mstackrealign fixes problem ?

zeljko

Reply by email