Lazarus

Programming => Widgetset => QT => Topic started by: fabienwang on December 08, 2011, 08:23:38 pm

Title: [SOLVED]Lazarus SVN built with QT widgetset doesn't work
Post by: fabienwang on December 08, 2011, 08:23:38 pm
Hi there,

I try to build lazarus with qt widgetset on my linux arch,
it compiles fine
but when i run it i see:

QWidget::repaint: Recursive repaint detected
lazarus.pp - unhandled exception
QPaintDevice: Cannot destroy paint device that is being painted

and it closes.
I installed the qt4pas without error.

OS: ArchLinux 32bits
KDE version: 4.7.3
Qt4pas: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/V2.4/qt4pas-V2.4_Qt4.5.3.tar.gz
Lazarus: from SVN, release Lazarus 0.9.31 r34052M FPC 2.4.4 i386-linux-gtk 2

Thanks for your help

Solved: oxygen theme on KDE makes lazarus crash.
Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: Sora-Kun on December 08, 2011, 08:25:57 pm
+1,
same errors here.
That's why i made this post: http://www.lazarus.freepascal.org/index.php/topic,15447.0/topicseen.html (http://www.lazarus.freepascal.org/index.php/topic,15447.0/topicseen.html)
Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: zeljko on December 08, 2011, 08:32:25 pm
Your libQt4Pas isn't builded with -mstackrealign , so that's why you have crashes.
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html there you can find bindings qt-4.7 compatibile (version 2.4), download it and put library into /usr/lib or if you use 64bit distro then download 64bit version and copy it to /usr/lib64
Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: fabienwang on December 08, 2011, 09:26:24 pm
i did compile it with -mstackrealign

Qt4Pas.pro: line 33
Code: [Select]
equals(QT_MAJOR_VERSION,4)|equals(QT_MINOR_VERSION,7) {
  QMAKE_CXXFLAGS += "-mstackrealign "
}

But i still have errors:

Code: [Select]
TApplication.HandleException Access violation
  Stack trace:
  $B573379C
QPaintDevice: Cannot destroy paint device that is being painted
QPaintDevice: Cannot destroy paint device that is being painted
[TMainIDE.Destroy] A
[TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
[TMainIDE.Destroy] END
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $B573379C
TApplication.HandleException: there was another exception during showing the first exception
  Stack trace:
  $B573379C
Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: DenJean on December 09, 2011, 09:48:26 pm
Try also changing the Kde style from Oxygen to something like Plastique. Oxygen is known to be complex and buggy.

Update: There were indeed problems with Oxygen (like https://bugs.kde.org/show_bug.cgi?id=265271) but only recently I found that there is more to it. I am working on it and will provide new binaries soon. The problem is that gcc changed stack alignment causing lots of problems. Just read this thread http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838#c8
Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: fabienwang on December 10, 2011, 07:49:24 am
Indeed it's working great with another style. Thanks for the tip
Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: zeljko on December 10, 2011, 10:48:03 am
1.When you have imeddiate errors like "recurse paint detected" then I'm pretty sure that libQt4Pas isn't compiled with -mstackrealign. BUT there's a catch: gcc compiler. If it does not support -mstackrealign you're dead :)
2.Themes related errors:
  a) oxygen - debugger shows crash inside oxygen theme (QToolbar) - update KDE - not fixable by me.
  b) ubuntu 11.10 unity desktop - crash inside qt lib, problem with ubuntu icons theme, try to change icons theme - not fixable by me.
  c) various themes adopted by SuSe devels can crash - debugger shows problems in it's theme implementations (cannot remember exact theme names) - not fixable by me.

 d)So, please do not argue about theme changing - sit down and try to find out what's exact problem (build lazarus with debug mode) - do not blame qtlcl for your lazyness. If you find some
bug there's lazarus issue tracker where you can report bug.

