Skip to content

gpui: Fix division by zero crash#44151

Merged
agu-z merged 1 commit intozed-industries:mainfrom
rawandahmad698:main
Dec 4, 2025
Merged

gpui: Fix division by zero crash#44151
agu-z merged 1 commit intozed-industries:mainfrom
rawandahmad698:main

Conversation

@rawandahmad698
Copy link
Contributor

@rawandahmad698 rawandahmad698 commented Dec 4, 2025

Closes #44148

the existing rate == 0 check inside the timer callback already handles disabling repeat - it just drops the timer immediately. So the fix prevents the crash while preserving correct behavior. This is my first contribution, so if it is not the right solution all feedback is appreciated

Release Notes:

  • Linux (Wayland): Fixed a crash that could occur when characters_per_second was zero

@cla-bot
Copy link

cla-bot bot commented Dec 4, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @rawandahmad698 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

1 similar comment
@cla-bot
Copy link

cla-bot bot commented Dec 4, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @rawandahmad698 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link

cla-bot bot commented Dec 4, 2025

The cla-bot has been summoned, and re-checked this pull request!

@rawandahmad698 rawandahmad698 changed the title feat: fix division by zero crash (#44148) Fix division by zero crash (#44148) Dec 4, 2025
@maxdeviant maxdeviant changed the title Fix division by zero crash (#44148) Fix division by zero crash Dec 4, 2025
@maxdeviant maxdeviant changed the title Fix division by zero crash gpui: Fix division by zero crash Dec 4, 2025
@agu-z
Copy link
Contributor

agu-z commented Dec 4, 2025

@rawandahmad698 Thank you for your contribution! Have you signed the CLA by clicking "I agree with Zed's CLA" at the bottom of https://zed.dev/cla?

@rawandahmad698
Copy link
Contributor Author

@rawandahmad698 Thank you for your contribution! Have you signed the CLA by clicking "I agree with Zed's CLA" at the bottom of https://zed.dev/cla?

Appreciate it. I have now.

@rawandahmad698
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 4, 2025
@cla-bot
Copy link

cla-bot bot commented Dec 4, 2025

The cla-bot has been summoned, and re-checked this pull request!

@agu-z agu-z merged commit 2dad46c into zed-industries:main Dec 4, 2025
29 checks passed
@agu-z
Copy link
Contributor

agu-z commented Dec 4, 2025

/cherry-pick preview

github-actions bot pushed a commit that referenced this pull request Dec 4, 2025
Closes #44148

the existing rate == 0 check inside the timer callback already handles
disabling repeat - it just drops the timer immediately. So the fix
prevents the crash while preserving correct behavior. 

Release Notes:

- Linux (Wayland): Fixed a crash that could occur when
`characters_per_second` was zero
@agu-z
Copy link
Contributor

agu-z commented Dec 4, 2025

/cherry-pick stable

@zed-zippy
Copy link
Contributor

zed-zippy bot commented Dec 4, 2025

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/19932435081

zed-zippy bot added a commit that referenced this pull request Dec 4, 2025
…erry-pick to preview) (#44154)

Cherry-pick of #44151 to preview

----
Closes #44148

the existing rate == 0 check inside the timer callback already handles
disabling repeat - it just drops the timer immediately. So the fix
prevents the crash while preserving correct behavior. 

Release Notes:

- Linux (Wayland): Fixed a crash that could occur when
`characters_per_second` was zero

Co-authored-by: Rawand Ahmed Shaswar <rawandahmad698@gmail.com>
AlpSha pushed a commit to AlpSha/zed that referenced this pull request Dec 5, 2025
…ies#44151)

Closes zed-industries#44148

the existing rate == 0 check inside the timer callback already handles
disabling repeat - it just drops the timer immediately. So the fix
prevents the crash while preserving correct behavior. 

Release Notes:

- Linux (Wayland): Fixed a crash that could occur when
`characters_per_second` was zero
CherryWorm pushed a commit to CherryWorm/zed that referenced this pull request Dec 16, 2025
…ies#44151)

Closes zed-industries#44148

the existing rate == 0 check inside the timer callback already handles
disabling repeat - it just drops the timer immediately. So the fix
prevents the crash while preserving correct behavior. 

Release Notes:

- Linux (Wayland): Fixed a crash that could occur when
`characters_per_second` was zero
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
…ies#44151)

Closes zed-industries#44148

the existing rate == 0 check inside the timer callback already handles
disabling repeat - it just drops the timer immediately. So the fix
prevents the crash while preserving correct behavior. 

Release Notes:

- Linux (Wayland): Fixed a crash that could occur when
`characters_per_second` was zero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zed crash in master branch

2 participants