Skip to content

[Bug]: Crash on system resume/lock: Maximum call stack size exceeded in BrowserWindow.emit #1782

@Alex-ChanHC

Description

@Alex-ChanHC

Version

  • I'm using version 1.21.0

Known issues

  • I've checked Known issues

Existing issues

  • I've checked Existing issues

Advanced Preferences

  • I've checked Advanced Preferences

What operating system are you using?

Windows

Operating System Version

Windows 11 Home 25H2

Reproduction steps

Reproduction steps

  1. Start Stretchly.
  2. Lock computer
  3. Resume/unlock.
  4. Stretchly attempts to resume breaks and then crashes.

details please refer to log output below

Reproduces how often:
happens when locking/unlocking or resuming from suspend.

Expected Behavior

Stretchly should resume breaks normally after system unlock/suspend without crashing.

Actual Behavior

Stretchly crashes with repeated RangeError: Maximum call stack size exceeded errors. The log shows recursive calls at main.js:210 involving BrowserWindow.emit.

Relevant log output

[2026-05-17 23:37:26.269] [info]  System: suspend or lock
[2026-05-17 23:37:26.287] [info]  Stretchly: finishing Mini break (shouldPlanNext: true)
[2026-05-17 23:37:26.311] [info]  Stretchly: pausing breaks for 1ms
[2026-05-17 23:37:49.706] [info]  System: suspend or lock
[2026-05-17 23:40:36.792] [info]  Stretchly: not pausing for suspendOrLock because paused already
[2026-05-17 23:40:36.808] [info]  System: resume or unlock
[2026-05-17 23:40:36.822] [info]  Stretchly: resuming breaks
[2026-05-17 23:40:40.028] [info]  System: resume or unlock
[2026-05-17 23:40:48.863] [error] RangeError: Maximum call stack size exceeded
    at BrowserWindow.emit (node:events:509:28)
    at EventEmitter.<anonymous> (file:///.../stretchly/resources/app.asar/app/main.js:210:9)
    at EventEmitter.emit (node:events:509:28)
    at EventEmitter.<anonymous> (file:///.../stretchly/resources/app.asar/app/main.js:210:9)
    ...
(repeated many times)

Preferences

Additional information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions