Fix Linux audio backend preference and worker footage render crash
- On Linux, automatically prefer PipeWire/JACK/PulseAudio over ALSA even when a saved ALSA device name exists in config. - Restore Footage length after deserialization so worker snapshots have valid stream lengths and video playback can advance. - Guard ResolveDecoderFromInput and ProcessAudioFootage against a null decoder cache to prevent worker crashes on direct Footage -> ViewerOutput connections. - Keep Linux signal backtrace handler in the render worker. - Add Oak project SVG logos.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <csignal>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
@@ -32,6 +33,11 @@
|
||||
#include <QOpenGLContext>
|
||||
#include <QSurfaceFormat>
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#include <execinfo.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "common/qtutils.h"
|
||||
#include "config/config.h"
|
||||
#include "core.h"
|
||||
@@ -59,6 +65,18 @@ void HideWorkerDockIcon();
|
||||
namespace
|
||||
{
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
void PrintBacktrace(int sig)
|
||||
{
|
||||
void *array[50];
|
||||
size_t size = backtrace(array, 50);
|
||||
fprintf(stderr, "worker: caught signal %d, backtrace:\n", sig);
|
||||
backtrace_symbols_fd(array, size, STDERR_FILENO);
|
||||
fflush(stderr);
|
||||
_exit(128 + sig);
|
||||
}
|
||||
#endif
|
||||
|
||||
constexpr int kProtocolVersion = 1;
|
||||
constexpr int kDefaultWidth = 1920;
|
||||
constexpr int kDefaultHeight = 1080;
|
||||
@@ -606,6 +624,12 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
std::signal(SIGSEGV, PrintBacktrace);
|
||||
std::signal(SIGABRT, PrintBacktrace);
|
||||
std::signal(SIGFPE, PrintBacktrace);
|
||||
#endif
|
||||
|
||||
QFile in;
|
||||
QFile out;
|
||||
if (!in.open(stdin, QIODevice::ReadOnly | QIODevice::Unbuffered) ||
|
||||
|
||||
Reference in New Issue
Block a user