Version: 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.
What Qt5 version do you have? Arch, so the latest?
I can run on Ubuntu:
apt list libqt5*
Yes, latest:
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
@Alexey-T I take it you're testing with Gnome Wayland?
yes, and I see that on Gnome + Wayland app works - it shows weird UI theme but works.
@JordanL2 What if you try these 2 test programs? (app from Lazarus 'examples'- compiled for gtk2 + qt5).
scroll-synedit.zip
@Alexey-T Much like Cudatext - GTK2 launches (vai Xwayland) after some delay, while the QT5 one outputs this error (but works via Xwayland):
[FORMS.PP] ExceptionOccurred
Sender=EObjectCheck
Exception=Object reference is Nil
Stack trace:
$0000000000567D75
$00000000004A1FE6
$0000000000770DBA
$0000000000770625
$000000000076B989
$00000000006E0BEC
$00000000006E0ADB
$000000000047E3A2
$00000000004CDAC0
$000000000043AB6C
[FORMS.PP] ExceptionOccurred
Interestingly, the app works with Sway, so it doesn't even seem to be a wlroots issue.
OK, so it is some Lazarus Qt5-code issue, I will report it to Lazarus devs, thanks.
Oh weird. It works if I reset my Wayfire config to pretty much default. It must be caused by some config or plugin I'm using. Will try to narrow it down.
Sorry - My mistake. That just unset the QT_QPA_PLATFORM environment variable so it defaulted to using Xwayland.
I've raised a bug on the Wayfire tracker, maybe the devs there will have some idea of why this is happening:
https://github.com/WayfireWM/wayfire/issues/1249
Quite bizarre, but changing QT_QPA_PLATFORM=wayland-egl to QT_QPA_PLATFORM=wayland has made it work :)
I'll close this issue, thanks for your help!
@Alexey-T - Exactly what version of FPC and Lazarus do you use to compile the Linux+Qt5 build? I think you use FPC 3.2.1 from the about dialog.
I only ask because I'm trying to build Cudatext from source (I'm investigating making a Flatpak) and the build I'm making is throwing this error with QT_QPA_PLATFORM=wayland - only thing I can think could be causing it is the Lazarus version. I'm using 2.0.12.
Of course the reason is Laz version, not FPC. I use the trunk 2.2 which was pulled about a 2-3 weeks ago.