Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux - Doesn't work on Wayland (natively) #3592

Closed
JordanL2 opened this issue Jul 24, 2021 · 13 comments
Closed

Linux - Doesn't work on Wayland (natively) #3592

JordanL2 opened this issue Jul 24, 2021 · 13 comments

Comments

@JordanL2
Copy link

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.

@Alexey-T
Copy link
Owner

Alexey-T commented Jul 24, 2021

What Qt5 version do you have? Arch, so the latest?
I can run on Ubuntu:

apt list libqt5*

@JordanL2
Copy link
Author

JordanL2 commented Jul 24, 2021

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

@JordanL2
Copy link
Author

@Alexey-T I take it you're testing with Gnome Wayland?

@Alexey-T
Copy link
Owner

Alexey-T commented Jul 24, 2021

yes, and I see that on Gnome + Wayland app works - it shows weird UI theme but works.

@Alexey-T
Copy link
Owner

@JordanL2 What if you try these 2 test programs? (app from Lazarus 'examples'- compiled for gtk2 + qt5).
scroll-synedit.zip

@JordanL2
Copy link
Author

@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.

@Alexey-T
Copy link
Owner

OK, so it is some Lazarus Qt5-code issue, I will report it to Lazarus devs, thanks.

@JordanL2
Copy link
Author

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.

@JordanL2
Copy link
Author

Sorry - My mistake. That just unset the QT_QPA_PLATFORM environment variable so it defaulted to using Xwayland.

@JordanL2
Copy link
Author

I've raised a bug on the Wayfire tracker, maybe the devs there will have some idea of why this is happening:
WayfireWM/wayfire#1249

@JordanL2
Copy link
Author

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!

@JordanL2
Copy link
Author

JordanL2 commented Aug 5, 2021

@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.

@Alexey-T
Copy link
Owner

Alexey-T commented Aug 5, 2021

Of course the reason is Laz version, not FPC. I use the trunk 2.2 which was pulled about a 2-3 weeks ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants