overtake / TelegramSwift

Source code of Telegram for macos on Swift 5.0
https://macos.telegram.org
GNU General Public License v2.0
5.01k stars 850 forks source link

Telegram causes WindowManager to crash #1045

Closed smiba closed 10 months ago

smiba commented 10 months ago

Steps to reproduce:

  1. Have telegram open in the background
  2. Every now and then put focus on Telegram and scroll around in chats, bonus if you do things that trigger Animations (opening emoji tab, typing emoji shortcodes to have the emoji picker pop up etc.)
  3. Profit? Or better, lose all your currently unsaved work because you're gonna cause a WindowManager watchdog timeout, nuking your user session and everything you're running :)

Expected behaviour:

  1. Telegram not causing WindowServer to crash and lose all my work

Actual behaviour:

  1. Telegram will randomly cause the Window Manager to freeze, resulting in a Watchdog timeout force restarting the WindowServer process

Operating system: MacOS 14.1.2 on MacBook Pro 16" M3 Max

Version: 10.3.256373 Stable

Log:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               WindowServer [431]
Path:                  ???
Identifier:            WindowServer
Version:               ???
Code Type:             00000000 (Native)
Parent Process:        ??? [Unknown]
User ID:               

Date/Time:             2023-12-03 13:35:38.3716 +0100
OS Version:            macOS 14.1.2 (23B2091)
Report Version:        12
Anonymous UUID:        FB690D2A-F47D-429E-CA7B-DD897E161F37

System Integrity Protection: 

Notes:
resampled 6 of 3347 threads with truncated backtraces from 0 pids: 
9 unindexed user-stack frames from 6 pids: 1172,1473,1523,1714,1943,2224
This is a watchdog-triggered termination event, and not expected to be well-represented in the legacy crash format

Crashed Thread:        Unknown

Exception Type:        

Termination Reason:    Namespace WATCHDOG, Code 1 monitoring timed out for service
(1 monitored services unresponsive): checkin with service: WindowServer (0 induced crashes) returned not alive with context:
is_alive_func returned unhealthy : 0x4|65090:65090:2|04040000:04040000:04000200
40 seconds since last successful checkin, 251 total successful checkins since 2550 seconds ago, has not exited since first loaded

Error Formulating Crash Report:
resampled 6 of 3347 threads with truncated backtraces from 0 pids: 
9 unindexed user-stack frames from 6 pids: 1172,1473,1523,1714,1943,2224
This is a watchdog-triggered termination event, and not expected to be well-represented in the legacy crash format

[...]

Fully aware this is more likely a bug in MacOS, but it only seems to be caused by using Telegram. Just putting it out here in case something changed in a recent update that could cause this, or for other users experiencing the same.

hirakujira commented 10 months ago

I think this is duplicated with #1026 & #1017

smiba commented 10 months ago

Definitely a duplicate! For some reason I searched and named the process WindowManager and got understandably no results, even through it's clearly called WindowServer in the watchdog report

smiba commented 10 months ago

(Closing because of duplicate, continuing in #1026)