Skip to content

printString infinite recursion / stack overflow causing 1 fps rendering #97

@DAddYE

Description

@DAddYE

Description

printString[go.shape.string]() in styled.go:164 enters infinite recursion, causing a goroutine stack overflow. This kills rendering performance to ~1 fps.

Stack Trace (truncated)

The goroutine shows 20+ recursive calls to the same function:

goroutine 227 [running]:
github.com/charmbracelet/ultraviolet.printString[go.shape.string]()
  styled.go:164 +0x6d8
github.com/charmbracelet/ultraviolet.printString[go.shape.string]()
  styled.go:164 +0x6d8
[...repeats 20+ times...]

Created at:
charm.land/bubbletea/v2.(*Program).startRenderer()
  tea.go:1387 +0x160

Environment

  • Go 1.26
  • ultraviolet v0.0.0-20260303162955-0b88c25f3fff
  • bubbletea v2.0.1
  • macOS arm64

Impact

Renders the TUI unusable at 1 fps when this recursion triggers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions