Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lldb hangs 1-2s whenever I press Ctrl+key or Cmd+key for the first time on Mac (since winit v0.30) #14010

Open
zhaop opened this issue Jun 25, 2024 · 1 comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system S-Blocked This cannot move forward until something else changes

Comments

@zhaop
Copy link

zhaop commented Jun 25, 2024

Bevy version

Present on v0.14.0-rc.3, not present on v0.13.2. I've bissected this to commit 061bee7, which fixes #13366 "fix: upgrade to winit v0.30".

[Optional] Relevant system information

Mac M1 Sonoma

What you did

When I debug my app via vscode (which uses lldb), I noticed that the first time I press Ctrl+key or Cmd+key, my app always hangs for 1-2 seconds: the window does not respond, and the Bevy main loop hangs during this time. (Things like .just_pressed are also broken -- the key eventually gets "pressed" without ever triggering "just_pressed")

Things run normally

  • on subsequent shortcut presses
  • or when I run my app without debugging.

What went wrong

I was expecting the app not to hang when I press shortcuts.

Additional information

I used this to reproduce the bug:

cargo build --example empty_defaults && lldb -o run target/debug/examples/empty_defaults

This builds the empty defaults example (a simple empty window) and runs it with the lldb debugger. As soon as the window appears, I press a random Ctrl+key shortcut, e.g. Ctrl+L, and the following happens:

  • Starting from 061bee7: I see lldb loading some Apple-specific symbol tables for 1-2 seconds, and the window hangs during this time
  • Before 061bee7: lldb does not do the symbol table loading, and the app continues running without a hitch

I've bisected into winit, and this issue seems to have been introduced in rust-windowing/winit#3231 , which adds the "Services menu" feature to the app on Mac.

@zhaop
Copy link
Author

zhaop commented Jun 25, 2024

Opened related winit issue rust-windowing/winit#3760

@alice-i-cecile alice-i-cecile added A-Windowing Platform-agnostic interface layer to run your app in S-Blocked This cannot move forward until something else changes O-MacOS Specific to the MacOS (Apple) desktop operating system A-Input Player input via keyboard, mouse, gamepad, and more and removed S-Needs-Triage This issue needs to be labelled A-Input Player input via keyboard, mouse, gamepad, and more labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system S-Blocked This cannot move forward until something else changes
Projects
None yet
Development

No branches or pull requests

2 participants