From 0cfe3cd053a239bcdce3941cc1b93f396aa66d8b Mon Sep 17 00:00:00 2001 From: Timon Date: Sun, 5 Jul 2026 18:24:58 +0000 Subject: [PATCH] Fix --- .nix/pkgs/graphite-cef.nix | 27 +++++-------------- desktop/src/cef/internal/request_handler.rs | 9 ++++++- .../wgpu-executor/src/texture_cache.rs | 1 - 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.nix/pkgs/graphite-cef.nix b/.nix/pkgs/graphite-cef.nix index 732ffd0943..de6eb2887d 100644 --- a/.nix/pkgs/graphite-cef.nix +++ b/.nix/pkgs/graphite-cef.nix @@ -2,25 +2,10 @@ let version = "149.0.5+g6770623+chromium-149.0.7827.197"; - hashes = { - aarch64-linux = "sha256-cBAvcvs1rAg5EKJkCt81RZYupCWpUNIC/nLt3PJow7Q="; - x86_64-linux = "sha256-OPGMBJmvvLiLdBDniBQwx7LmTGGI59AcesJdILSeqcs="; - }; - selectSystem = - attrs: - attrs.${pkgs.stdenv.hostPlatform.system} - or (throw "Unsupported system ${pkgs.stdenv.hostPlatform.system}"); - - src = pkgs.fetchurl { - url = "https://cef-builds.spotifycdn.com/cef_binary_${version}_${ - selectSystem { - aarch64-linux = "linuxarm64"; - x86_64-linux = "linux64"; - } - }_minimal.tar.bz2"; - hash = selectSystem hashes; - }; + # Local custom CEF build (tarball) instead of the Spotify CDN download. + # Absolute path outside the flake source tree, so this needs `nix develop --impure`. + src = /home/timon/tmp/cef-build/dist/cef_149_7827_x86-64_linux_fixed_buffer_usage.tar.xz; in pkgs.cef-binary.overrideAttrs (finalAttrs: { version = builtins.head (builtins.split "\\+" version); @@ -33,12 +18,14 @@ pkgs.cef-binary.overrideAttrs (finalAttrs: { mv ./Resources/* $out/ mv ./include $out/ - cat ./CREDITS.html | ${pkgs.xz}/bin/xz -9 -e -c > $out/CREDITS.html.xz + if [ -f ./CREDITS.html ]; then + cat ./CREDITS.html | ${pkgs.xz}/bin/xz -9 -e -c > $out/CREDITS.html.xz + fi echo '${ builtins.toJSON { type = "minimal"; - name = builtins.baseNameOf finalAttrs.src.url; + name = "cef_binary_${version}_linux64_minimal.tar.xz"; sha1 = ""; } }' > $out/archive.json diff --git a/desktop/src/cef/internal/request_handler.rs b/desktop/src/cef/internal/request_handler.rs index c77147ff15..3e86f95292 100644 --- a/desktop/src/cef/internal/request_handler.rs +++ b/desktop/src/cef/internal/request_handler.rs @@ -1,6 +1,6 @@ use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_request_handler_t, cef_base_ref_counted_t}; -use cef::{AuthCallback, Browser, CefString, Frame, ImplRequest, ImplRequestHandler, Request, ResourceRequestHandler, WrapRequestHandler}; +use cef::{AuthCallback, Browser, CefString, Frame, ImplRequest, ImplRequestHandler, Request, ResourceRequestHandler, TerminationStatus, WrapRequestHandler}; use std::ffi::c_int; use super::resource_request_handler::ResourceRequestHandlerImpl; @@ -55,6 +55,13 @@ impl ImplRequestHandler for RequestHandlerImpl { 0 } + fn on_render_process_terminated(&self, _browser: Option<&mut Browser>, status: TerminationStatus, error_code: c_int, error_string: Option<&CefString>) { + tracing::error!( + "CEF render process terminated: status={status:?}, error_code={error_code}, error={}", + error_string.map(|error| error.to_string()).unwrap_or_default() + ); + } + fn get_raw(&self) -> *mut _cef_request_handler_t { self.object.cast() } diff --git a/node-graph/libraries/wgpu-executor/src/texture_cache.rs b/node-graph/libraries/wgpu-executor/src/texture_cache.rs index 4e3fad2178..0f7efc2e37 100644 --- a/node-graph/libraries/wgpu-executor/src/texture_cache.rs +++ b/node-graph/libraries/wgpu-executor/src/texture_cache.rs @@ -75,7 +75,6 @@ impl TextureCache { } if Arc::strong_count(texture) == 1 { free_bytes -= texture.memory_size_estimate(); - texture.destroy(); false } else { true