{"record":{"id":"f3621be6dfd8dc1e","repo":"GraphiteEditor/Graphite","slug":"ellipse-node-does-not-exist","errorCode":null,"errorMessage":"Ellipse node does not exist","messagePattern":"Ellipse node does not exist","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"editor/src/messages/tool/common_functionality/shapes/arc_shape.rs","lineNumber":134,"sourceCode":"\n\t\tif self.arc_radius_handle.hovered() || self.arc_radius_handle.is_dragging() {\n\t\t\treturn Some(MouseCursorIcon::EWResize);\n\t\t}\n\n\t\tNone\n\t}\n\n\tfn cleanup(&mut self) {\n\t\tself.sweep_angle_gizmo.cleanup();\n\t\tself.arc_radius_handle.cleanup();\n\t}\n}\n#[derive(Default)]\npub struct Arc;\n\nimpl Arc {\n\tpub fn create_node(arc_type: ArcType) -> NodeTemplate {\n\t\tlet node_type = resolve_proto_node_type(graphene_std::vector::generator_nodes::arc::IDENTIFIER).expect(\"Ellipse node does not exist\");\n\t\tnode_type.node_template_input_override([\n\t\t\tNone,\n\t\t\tSome(NodeInput::value(TaggedValue::F64(0.5), false)),\n\t\t\tSome(NodeInput::value(TaggedValue::F64(0.), false)),\n\t\t\tSome(NodeInput::value(TaggedValue::F64(270.), false)),\n\t\t\tSome(NodeInput::value(TaggedValue::ArcType(arc_type), false)),\n\t\t])\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) {","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/GraphiteEditor/Graphite/blob/c507b356453361e31638b8bff8f6d46b6da2961e/editor/src/messages/tool/common_functionality/shapes/arc_shape.rs#L116-L152","documentation":"Arc::create_node resolves the Arc generator node via resolve_proto_node_type(graphene_std::vector::generator_nodes::arc::IDENTIFIER) and unwraps with .expect(\"Ellipse node does not exist\") (arc_shape.rs:134). The lookup consults the static DOCUMENT_NODE_TYPES registry (document_node_definitions.rs:130, 1480) and returns None when the arc identifier is not registered. Note the message is a copy-paste artifact — it says \"Ellipse node\" while the code resolves the Arc node, so the panic text misleads whoever hits it.","triggerScenarios":"Starting an Arc tool drag (create_node is called when the tool begins a shape) while generator_nodes::arc::IDENTIFIER has no DOCUMENT_NODE_TYPES entry — renamed const, node removed from graphene_std, or registration list edited.","commonSituations":"Renaming/moving the Arc implementation without updating tool references; Graphite upgrades where generator nodes changed namespace; feature-gated builds excluding the arc module; the misleading message sending debugging toward Ellipse instead.","solutions":["Confirm resolve_proto_node_type(graphene_std::vector::generator_nodes::arc::IDENTIFIER).is_some() against the registration list in document_node_definitions.rs","Fix the identifier mismatch (const vs registration key) and rebuild","Correct the expect message to \"Arc node does not exist\" so future hits are diagnosable","Make create_node return Option<NodeTemplate> (or use let-else) so a missing definition surfaces as a graceful failure"],"exampleFix":"// before\nlet node_type = resolve_proto_node_type(graphene_std::vector::generator_nodes::arc::IDENTIFIER).expect(\"Ellipse node does not exist\");\n// after\nlet node_type = resolve_proto_node_type(graphene_std::vector::generator_nodes::arc::IDENTIFIER)\n\t.expect(\"Arc node definition missing from DOCUMENT_NODE_TYPES\");","handlingStrategy":"validation","validationCode":"// Fail in CI, not in the user's tool:\n#[test]\nfn shape_tool_nodes_registered() {\n\tassert!(resolve_proto_node_type(graphene_std::vector::generator_nodes::arc::IDENTIFIER).is_some(), \"Arc node missing from DOCUMENT_NODE_TYPES\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Write expect messages that name the node actually being resolved (here: Arc, not Ellipse)","Centralize per-tool identifier constants so renames touch one place","Run a registry-drift test after editing document_node_definitions.rs or moving generator nodes"],"tags":["rust","graphite","panic","expect","node-registry","arc-tool","misleading-message"],"backgroundTag":"node-definition-not-found","analyzedSha":"c507b356453361e31638b8bff8f6d46b6da2961e","analyzedAt":"2026-08-16T21:57:18.596Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}