Change:
(Upstream bug, autoclosed due to NixOS not being supported: ) I get the following segv on start: This behavior was not present pre-v27.
Not sure what the issue is but removing a scene that had a browser embed in it stopped the crash. (I tried it because libcef is chrome).
Okay, I can confirm that adding a Browser scene (then quitting OBS, then opening it again) will cause a segfault. Actually adding the scene does not cause any problems, although I was unable to get it to render anything.
This is probably due to our CEF version being out of date. Currently building with a newer copy…
It was indeed our CEF version being out of date. It's practically ancient, from 2019-07-27. Building against latest gives me an OBS that doesn't crash on startup & shows stuff in the Browser source. See for the fix.

Discussion:
<ins> From 635772c4c5ecf11a0f84e6c9fc273dce6b9a5688 Mon Sep 17 00:00:00 2001 From: V <v@anomalous.eu> Date: Thu, 10 Jun 2021 18:36:22 +0200 Subject: [PATCH] Change product_version to user_agent_product This is its name as of CEF 91.1.0. --- obs-browser-plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obs-browser-plugin.cpp b/obs-browser-plugin.cpp index 1a6a009..5eb379e 100644 --- a/plugins/obs-browser/obs-browser-plugin.cpp +++ b/plugins/obs-browser/obs-browser-plugin.cpp @@ -298,7 +298,7 @@ static void BrowserInit(void) prod_ver << std::to_string(obs_maj) << "." << std::to_string(obs_min) << "." << std::to_string(obs_pat); -	CefString(&settings.product_version) = prod_ver.str(); +	CefString(&settings.user_agent_product) = prod_ver.str(); #ifdef USE_QT_LOOP settings.external_message_pump = true; -- 2.31.1 </ins>

<ins> From 0de0a90f8fe5e1e48fa4ec7aa7c825ef88770f9d Mon Sep 17 00:00:00 2001 From: Ryan Foster <RytoEX@gmail.com> Date: Mon, 9 Sep 2019 23:55:02 -0400 Subject: [PATCH] Enable file access and universal access for file URLs When loading a local file, instead of disabling CEF's web security, enable file access and universal access for file URLs. This should allow local files to make CORS requests without completely disabling CEF's security model. --- obs-browser-source.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp index ab1181e..c775283 100644 --- a/plugins/obs-browser/obs-browser-source.cpp +++ b/plugins/obs-browser/obs-browser-source.cpp @@ -179,9 +179,12 @@ bool BrowserSource::CreateBrowser() #if ENABLE_LOCAL_FILE_URL_SCHEME if (is_local) { -			/* Disable web security for file:// URLs to allow -			 * local content access to remote APIs */ -			cefBrowserSettings.web_security = STATE_DISABLED; +			/* Enable file access and universal access from file:// +			 * URLs to allow local content access to remote APIs */ +			cefBrowserSettings.file_access_from_file_urls = +				STATE_ENABLED; +			cefBrowserSettings.universal_access_from_file_urls = +				STATE_ENABLED; } #endif -- 2.31.1 </ins>

fetchSubmodules = true; }; <ins> patches = [ # Lets obs-browser build against CEF 90.1.0+ ./Enable-file-access-and-universal-access-for-file-URL.patch # Lets obs-browser build against CEF 91.1.0+ ./Change-product_version-to-user_agent_product.patch ]; </ins> nativeBuildInputs = [ addOpenGLRunpath cmake pkg-config ]; buildInputs = [

<del> { lib, stdenv, fetchurl, cmake, alsa-lib, atk, cairo, cups, dbus, expat, fontconfig , GConf, gdk-pixbuf, glib, gtk2, libX11, libxcb, libXcomposite, libXcursor , libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXScrnSaver , libXtst, nspr, nss, pango, libpulseaudio, systemd, at-spi2-atk, at-spi2-core </del> <ins> { lib, stdenv, fetchurl, cmake , glib , nss , nspr , atk , at-spi2-atk , libdrm , expat , libxcb , libxkbcommon , libX11 , libXcomposite , libXdamage , libXext , libXfixes , libXrandr , mesa , gtk3 , pango , cairo , alsa-lib , dbus , at-spi2-core , cups , libxshmfence </ins> }: let <del> libPath = lib.makeLibraryPath [ alsa-lib atk cairo cups dbus expat fontconfig GConf gdk-pixbuf glib gtk2 libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender libXScrnSaver libXtst nspr nss pango libpulseaudio systemd at-spi2-core at-spi2-atk ]; in stdenv.mkDerivation rec { </del> <ins> rpath = lib.makeLibraryPath [ glib nss nspr atk at-spi2-atk libdrm expat libxcb libxkbcommon libX11 libXcomposite libXdamage libXext libXfixes libXrandr mesa gtk3 pango cairo alsa-lib dbus at-spi2-core cups libxshmfence ]; in stdenv.mkDerivation rec { </ins> pname = "cef-binary"; <del> version = "75.1.14-gc81164e"; </del> <ins> version = "90.6.7"; gitRevision = "19ba721"; chromiumVersion = "90.0.4430.212"; </ins> src = fetchurl { <del> name = "cef_binary_75.1.14+gc81164e+chromium-75.0.3770.100_linux64_minimal.tar.bz2"; url = "http://opensource.spotify.com/cefbuilds/cef_binary_75.1.14%2Bgc81164e%2Bchromium-75.0.3770.100_linux64_minimal.tar.bz2"; sha256 = "0985b2bx505j0q693hifjgidzb597wqf5idql5aqxs8lfxhc2pgg"; </del> <ins> url = "https://cef-builds.spotifycdn.com/cef_binary_${version}+g${gitRevision}+chromium-${chromiumVersion}_linux64_minimal.tar.bz2"; sha256 = "1ja711x9fdlf21qw1k9xn3lvjc5zsfgnjga1w1r8sysam73jk7xj"; </ins> }; nativeBuildInputs = [ cmake ];

mkdir -p $out/lib/ $out/share/cef/ cp libcef_dll_wrapper/libcef_dll_wrapper.a $out/lib/ cp ../Release/libcef.so $out/lib/ <del> patchelf --set-rpath "${libPath}" $out/lib/libcef.so </del> <ins> patchelf --set-rpath "${rpath}" $out/lib/libcef.so </ins> cp ../Release/*.bin $out/share/cef/ cp -r ../Resources/* $out/share/cef/ cp -r ../include $out/

meta = with lib; { description = "Simple framework for embedding Chromium-based browsers in other applications"; <del> homepage = "http://opensource.spotify.com/cefbuilds/index.html"; </del> <ins> homepage = "https://cef-builds.spotifycdn.com/index.html"; </ins> maintainers = with maintainers; [ puffnfresh ]; license = licenses.bsd3; platforms = with platforms; linux;

libcec_platform = callPackage ../development/libraries/libcec/platform.nix { }; <del> libcef = callPackage ../development/libraries/libcef { inherit (gnome2) GConf; }; </del> <ins> libcef = callPackage ../development/libraries/libcef {}; </ins> libcello = callPackage ../development/libraries/libcello {};