we have > 3500 client machines with Qt-4.6.3, Qt-4.7,2 , Qt-4.7.4 and libQt4Pas v 2.1 under various distros and KDE versions (Suse 10.3 KDE-3.5, Fedora 8 KDE-3.5, Fedora 14 KDE 4.6.5,
Ubuntu 10.04 and various windows installations WinXP, Vista, Win7) and there's no such problems with our apps.




Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: Sora-Kun on December 10, 2011, 11:33:21 am
Don't blame my laziness  since I never compiled Qt lib  and I don't know a lot about debugging.
I don't even know how to  report a bug on lazarus' bugtracker.
So don't blame me. I am just a normal user.
Title: Re: Lazarus SVN built with QT widgetset doesn't work
Post by: fabienwang on December 10, 2011, 12:39:34 pm
1.When you have imeddiate errors like "recurse paint detected" then I'm pretty sure that libQt4Pas isn't compiled with -mstackrealign. BUT there's a catch: gcc compiler. If it does not support -mstackrealign you're dead :)
2.Themes related errors:
  a) oxygen - debugger shows crash inside oxygen theme (QToolbar) - update KDE - not fixable by me.
  b) ubuntu 11.10 unity desktop - crash inside qt lib, problem with ubuntu icons theme, try to change icons theme - not fixable by me.
  c) various themes adopted by SuSe devels can crash - debugger shows problems in it's theme implementations (cannot remember exact theme names) - not fixable by me.

 d)So, please do not argue about theme changing - sit down and try to find out what's exact problem (build lazarus with debug mode) - do not blame qtlcl for your lazyness. If you find some
bug there's lazarus issue tracker where you can report bug.

we have > 3500 client machines with Qt-4.6.3, Qt-4.7,2 , Qt-4.7.4 and libQt4Pas v 2.1 under various distros and KDE versions (Suse 10.3 KDE-3.5, Fedora 8 KDE-3.5, Fedora 14 KDE 4.6.5,
Ubuntu 10.04 and various windows installations WinXP, Vista, Win7) and there's no such problems with our apps.

Maybe my gcc wasn't compiled with -mstackrealign option, but how does my lazarus worked when i changed my kde theme?
as you can see my qt4pas package is compiled with the option, you can see PKGBUILD here (for archlinux):

https://aur.archlinux.org/packages.php?ID=33894

I don't understand why you tell me i'm lazy ?
Btw i had no problem with my apps, but with Lazarus qt lcl that did not start, and the theme changing made it work without recompiling, so it was clearly due to oxygen theme.

I'm happy that you have so much customers, but if you're answering them this way, i don't think you'll keep them a long time ^^.
Title: Re: [SOLVED]Lazarus SVN built with QT widgetset doesn't work
Post by: Sora-Kun on December 10, 2011, 05:35:45 pm
He was talking about me, and I removed my post in order to avoid problems with him -.-
Title: Re: [SOLVED]Lazarus SVN built with QT widgetset doesn't work
Post by: zeljko on December 10, 2011, 07:25:21 pm
@FabienWang, no, I don't have any contact with our customers :)
btw. you wasn't target, but Sora-Kun, and Sora-Kun wasn't target because of this thread, but also others were he floods forum with "Qt is buggy", "this is bad" etc etc without single reason.
But not I can say: Sora-Kun, I'm sorry, I didn't know that you're novice. Things won't get fixed if you don't learn howto report issue on bugtracker, and best would be to learn howto debug and open bug at right address (oxygen currently, not lazarus).
Title: Re: [SOLVED]Lazarus SVN built with QT widgetset doesn't work
Post by: fabienwang on December 10, 2011, 07:44:40 pm
Yeah but it's still better to ask in forums to know if it's a "real" bug, before reporting it,
especially when you're novice.

Regards,
FabienWang
Title: Re: [SOLVED]Lazarus SVN built with QT widgetset doesn't work
Post by: zeljko on December 10, 2011, 07:51:11 pm
ok guys, seem that I've found what's problem - version of gcc compiler.
I'm on Fedora 14 32bit (KDE-4.6.5 and qt-4.7.4), using THIS binary from Den page
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/bin-qt4pas-V2.1_Qt4.7.X.tar.gz
SO DOWNLOAD BINDINGS (32bit , but there are 64bit also) FROM ABOVE LINK AND IT'll WORK.

If I build my own libQt4Pas then it crashes with oxygen theme (5.2.1, 5.2.3, 5.2.4, 5.2.5rc).

My gcc is:
[linda@houston bin-qt4pas-V2.1_Qt4.5.3]$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.5.1/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)


Title: Re: [SOLVED]Lazarus SVN built with QT widgetset doesn't work
Post by: fabienwang on January 20, 2012, 11:42:02 am
Great news, no more bug with latest qt4pas V2.5 :D
Title: Re: [SOLVED]Lazarus SVN built with QT widgetset doesn't work
Post by: zeljko on January 22, 2012, 10:56:32 am
Yes, seem that Den finnally found correct switches for gcc , so no more crashes with sse2 helpers inside qt.
TinyPortal © 2005-2018