GraphiteEditor/Graphite · error
Path node does not exist
Error message
Path node does not exist
What it means
Starting the first spline click creates a two-node layer (Path feeding a Spline node); the Path half is resolved by name via resolve_network_node_type("Path").expect("Path node does not exist") against the DOCUMENT_NODE_TYPES static registry. A miss means the structural Path node definition is missing or renamed in this build of the editor. The panic happens at spline-layer creation, before any spline geometry exists.
Source
Thrown at editor/src/messages/tool/tool_messages/spline_tool.rs:404
let append_to_selected_layer = input.keyboard.key(append_to_selected);
// Create new path in the selected layer when shift is down
if let (Some(layer), true) = (selected_layer, append_to_selected_layer) {
tool_data.current_layer = Some(layer);
let transform = document.metadata().transform_to_viewport(layer);
let position = transform.inverse().transform_point2(input.mouse.position);
tool_data.next_point = position;
return SplineToolFsmState::Drawing;
}
responses.add(DocumentMessage::DeselectAllLayers);
let parent = document.new_layer_bounding_artboard(input, viewport);
let path_node_type = resolve_network_node_type("Path").expect("Path node does not exist");
let path_node = path_node_type.default_node_template();
let spline_node_type = resolve_proto_node_type(graphene_std::vector::spline::IDENTIFIER).expect("Spline node does not exist");
let spline_node = spline_node_type.node_template_input_override([Some(NodeInput::node(NodeId(1), 0))]);
let nodes = vec![(NodeId(1), path_node), (NodeId(0), spline_node)];
let layer = graph_modification_utils::new_custom(NodeId::new(), nodes, parent, responses);
tool_options.drawing.fill.apply_fill(layer, responses);
tool_options.drawing.apply_stroke_to_new_layer(layer, responses);
tool_options.drawing.apply_stroke_order_to_new_layer(layer, responses);
tool_data.current_layer = Some(layer);
tool_data.new_layer_viewport_start = Some(viewport_vec);
// Position the layer at the initial mouse position via Transform
responses.add(DeferMessage::AfterGraphRun {
messages: vec![translation_transform_set(document, layer, viewport_vec), NodeGraphMessage::RunDocumentGraph.into()],
});
SplineToolFsmState::DrawingView on GitHub (pinned to c507b35645)
Solutions
- Confirm the registry contains a Network definition keyed exactly "Path" (dump via collect_node_types()).
- Introduce a single shared constant for the Path node name and use it at the definition site and in all tool call sites.
- If the definition was renamed, add the node under the old key or update every resolve_network_node_type("Path") occurrence in one change.
- Degrade gracefully: use let-else to log and abort the spline start instead of crashing the editor.
Example fix
// before
let path_node_type = resolve_network_node_type("Path").expect("Path node does not exist");
let path_node = path_node_type.default_node_template();
// after
let Some(path_node) = resolve_network_node_type(PATH_NODE_NAME).map(|t| t.default_node_template()) else {
log::error!("Path network node missing; spline tool cannot create a layer");
return SplineToolFsmState::Ready;
}; Defensive patterns
Strategy: validation
Validate before calling
let Some(path_node) = resolve_network_node_type("Path").map(|t| t.default_node_template()) else {
// Path node missing from registry: abort spline start gracefully
return SplineToolFsmState::Ready;
};
let nodes = vec![(NodeId(1), path_node)]; Prevention
- Use a shared constant for the Path node name at all creation sites.
- Add a registry-consistency unit test listing every node name the tools resolve.
- Review string-keyed lookups whenever the network node definition list is edited.
When it happens
Trigger: Spline tool click that is not appending to an existing spline layer: after DeselectAllLayers and new_layer_bounding_artboard, the tool runs resolve_network_node_type("Path").expect(...) and pairs it with the spline node in the new_custom call.
Common situations: The Path network node definition is renamed/removed in document_node_definitions.rs while spline_tool.rs (and freehand_tool.rs, pen_tool.rs) still pass the literal "Path"; divergent branches merging a registry refactor without updating all three call sites; forks renaming structural nodes for localization.
Related errors
- Path node does not exist
- Path node does not exist
- Spline node does not exist
- Star node can't be found
- Brush node does not exist
AI-assisted analysis of GraphiteEditor/Graphite@c507b35645 (2026-08-16).
Data as JSON: /api/errors/2b50f8b3ebc7bbd9.
Report an issue: GitHub.