Lazarus

Programming => Widgetset => QT => Topic started by: Alextp on July 24, 2021, 04:52:54 pm

Title: Qt5 and Wayland problem
Post by: Alextp on July 24, 2021, 04:52:54 pm
User of my app writes:
Quote
CudaText QT5 1.137.2.1-0 installed on Arch Linux via AUR
Using Wayfire (Wayland) compositor

On startup I just get this error:

[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $000000000061E8F2
  $0000000000600191
  $0000000000752491
  $0000000000751E7D
  $000000000074DF73
  $0000000000689E21
  $0000000000689D38
  $000000000047C2B8
  $000000000044BE30
  $000000000043A39C
[FORMS.PP] ExceptionOccurred

I can successfully start and run it via XWayland if I start like this:

QT_QPA_PLATFORM=xcb cudatext

Since Qt5 supports Wayland natively it would be better if it worked without the XWayland compatibility layer.

Since it's ArchLinux, Qt5 should be the latest.
Title: Re: Qt5 and Wayland problem
Post by: Alextp on July 24, 2021, 05:12:30 pm
Quote
extra/qt5-base 5.15.2+kde+r210-1 (qt qt5) [installed]
    A cross-platform application and UI framework

Also this is the version of qt5pas installed:

community/qt5pas 2.6.r65219-1
    Free Pascal Qt5 binding library updated by lazarus IDE
Title: Re: Qt5 and Wayland problem
Post by: dbannon on July 25, 2021, 02:33:45 am
I doubt its a libqt5pas issue, more likely a Wayland related one.

I have noted in the past that KDE always seems a bit less Lazarus-QT5 friendly, and I find that very strange !

Newest release of Gnome on Ubuntu, Fedora and Debian all seem to be a bit more QT5/Wayland friendly, sad if Arch is heading the a different direction.  I don't test my app against Arch, takes too effort to keep a VM up to date. But sounds like I need to test more against KDE/Plasma. Sigh.

Davo 
Title: Re: Qt5 and Wayland problem
Post by: zeljko on July 25, 2021, 10:36:36 am
Our Qt5 lcl bindings are using some X11 calls which should be avoided. I've added helper function into LCL Qt5 IsWayland() (or similar name) to supress such calls, so it should work under pure Wayland. But, Wayland is pretty unfinished and missing a lot of calls, last time I look into eg QWindow_raise(), QWindow_activate()  does not work as expected (at least under Qt5 5.12).
EDIT: Also, such stack trace with addresses only is unuseable to me. Please compile with debug info and run through gdb so I can get some clue about crash.
Title: Re: Qt5 and Wayland problem
Post by: Alextp on July 25, 2021, 12:14:47 pm
We may do it this way: I asked the user to test the same on 'examples / SynEdit' project, and if user will see the same, I will give the valid issue for IDE.
https://github.com/Alexey-T/CudaText/issues/3592
Title: Re: Qt5 and Wayland problem
Post by: Alextp on July 25, 2021, 01:12:10 pm
@zeljko,
I got reply from the user!
Even 'examples / synedit' demo crashes!
/home/user/lazarus/examples/synedit1.lpi

https://github.com/Alexey-T/CudaText/issues/3592#issuecomment-886185610
Title: Re: Qt5 and Wayland problem
Post by: winni on July 25, 2021, 05:08:44 pm
Hi!

Wayland is buggy since years.

In the Suse distro is a discussion to throw it out.

Try to avoid it!

Winni
Title: Re: Qt5 and Wayland problem
Post by: dbannon on July 26, 2021, 02:24:15 am
Yes, I was astounded to install SUSE Leap 15.3 as a test VM and find it did not use Wayland. Astounded and quite quite happy !

Bu I have noticed that Wayland on both Fedora (big Wayland champions) and Ubuntu (late to the game) seems to be getting better but its still not, IMHO, ready yet !

That makes sense at RedHat to use it in Fedora, all Fedora is is a test bed for their flagship product but don't understand why Ubuntu decided to ship it by default on Gnome.  Maybe pressure from the Gnome people ?

Thanks zeljko for the work you are doing !

Davo
Title: Re: Qt5 and Wayland problem
Post by: Alextp on July 26, 2021, 06:14:38 pm
>Thanks zeljko for the work you are doing !

Yes, +1.

And we leave this report as 'not fixable'?
Title: Re: Qt5 and Wayland problem
Post by: winni on July 26, 2021, 08:12:16 pm
Hi!

I dont like the trouble with Wayland.

But it is work in progress.

The last Suse fix is from 25.6.2021:

https://build.opensuse.org/package/view_file/openSUSE:Factory/plasma5-workspace/plasma5-workspace.changes?expand=1&rev=2f1a03b15bd8a20512f7e0c13a84fa4f (https://build.opensuse.org/package/view_file/openSUSE:Factory/plasma5-workspace/plasma5-workspace.changes?expand=1&rev=2f1a03b15bd8a20512f7e0c13a84fa4f)

But that sounds like a fix of a fix of a fix ....

Since then there was no noise concerning Wayland in the mail list.
But perhaps that is only because there was so much trouble with the latest kernel and VirtualBox .....

Winni
TinyPortal © 2005-2018