Skip to content

gpui: Fix division by zero crash - #44151

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

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

Conversation

@rawandahmad698

@rawandahmad698 rawandahmad698 commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

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

cla-bot Bot commented Dec 4, 2025

Copy link
Copy Markdown

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

cla-bot Bot commented Dec 4, 2025

Copy link
Copy Markdown

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

cla-bot Bot commented Dec 4, 2025

Copy link
Copy Markdown

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

agu-z commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
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

cla-bot Bot commented Dec 4, 2025

Copy link
Copy Markdown

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

agu-z commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

/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

agu-z commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

/cherry-pick stable

@zed-zippy

zed-zippy Bot commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

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
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…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
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…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