wagoodman/dive · error

controller failed update: %w

Error message

controller failed update: %w

What it means

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.).

Source

Thrown at cmd/dive/cli/internal/ui/v1/app/controller.go:118

	err := c.views.Tree.SetTree(selection.BottomTreeStart, selection.BottomTreeStop, selection.TopTreeStart, selection.TopTreeStop)
	if err != nil {
		return err
	}

	if c.views.Layer.CompareMode() == viewmodel.CompareAllLayers {
		c.views.Tree.SetTitle("Aggregated Layer Contents")
	} else {
		c.views.Tree.SetTitle("Current Layer Contents")
	}

	// update details and filetree panes
	return c.UpdateAndRender()
}

func (c *controller) UpdateAndRender() error {
	err := c.Update()
	if err != nil {
		return fmt.Errorf("controller failed update: %w", err)
	}

	err = c.Render()
	if err != nil {
		return fmt.Errorf("controller failed render: %w", err)
	}

	return nil
}

// Update refreshes the state objects for future rendering.
func (c *controller) Update() error {
	for _, v := range c.views.Renderers() {
		err := v.Update()
		if err != nil {
			return fmt.Errorf("controller unable to update view: %w", err)
		}
	}

View on GitHub (pinned to d6c691947f)

Solutions

  1. Look at the wrapped inner error (it names the actual view failure) and address that root cause.
  2. Re-run with the same image in a supported terminal at normal size to rule out layout degeneracy.
  3. If it reproduces on one image only, the image's layer metadata may be malformed; try --ignore-errors or a different image to isolate.
  4. Report a bug at the dive repo with the image reference and full wrapped error stack if it persists.
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: 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.

Common situations: Corrupted/unusual image trees producing nil node data; terminal resized to zero dimensions mid-render; races between key handlers mutating state concurrently with Update().

Related errors


AI-assisted analysis of wagoodman/dive@d6c691947f (2026-08-15). Data as JSON: /api/errors/befff7197c5a15de. Report an issue: GitHub.