Textualize / textual

The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.
https://textual.textualize.io/
MIT License
24.07k stars 741 forks source link

Possible deadlock with the ToastRack and Tooltip that appeared out of nowhere #4645

Closed arcivanov closed 2 weeks ago

arcivanov commented 2 weeks ago

This is a new issue that happens during the application shutdown, I guess with 0.67.1. Crucially I'm not using a ToastRack nor Tooltip (not even sure what those are)

<06-13 04:16:09.592 CRITICAL bt.trader [trade:817]: Critical failures occurred - shutting down
  | ExceptionGroup: Critical failures occurred - shutting down (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/arcivanov/Documents/src/karellen/myapp/src/main/python/myapp/trade.py", line 783, in _ui_loop
    |     await myappr.run_async()
    |   File "/home/arcivanov/.pyenv/versions/myapp/lib/python3.12/site-packages/textual/app.py", line 1572, in run_async
    |     await app._shutdown()
    |   File "/home/arcivanov/.pyenv/versions/myapp/lib/python3.12/site-packages/textual/app.py", line 2788, in _shutdown
    |     await self._close_all()
    |   File "/home/arcivanov/.pyenv/versions/myapp/lib/python3.12/site-packages/textual/app.py", line 2768, in _close_all
    |     await self._prune_node(stack_screen)
    |   File "/home/arcivanov/.pyenv/versions/myapp/lib/python3.12/site-packages/textual/app.py", line 3418, in _prune_node
    |     raise asyncio.TimeoutError(
    | TimeoutError: Timeout waiting for [Header(), TradingClockBar(), Grid(id='content-grid'), Footer(), ToastRack(id='textual-toastrack'), Tooltip(id='textual-tooltip')] to close; possible deadlock
    | 
    +------------------------------------

I have neither added ToastRack nor Tooltip to the app and it's completely unclear to me why would they be there.

Textual Diagnostics

Versions

Name Value
Textual 0.67.1
Rich 13.7.1

Python

Name Value
Version 3.12.3
Implementation CPython
Compiler GCC 13.2.1 20240316 (Red Hat 13.2.1-7)
Executable /home/arcivanov/.pyenv/versions/3.12.3/envs/boris-trading/bin/python

Operating System

Name Value
System Linux
Release 6.8.11-300.fc40.x86_64
Version #1 SMP PREEMPT_DYNAMIC Mon May 27 14:53:33 UTC 2024

Terminal

Name Value
Terminal Application Unknown
TERM xterm-256color
COLORTERM truecolor
FORCE_COLOR Not set
NO_COLOR Not set

Rich Console options

Name Value
size width=252, height=70
legacy_windows False
min_width 1
max_width 252
is_terminal True
encoding utf-8
max_height 70
justify None
overflow None
no_wrap False
highlight None
markup None
height None
github-actions[bot] commented 2 weeks ago

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

willmcgugan commented 2 weeks ago

Duplicate of https://github.com/Textualize/textual/issues/4643

github-actions[bot] commented 2 weeks ago

Don't forget to star the repository!

Follow @textualizeio for Textual updates.