From 5536543eb8c26e5289c949a71e2ed469bb4783c8 Mon Sep 17 00:00:00 2001 From: deltag0 Date: Fri, 3 Jul 2026 12:24:57 -0400 Subject: [PATCH 1/6] fix: add warning instead of seg fault on missing GPU --- src/bin/apps/rv/main.cpp | 5 +++ src/bin/imgtools/rvio/main.cpp | 5 +++ src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp | 33 +++++++++++++++++-- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/bin/apps/rv/main.cpp b/src/bin/apps/rv/main.cpp index a24e8e820..f6bf5bbfe 100644 --- a/src/bin/apps/rv/main.cpp +++ b/src/bin/apps/rv/main.cpp @@ -787,6 +787,11 @@ int utf8Main(int argc, char* argv[]) TwkGLF::FBOVideoDevice* dummyDev = new TwkGLF::FBOVideoDevice(0, 10, 10, false); IPCore::ImageRenderer::queryGL(); const char* glVersion = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION); + if (!glVersion) + { + cout << "ERROR: no GPU available: GL_SHADING_LANGUAGE_VERSION query failed" << endl; + exit(-1); + } IPCore::Shader::Function::useShadingLanguageVersion(glVersion); #endif diff --git a/src/bin/imgtools/rvio/main.cpp b/src/bin/imgtools/rvio/main.cpp index 2fd3441e5..b508e0201 100644 --- a/src/bin/imgtools/rvio/main.cpp +++ b/src/bin/imgtools/rvio/main.cpp @@ -985,6 +985,11 @@ int utf8Main(int argc, char* argv[]) #endif IPCore::ImageRenderer::queryGL(); const char* glVersion = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION); + if (!glVersion) + { + cout << "ERROR: no GPU available: GL_SHADING_LANGUAGE_VERSION query failed" << endl; + exit(-1); + } IPCore::Shader::Function::useShadingLanguageVersion(glVersion); #ifndef PLATFORM_WINDOWS diff --git a/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp b/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp index 235359545..b813e39dd 100644 --- a/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp +++ b/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #ifdef PLATFORM_LINUX @@ -154,9 +155,23 @@ namespace TwkGLF int attrs[] = {GLX_BUFFER_SIZE, 32, GLX_RGBA, 0, GLX_STENCIL_SIZE, 1}; m_imp->display = XOpenDisplay(0); + if (!m_imp->display) + { + cout << "ERROR: no GPU available: could not open X display" << endl; + exit(-1); + } + m_imp->root = DefaultRootWindow(m_imp->display); m_imp->vis = glXChooseVisual(m_imp->display, DefaultScreen(m_imp->display), attrs); + if (!m_imp->vis) + { + cout << "ERROR: no GPU available: no matching GLX visual (this is common on " + "virtual machines without GPU/OpenGL support)" + << endl; + exit(-1); + } + swa.colormap = XCreateColormap(m_imp->display, m_imp->root, m_imp->vis->visual, AllocNone); swa.event_mask = ExposureMask | KeyPressMask; @@ -166,6 +181,12 @@ namespace TwkGLF m_imp->ctx = glXCreateContext(m_imp->display, m_imp->vis, 0, True); + if (!m_imp->ctx) + { + cout << "ERROR: no GPU available: could not create GLX context" << endl; + exit(-1); + } + glXMakeCurrent(m_imp->display, m_imp->tiny, m_imp->ctx); #endif @@ -241,10 +262,18 @@ namespace TwkGLF SetPixelFormat(m_imp->deviceContext, result, &m_imp->format); m_imp->glContext = wglCreateContext(m_imp->deviceContext); - assert(m_imp->glContext != NULL); + if (!m_imp->glContext) + { + cout << "ERROR: no GPU available: could not create WGL context" << endl; + exit(-1); + } wglMakeCurrent(m_imp->deviceContext, m_imp->glContext); - assert(wglGetCurrentContext() != NULL); + if (!wglGetCurrentContext()) + { + cout << "ERROR: no GPU available: could not activate WGL context" << endl; + exit(-1); + } glewInit(NULL); #endif From 5c86c5ca1997d97bf88a1c6329ab0276bfdd9e8e Mon Sep 17 00:00:00 2001 From: deltag0 Date: Fri, 3 Jul 2026 12:54:38 -0400 Subject: [PATCH 2/6] docs: document hard GPU requirement and new startup error in user manual --- .../rv-user-manual/rv-user-manual-chapter-fourteen.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md b/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md index d5e74c759..336998e6a 100644 --- a/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md +++ b/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md @@ -77,6 +77,8 @@ While high performance playback cannot be guaranteed, these minimum system requi | Storage | RAID or nvme | | Network | 1 Gb/s. | +> Note: A working GPU with OpenGL support is required to launch RV or rvio. If no GPU is available (for example, on a virtual machine without GPU passthrough), RV and rvio print an "ERROR: no GPU available" message and exit rather than starting. + Since RV aggressively caches its media, the network performance does not directly affect playback performance. It does affect how fast media can be cached, so a faster network allows you to start playback earlier. ## Cache Settings From 0904adf10545033e5016aeeec4b1dd6ecc77b4c1 Mon Sep 17 00:00:00 2001 From: deltag0 Date: Fri, 3 Jul 2026 13:22:13 -0400 Subject: [PATCH 3/6] chore: gitignore .serena/ local tool config --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c2643dc4e..736d4b38c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .vscode/** .idea/** +.serena/** # Qt generated **/*.moc From 306b5c8dabd48cf5cac6f1195770c0cd776786a8 Mon Sep 17 00:00:00 2001 From: deltag0 Date: Fri, 3 Jul 2026 14:07:08 -0400 Subject: [PATCH 4/6] docs: revert gitignore and clean docs Signed-off-by: deltag0 --- .gitignore | 1 - .../rv-user-manual/rv-user-manual-chapter-fourteen.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 736d4b38c..c2643dc4e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ .vscode/** .idea/** -.serena/** # Qt generated **/*.moc diff --git a/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md b/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md index 336998e6a..2051d7fb1 100644 --- a/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md +++ b/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md @@ -72,12 +72,12 @@ While high performance playback cannot be guaranteed, these minimum system requi | Component | Recommended Minimum | | --- | --- | | CPU | 64-bit, 6 cores, 12 logical processors | +| GPPU | OpenGL support | | Memory (RAM) | 16 GB | | Memory (GPU) | 8 GB | | Storage | RAID or nvme | | Network | 1 Gb/s. | -> Note: A working GPU with OpenGL support is required to launch RV or rvio. If no GPU is available (for example, on a virtual machine without GPU passthrough), RV and rvio print an "ERROR: no GPU available" message and exit rather than starting. Since RV aggressively caches its media, the network performance does not directly affect playback performance. It does affect how fast media can be cached, so a faster network allows you to start playback earlier. From e2a9ea88b70af62e26bc1984d174b68fa751f3aa Mon Sep 17 00:00:00 2001 From: deltag0 Date: Fri, 3 Jul 2026 14:08:37 -0400 Subject: [PATCH 5/6] docs: clean docs Signed-off-by: deltag0 --- .../rv-user-manual/rv-user-manual-chapter-fourteen.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md b/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md index 2051d7fb1..00fdb0d62 100644 --- a/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md +++ b/docs/rv-manuals/rv-user-manual/rv-user-manual-chapter-fourteen.md @@ -72,13 +72,12 @@ While high performance playback cannot be guaranteed, these minimum system requi | Component | Recommended Minimum | | --- | --- | | CPU | 64-bit, 6 cores, 12 logical processors | -| GPPU | OpenGL support | +| GPU | OpenGL support | | Memory (RAM) | 16 GB | | Memory (GPU) | 8 GB | | Storage | RAID or nvme | | Network | 1 Gb/s. | - Since RV aggressively caches its media, the network performance does not directly affect playback performance. It does affect how fast media can be cached, so a faster network allows you to start playback earlier. ## Cache Settings From 787fc689bbef7a75984a39bbbe873f7a5f8e2165 Mon Sep 17 00:00:00 2001 From: deltag0 Date: Fri, 3 Jul 2026 14:10:20 -0400 Subject: [PATCH 6/6] format Signed-off-by: deltag0 --- src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp b/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp index b813e39dd..87c0a631c 100644 --- a/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp +++ b/src/lib/graphics/TwkGLFFBO/FBOVideoDevice.cpp @@ -166,8 +166,7 @@ namespace TwkGLF if (!m_imp->vis) { - cout << "ERROR: no GPU available: no matching GLX visual (this is common on " - "virtual machines without GPU/OpenGL support)" + cout << "ERROR: no GPU available: no matching GLX visual" << endl; exit(-1); }