diff --git a/editor/src/messages/tool/tool_messages/fill_tool.rs b/editor/src/messages/tool/tool_messages/fill_tool.rs index 7094ddb176..c016b3529e 100644 --- a/editor/src/messages/tool/tool_messages/fill_tool.rs +++ b/editor/src/messages/tool/tool_messages/fill_tool.rs @@ -205,7 +205,6 @@ impl Fsm for FillToolFsmState { #[cfg(test)] mod test_fill { pub use crate::test_utils::test_prelude::*; - use graphene_std::Graphic; use graphene_std::color::SRGBA8; use graphene_std::vector::fill; diff --git a/node-graph/nodes/gcore/src/memo.rs b/node-graph/nodes/gcore/src/memo.rs index d4120ce611..a36eabf2b2 100644 --- a/node-graph/nodes/gcore/src/memo.rs +++ b/node-graph/nodes/gcore/src/memo.rs @@ -194,6 +194,9 @@ fn monitor<'e>( if ctx.innermost_index() == 0 && let GPoll::Final(value) | GPoll::Partial(value) = &result { + // The materialization below evaluates the level again; its frames sit + // above the one this eval already claimed and must not survive. + let mark = core_types::record::stack::sp(); let captured = match content.layout().depth { // SAFETY: the value came from this edge, so it carries the edge's layout. 0 => unsafe { RecordCapture::capture(content.layout(), content.layout().rec(value), ctx.arena()) }, @@ -205,6 +208,9 @@ fn monitor<'e>( LevelStatus::Pending | LevelStatus::Error(_) => None, }, }; + // SAFETY: the capture copies into the arena, so nothing borrows the + // frames left above the mark. + unsafe { core_types::record::stack::rewind(mark) }; *io.lock().unwrap() = captured.map(|output| IORecord { input: CtxSnapshot::capture(ctx), output,