{"record":{"id":"befff7197c5a15de","repo":"wagoodman/dive","slug":"controller-failed-update-w","errorCode":null,"errorMessage":"controller failed update: %w","messagePattern":"controller failed update: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/dive/cli/internal/ui/v1/app/controller.go","lineNumber":118,"sourceCode":"\terr := c.views.Tree.SetTree(selection.BottomTreeStart, selection.BottomTreeStop, selection.TopTreeStart, selection.TopTreeStop)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif c.views.Layer.CompareMode() == viewmodel.CompareAllLayers {\n\t\tc.views.Tree.SetTitle(\"Aggregated Layer Contents\")\n\t} else {\n\t\tc.views.Tree.SetTitle(\"Current Layer Contents\")\n\t}\n\n\t// update details and filetree panes\n\treturn c.UpdateAndRender()\n}\n\nfunc (c *controller) UpdateAndRender() error {\n\terr := c.Update()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"controller failed update: %w\", err)\n\t}\n\n\terr = c.Render()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"controller failed render: %w\", err)\n\t}\n\n\treturn nil\n}\n\n// Update refreshes the state objects for future rendering.\nfunc (c *controller) Update() error {\n\tfor _, v := range c.views.Renderers() {\n\t\terr := v.Update()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"controller unable to update view: %w\", err)\n\t\t}\n\t}","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/app/controller.go#L100-L136","documentation":"Internal TUI error from the v1 UI controller: UpdateAndRender() calls Update() to refresh view state and this wraps any failure from that step with 'controller failed update'. It almost always wraps the deeper 'controller unable to update view' error produced by one of the gocui views' Update() methods (filetree, layer details, etc.).","triggerScenarios":"Any exception inside a view's Update() during the TUI event loop: nil analysis data being rendered, a filetree ref-tree inconsistency, or a view whose layout has not been initialized. It surfaces through the gocui mainloop and typically terminates the TUI.","commonSituations":"Corrupted/unusual image trees producing nil node data; terminal resized to zero dimensions mid-render; races between key handlers mutating state concurrently with Update().","solutions":["Look at the wrapped inner error (it names the actual view failure) and address that root cause.","Re-run with the same image in a supported terminal at normal size to rule out layout degeneracy.","If it reproduces on one image only, the image's layer metadata may be malformed; try --ignore-errors or a different image to isolate.","Report a bug at the dive repo with the image reference and full wrapped error stack if it persists."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["In automation, prefer --json or --ci over the TUI; interactive controllers are not scriptable.","Keep terminal sessions at stable, adequate sizes to avoid update failures.","Capture full error chains when reporting TUI crashes."],"tags":["dive","tui","gocui","controller","internal"],"backgroundTag":null,"analyzedSha":"d6c691947f8fda635c952a17ee3b7555379d58f0","analyzedAt":"2026-08-15T09:42:35.293Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}