zbanks / radiance

Radiance is video art software for VJs. It supports beat detection, animated GIFs, YouTube video, OpenGL shader effects. It is designed for live performance and runs on Linux and MacOS.
https://radiance.video
MIT License
191 stars 23 forks source link

Throws exception from the Qt event handler, the error message gets lost #118

Open yurivict opened 3 years ago

yurivict commented 3 years ago

These lines throw exception when OpenGL can't be initialized:

393│     int r = mpv_opengl_cb_init_gl(m_mpv_gl, NULL, get_proc_address, NULL);
394│     if (r < 0)
395├───────> throw std::runtime_error("could not initialize OpenGL");

radiance then fails like this:

$ radiance 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yuri'
System library path is: "/usr/local/share/radiance/library/"
User library path is: "/home/yuri/.local/share/Radiance/Radiance/library"
System config path is: "/usr/local/share/radiance/config/"
User config path is: "/home/yuri/.local/share/Radiance/Radiance/config"
QML path is: "/usr/local/share/radiance/qml/"
GLSL path is: "/usr/local/share/radiance/glsl/"
file:///usr/local/share/radiance/qml/ConsoleWidget.qml:32:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/local/share/radiance/qml/AutoDJ.qml:247:5: QML ColumnLayout: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///usr/local/share/radiance/qml/LibraryWidget.qml:93:13: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qml: Graph changed! +21 -0 vertices, +19 -0 edges
[cplayer] mpv 0.33.1 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Sun Oct  3 04:56:46 UTC 2021
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       56.70.100
[cplayer]    libavcodec      58.134.100
[cplayer]    libavformat     58.76.100
[cplayer]    libswscale      5.9.100
[cplayer]    libavfilter     7.110.100
[cplayer]    libswresample   3.9.100
[cplayer] FFmpeg version: 4.4
[cplayer] 
[cplayer] Configuration: /wrkdirs/usr/ports/multimedia/mpv/work/waf-2.0.20/waf-light configure --docdir=/usr/local/share/examples/mpv --htmldir=/usr/local/share/doc/mpv/html --mandir=/usr/local/man --disable-debug-build --disable-optimize --disable-pdf --disable-rubberband --disable-shaderc --disable-vapoursynth --enable-libmpv-shared --disable-alsa --enable-libarchive --disable-caca --enable-html --enable-dvdnav --disable-jack --disable-lcms2 --disable-libbluray --lua=52fbsd --disable-javascript --disable-openal --disable-pulse --disable-sixel --enable-dvbin --disable-zimg --enable-vaapi-wayland --prefix=/usr/local -j1
[cplayer] List of enabled features: 52fbsd asm bsd-fstatfs build-date consio.h cplayer cplugins drm dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jpeg libarchive libass libavdevice libdl libm libmpv-shared libplacebo librt linux-input-event-codes lua memfd_create oss-audio plain-gl posix posix-or-mingw pthreads stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vulkan wayland wayland-protocols x11 xv zlib
[cplayer] Waiting for scripts...
[cplayer] Set property: hwdec="auto" -> 1
[cplayer] Set property: scale="spline36" -> 1
[cplayer] Set property: loop-file="inf" -> 1
[cplayer] Set property: loop="inf" -> 1
[cplayer] Set property: fbo-format="rgba32f" -> 1
Warning: property 'opengl-fbo-format' was replaced with 'fbo-format' and might be removed in the future.
[cplayer] Set property: fbo-format="rgba32f" -> 1
[cplayer] Set property: opengl-fbo-format="rgba32f" -> 1
[main] The opengl_cb API is not supported anymore.
[main] Use the similar API in render.h instead.
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.

Abort trap
yurivict commented 3 years ago

mpv-based code fails to initialize OpenGL: https://github.com/mpv-player/mpv/issues/9319

yurivict commented 3 years ago

Based on their latest comment the OpenGL support has been removed from mpv. The Radiance app needs to be updated accordingly.

I am afraid that it is broken as it is now.

yurivict commented 3 years ago

@zbanks Please consider to fix this.

Otherwise radiance would become unbuildable soon.