GraphiteEditor/Graphite · critical

Ellipse node can't be found

Error message

Ellipse node can't be found

What it means

Ellipse::create_node resolves the Ellipse generator node via resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER).expect("Ellipse node can't be found") (ellipse_shape.rs:17). As with the sibling shape tools, the resolver is a HashMap::get on the static DOCUMENT_NODE_TYPES registry (document_node_definitions.rs:130/1480-1486); None — and thus the panic — means the Ellipse identifier is not registered, a code-level drift rather than a runtime data problem.

Source

Thrown at editor/src/messages/tool/common_functionality/shapes/ellipse_shape.rs:17

use super::shape_utility::ShapeToolModifierKey;
use super::*;
use crate::messages::portfolio::document::node_graph::document_node_definitions::resolve_proto_node_type;
use crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier;
use crate::messages::portfolio::document::utility_types::network_interface::{InputConnector, NodeTemplate};
use crate::messages::tool::common_functionality::graph_modification_utils;
use crate::messages::tool::tool_messages::tool_prelude::*;
use graph_craft::document::NodeInput;
use graph_craft::document::value::TaggedValue;
use std::collections::VecDeque;

#[derive(Default)]
pub struct Ellipse;

impl Ellipse {
	pub fn create_node() -> NodeTemplate {
		let node_type = resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER).expect("Ellipse node can't be found");
		node_type.node_template_input_override([None, Some(NodeInput::value(TaggedValue::F64(0.5), false)), Some(NodeInput::value(TaggedValue::F64(0.5), false))])
	}

	pub fn update_shape(
		document: &DocumentMessageHandler,
		ipp: &InputPreprocessorMessageHandler,
		viewport: &ViewportMessageHandler,
		layer: LayerNodeIdentifier,
		shape_tool_data: &mut ShapeToolData,
		modifier: ShapeToolModifierKey,
		responses: &mut VecDeque<Message>,
	) {
		let [center, lock_ratio, _] = modifier;

		if let Some([start, end]) = shape_tool_data.data.calculate_points(document, ipp, viewport, center, lock_ratio) {
			let Some(node_id) = graph_modification_utils::get_ellipse_id(layer, &document.network_interface) else {
				return;
			};

View on GitHub (pinned to c507b35645)

Solutions

  1. Confirm the ellipse registration entry exists and its key equals the IDENTIFIER const exactly
  2. Repair the mismatch and rebuild
  3. Convert the expect to let-else so the ellipse tool logs and bails instead of crashing
  4. Cover the identifier in a shared registry-drift unit test

Example fix

// before
let node_type = resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER).expect("Ellipse node can't be found");
// after
let Some(node_type) = resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER) else {
	log::error!("Ellipse node definition missing from DOCUMENT_NODE_TYPES");
	return None;
};
Defensive patterns

Strategy: validation

Validate before calling

#[test]
fn ellipse_node_registered() {
	assert!(document_node_definitions::resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER).is_some());
}

Prevention

When it happens

Trigger: Drawing with the Ellipse tool when generator_nodes::ellipse::IDENTIFIER is missing from DOCUMENT_NODE_TYPES due to rename, removal, or registration edits.

Common situations: Refactors moving the ellipse generator to another module; Graphite version upgrades changing identifier namespaces; feature-gated crates excluding the ellipse node.

Related errors


AI-assisted analysis of GraphiteEditor/Graphite@c507b35645 (2026-08-16). Data as JSON: /api/errors/15e0fa563d1b8eea. Report an issue: GitHub.