{"record":{"id":"15e0fa563d1b8eea","repo":"GraphiteEditor/Graphite","slug":"ellipse-node-can-t-be-found","errorCode":null,"errorMessage":"Ellipse node can't be found","messagePattern":"Ellipse node can't be found","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"editor/src/messages/tool/common_functionality/shapes/ellipse_shape.rs","lineNumber":17,"sourceCode":"use super::shape_utility::ShapeToolModifierKey;\nuse super::*;\nuse crate::messages::portfolio::document::node_graph::document_node_definitions::resolve_proto_node_type;\nuse crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier;\nuse crate::messages::portfolio::document::utility_types::network_interface::{InputConnector, NodeTemplate};\nuse crate::messages::tool::common_functionality::graph_modification_utils;\nuse crate::messages::tool::tool_messages::tool_prelude::*;\nuse graph_craft::document::NodeInput;\nuse graph_craft::document::value::TaggedValue;\nuse std::collections::VecDeque;\n\n#[derive(Default)]\npub struct Ellipse;\n\nimpl Ellipse {\n\tpub fn create_node() -> NodeTemplate {\n\t\tlet node_type = resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER).expect(\"Ellipse node can't be found\");\n\t\tnode_type.node_template_input_override([None, Some(NodeInput::value(TaggedValue::F64(0.5), false)), Some(NodeInput::value(TaggedValue::F64(0.5), false))])\n\t}\n\n\tpub fn update_shape(\n\t\tdocument: &DocumentMessageHandler,\n\t\tipp: &InputPreprocessorMessageHandler,\n\t\tviewport: &ViewportMessageHandler,\n\t\tlayer: LayerNodeIdentifier,\n\t\tshape_tool_data: &mut ShapeToolData,\n\t\tmodifier: ShapeToolModifierKey,\n\t\tresponses: &mut VecDeque<Message>,\n\t) {\n\t\tlet [center, lock_ratio, _] = modifier;\n\n\t\tif let Some([start, end]) = shape_tool_data.data.calculate_points(document, ipp, viewport, center, lock_ratio) {\n\t\t\tlet Some(node_id) = graph_modification_utils::get_ellipse_id(layer, &document.network_interface) else {\n\t\t\t\treturn;\n\t\t\t};","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/GraphiteEditor/Graphite/blob/c507b356453361e31638b8bff8f6d46b6da2961e/editor/src/messages/tool/common_functionality/shapes/ellipse_shape.rs#L1-L35","documentation":"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.","triggerScenarios":"Drawing with the Ellipse tool when generator_nodes::ellipse::IDENTIFIER is missing from DOCUMENT_NODE_TYPES due to rename, removal, or registration edits.","commonSituations":"Refactors moving the ellipse generator to another module; Graphite version upgrades changing identifier namespaces; feature-gated crates excluding the ellipse node.","solutions":["Confirm the ellipse registration entry exists and its key equals the IDENTIFIER const exactly","Repair the mismatch and rebuild","Convert the expect to let-else so the ellipse tool logs and bails instead of crashing","Cover the identifier in a shared registry-drift unit test"],"exampleFix":"// before\nlet node_type = resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER).expect(\"Ellipse node can't be found\");\n// after\nlet Some(node_type) = resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER) else {\n\tlog::error!(\"Ellipse node definition missing from DOCUMENT_NODE_TYPES\");\n\treturn None;\n};","handlingStrategy":"validation","validationCode":"#[test]\nfn ellipse_node_registered() {\n\tassert!(document_node_definitions::resolve_proto_node_type(graphene_std::vector::generator_nodes::ellipse::IDENTIFIER).is_some());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve identifiers once in tests to catch registration drift before release","Avoid duplicating identifier strings; reference the consts from graphene_std directly as this code does","Review feature-gated crate configurations that could exclude generator nodes while tools still reference them"],"tags":["rust","graphite","panic","expect","node-registry","ellipse-tool"],"backgroundTag":"node-definition-not-found","analyzedSha":"c507b356453361e31638b8bff8f6d46b6da2961e","analyzedAt":"2026-08-16T21:57:18.596Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}