moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
11.03k stars 643 forks source link

Moonlight GUI doesn't load on Qt 5.9 #53

Closed kshots closed 6 years ago

kshots commented 6 years ago

Bug Description When compiled from git (either with head or with tag 0.3.0) on a Gentoo system with the following components (and versions):

I get the following when starting moonlight: ` rich@graendal ~ $ moonlight

00:00:00 - Qt Warning: QQmlApplicationEngine failed to load component 00:00:00 - Qt Warning: qrc:/gui/main.qml:73 Cannot assign to non-existent property "icon" `

On a guess, "icon" was not available in QtQuickControls2 under version 5.9.6? Which version do you operate under? Also, I see no errors in the above output - only warnings...

Steps to reproduce Appears to be reproducible whether running from local (pre-install) environment or after install via ebuild. Just clone, checkout, qmake, compile, and run (or fail to run) with the above dependencies...

Moonlight settings (please complete the following information)

Client PC details (please complete the following information)

USE flags for each component include:

` rich@graendal ~ $ emerge -pv openssl qtquickcontrols2 libsdl2 ffmpeg libva libvdpau nvidia-drivers

These are the packages that would be merged, in order:

Calculating dependencies... done! [ebuild R ] dev-libs/openssl-1.0.2o-r3::gentoo USE="asm kerberos sslv3 tls-heartbeat zlib -bindist -gmp -rfc3779 -sctp -sslv2 -static-libs {-test} -vanilla" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB [ebuild R ] x11-libs/libvdpau-1.1.1::gentoo USE="dri -doc {-test}" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild R ] media-libs/libsdl2-2.0.8-r1::gentoo USE="X alsa dbus haptic joystick opengl pulseaudio sound threads udev video (-altivec) (-aqua) (-custom-cflags) -gles -libsamplerate -nas -oss -static-libs -tslib -wayland -xinerama -xscreensaver" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="mmx sse sse2 -3dnow" 0 KiB [ebuild R ] x11-libs/libva-1.7.3::gentoo USE="X drm opengl vdpau -egl -wayland" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="i965 intel nouveau nvidia -dummy" 0 KiB [ebuild R ] dev-qt/qtquickcontrols2-5.9.6:5/5.9::gentoo USE="widgets -debug {-test}" 0 KiB [ebuild R ] x11-drivers/nvidia-drivers-396.45:0/396::gentoo USE="X acpi driver kms multilib static-libs tools uvm -compat -gtk3 -pax_kernel -wayland" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild R #] media-video/ffmpeg-4.0.2:0/56.58.58::gentoo USE="X alsa amr amrenc bzip2 celt encode fdk gme gmp gpl gsm hardcoded-tables iconv jpeg2k kvazaar ladspa libass libcaca libdrm libilbc librtmp libsoxr lzma modplug mp3 network openal opencl opengl openh264 opus postproc pulseaudio sdl snappy svg theora threads truetype twolame vaapi vdpau vorbis vpx wavpack webp x264 x265 xcb xvid zimg zlib zvbi (-altivec) (-appkit) -bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection -debug -doc -flite -fontconfig -frei0r -fribidi -gcrypt -gnutls -iec61883 -ieee1394 -jack -libaom -libressl -libv4l -lv2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -openssl -oss -pic -rubberband -samba -speex -ssh -static-libs {-test} -v4l -zeromq" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" VIDEO_CARDS="nvidia" 0 KiB

Total: 7 packages (7 reinstalls), Size of downloads: 0 KiB ` Logs (please attach)

cgutman commented 6 years ago

I think the icon warning is expected on Qt 5.9. I've seen it even though the app works, so that's probably a red herring. I use Qt 5.11 for official builds, but I think we should work on 5.9 too.

My guess is that some Qt package is missing that we need at runtime. Can you try adding qtquickcontrols too?

kshots commented 6 years ago

Hmm... I have 5.9.6 for QtQuickControls as well (with the "widgets" USE flag enabled - no other USE flags available):

rich@graendal ~ $ emerge -pv qtquickcontrols:5

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-qt/qtquickcontrols-5.9.6:5/5.9::gentoo  USE="widgets -debug {-test}" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

... Any other things to check? QML complicates things a bit - normally an 'ldd' would find any missing libs, but as you say, these are loaded at run-time :/

Also, if it helps, the app returns exit code '255'

cgutman commented 6 years ago

You could try to strace it to see what it's trying to load. Otherwise, I'll try to reproduce the issue myself and see what might be missing.

kshots commented 6 years ago

Sure thing - strace attached strace.txt

cgutman commented 6 years ago

OK, I have reproduced the issue with a clean VM of Ubuntu 18.04 (which also has Qt 5.9). It looks like it is a Qt 5.9 incompatibility after all and the warning you see is the actual issue preventing the application window from being created successfully.

It looks like there are a couple issues with Qt 5.9:

If you can get Qt 5.10+, you should be able to run Moonlight. However, I do still want compatibility back to Qt 5.9 LTS, so I will still consider this a bug.

cgutman commented 6 years ago

Dialog version issue is fixed in https://github.com/moonlight-stream/moonlight-qt/commit/9470615c63bdd979a66e33c5f7519a3f28ed80e1

cgutman commented 6 years ago

ToolButton issue is fixed in https://github.com/moonlight-stream/moonlight-qt/commit/0467c2f893cb35b7cab941d7a5d258f1e5731730

@kshots Git head should now work on Qt 5.9.

kshots commented 6 years ago

Confirmed, fixed here too. Thanks!