Skip to content

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

Description

@zhaop

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WindowingPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorO-MacOSSpecific to the MacOS (Apple) desktop operating systemS-BlockedThis cannot move forward until something else changes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions