Skip to content

after e fails on resume after exiting editor: "The cursor position could not be read within a normal duration" #784

Description

@b-kaiser

Pressing e to edit a task and quitting the editor crashes the TUI on resume 100% of the time on my system. Issue is independent of the editor (reproduces with both nvim 0.12.4 and vim 9,1 (tiny) and of the terminal (reproduces in GNOME Terminal, xterm, and alacritty). It first appears in v0.26.6 (v0.26.5 is fine). On 0.26.6 the TUI hangs and sometimes it leaks incrementing cursor-position replies to the screen or similar. On v0.27.0 the same failure is caught and shown as [taskwarrior-tui error]: The cursor position could not be read within a normal duration. v0.26.6 includes the crossterm 0.27→0.29 / ratatui 0.26→0.30 upgrade. Maybe crossterm#963?

Environment

  • taskwarrior-tui: 0.27.0 (also fails v0.26.6); works on 0.26.5
  • task: 3.4.2
  • OS: Debian GNU/Linux 13 (trixie), kernel 6.12.94
  • Terminal emulators (all reproduce): GNOME Terminal 3.56.2 / VTE 0.80.1, xterm(398), alacritty 0.15.1
  • Shell: bash
  • Editor: nvim 0.12.4 and /usr/bin/vim.tiny, both reproduce

Steps to reproduce

  1. taskwarrior-tui
  2. Select a task, press e
  3. Edit (or make no change) and quit the editor
  4. TUI breaks on resume — v0.27.0: error banner above. v0.26.6: hangs with incrementing cursor-position replies printed to the screen

Ruled out

  • Minimal taskrc, no hooks (hooks dir empty)
  • Local data path (data.location=~/.task, not mounted/network)
  • Editor and terminal emulator (see above)
  • Plain task <id> edit from the shell works fine

Complete Log (TASKWARRIOR_TUI_LOG_LEVEL=trace)

2026-07-12 00:20:41 | DEBUG | src/main.rs:170 | getting matches from clap...
2026-07-12 00:20:41 | DEBUG | src/main.rs:171 | report = "next"
2026-07-12 00:20:41 | DEBUG | src/main.rs:172 | config = None
2026-07-12 00:20:41 | TRACE | src/app.rs:1662 | self.update(true);
2026-07-12 00:20:41 | INFO | src/app.rs:2244 | Running `Command {
    program: "task",
    args: [
        "task",
        "rc.json.array=on",
        "rc.confirmation=off",
        "rc.json.depends.array=on",
        "rc.color=off",
        "rc._forcecolor=off",
        "rc.report.next.filter=status:pending -WAITING limit:page",
        "export",
        "next",
    ],
    create_pidfd: false,
}`
2026-07-12 00:20:41 | INFO | src/app.rs:2254 | Imported 1 tasks
2026-07-12 00:20:41 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:41 | DEBUG | src/app.rs:1784 | Running task details for 6a18e143-cbcd-4f05-9498-282fe90987a7
2026-07-12 00:20:41 | DEBUG | src/history.rs:48 | Loading history of length 1
2026-07-12 00:20:41 | DEBUG | src/history.rs:48 | Loading history of length 0
2026-07-12 00:20:41 | DEBUG | src/app.rs:387 | Tick event
2026-07-12 00:20:41 | TRACE | src/app.rs:1662 | self.update(false);
2026-07-12 00:20:41 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:42 | DEBUG | src/app.rs:387 | Tick event
2026-07-12 00:20:42 | TRACE | src/app.rs:1662 | self.update(false);
2026-07-12 00:20:42 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:42 | DEBUG | src/app.rs:387 | Tick event
2026-07-12 00:20:42 | TRACE | src/app.rs:1662 | self.update(false);
2026-07-12 00:20:42 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:42 | DEBUG | src/app.rs:387 | Tick event
2026-07-12 00:20:42 | TRACE | src/app.rs:1662 | self.update(false);
2026-07-12 00:20:42 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:42 | DEBUG | src/app.rs:387 | Tick event
2026-07-12 00:20:42 | TRACE | src/app.rs:1662 | self.update(false);
2026-07-12 00:20:42 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:42 | DEBUG | src/app.rs:379 | Received input = Char('e')
2026-07-12 00:20:44 | TRACE | src/app.rs:1662 | self.update(true);
2026-07-12 00:20:44 | INFO | src/app.rs:2244 | Running `Command {
    program: "task",
    args: [
        "task",
        "rc.json.array=on",
        "rc.confirmation=off",
        "rc.json.depends.array=on",
        "rc.color=off",
        "rc._forcecolor=off",
        "rc.report.next.filter=status:pending -WAITING limit:page",
        "export",
        "next",
    ],
    create_pidfd: false,
}`
2026-07-12 00:20:44 | INFO | src/app.rs:2254 | Imported 1 tasks
2026-07-12 00:20:44 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:44 | DEBUG | src/app.rs:1784 | Running task details for 6a18e143-cbcd-4f05-9498-282fe90987a7
2026-07-12 00:20:44 | TRACE | src/app.rs:1811 | self.update_task_table_state()
2026-07-12 00:20:44 | TRACE | src/app.rs:1811 | self.update_task_table_state()

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions