Silent app exit: unhandled exceptions in callbacks / background threads are never logged (desktop 0.86.x)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- backend, documentation
Hướng nghiên cứu
Bắt đầu với tài liệu xử lý lỗi và phần cookbook 1.0 về page.run_task() được đề cập trong issue. Kiểm tra cách tài liệu đó mô tả các ngoại lệ trong callback và luồng chạy nền, sau đó ghi lại cách thiết lập hook toàn cục được hỗ trợ hoặc làm rõ hành vi của Flet trong những trường hợp đó. Hoàn thành khi tài liệu xử lý lỗi giải thích những gì được ghi nhật ký và cách người dùng có thể bắt các ngoại lệ chưa được xử lý.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Split out of #7100 so it can be tracked independently.
Environment
- Flet 0.86.5, Python 3.14, Windows 11
- Packaged as a single desktop executable (no console attached)
- The app uses long-lived background workers and timer-driven UI updates
Observed behaviour
A packaged build occasionally exited with nothing shown to the user. The last
line in the application log was:
20:12:12 Session was garbage collected
followed by silence: no on_disconnect, no shutdown record, no traceback.
Try/except around individual event handlers did not capture the failure.
Diagnosis
The exception was raised in a Flet event callback or in a background thread,
outside the code path covered by the application's normal logging. With no
console attached, Python's default handling produced nothing useful.
Installing three hooks at startup made the next failure fully visible:
sys.excepthookthreading.excepthookasyncio.get_running_loop().set_exception_handler(...)
After that, the next crash produced a complete stack trace in the log. Without
those hooks the failure is effectively invisible, which makes it very hard to
file a useful bug report.
What would help
The 1.0 cookbook now documents that an un-awaited page.run_task() future logs
its exception through Flet. It does not say what happens to exceptions raised in
plain worker threads, or in a callback that is not a coroutine.
Could Flet either:
- log unhandled callback / thread exceptions to the console log by default in
desktop mode, or - document the recommended global-hook setup as the supported pattern?
A short note in the error-handling docs would already save a lot of blind
debugging. Optionally, emitting a pending-exception summary at session
garbage-collection time would make these silent exits reportable.
No project-specific data is included; the log line above is generic.
- Ngôn ngữ chính
- Python
- Star
- 17.6k
- Fork
- 753
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 64
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flet-dev/flet
-
feature: python 3.15 supportĐang mởfeature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
flet-dev/flet#6985 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: dataclass_transform() uses should include `field_specifiers` argumentCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Desktop 0.86.x: silent callback crashes, ambiguous run_thread/run_task semantics, and focus() no-op via run_taskCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: InputFilter number checkingCó thể đã có người làm @ndonkoHenri đã nhận hôm nay. Đang mởbug
flet-dev/flet#7098 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của flet-dev/flet
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
mozilla-ai/cq#601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bump Python to 3.14 or 3.15Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
intcomma returns exponential notation for large floatsCó thể đã có người làm @Omarinho12345 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
python-humanize/humanize#521 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
LUCJ pass manager raises NoEdgeBetweenNodes when an edge is bad for two two-qubit gatesCó thể đã có người làm @hat-im đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itCó thể đã có người làm @paulo-0308 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Diaoul/subliminal#1405 ·