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

Bevy crashes at startup on macOS #1507

Closed
Tracked by #1543 ...
bjorn3 opened this issue Jul 4, 2024 · 3 comments · Fixed by #1536
Closed
Tracked by #1543 ...

Bevy crashes at startup on macOS #1507

bjorn3 opened this issue Jul 4, 2024 · 3 comments · Fixed by #1536
Labels
C-bug Category: This is a bug. O-macos Operating system: MacOS

Comments

@bjorn3
Copy link
Member

bjorn3 commented Jul 4, 2024

  1. Build Bevy's breakout example using cg_clif.
  2. Run it.
  3. Crash
Process 4226 stopped
* thread #21, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
    frame #0: 0x00000001040d3c98 breakout`core::sync::atomic::atomic_load::h64d41284dd085cdc + 112
breakout`core::sync::atomic::atomic_load::h64d41284dd085cdc:
->  0x1040d3c98 <+112>: ldar   x0, [x0]
    0x1040d3c9c <+116>: add    sp, sp, #0x70
    0x1040d3ca0 <+120>: ldp    x29, x30, [sp], #0x10
    0x1040d3ca4 <+124>: ret    
Target 0: (breakout) stopped.
(lldb) bt
* thread #21, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
  * frame #0: 0x00000001040d3c98 breakout`core::sync::atomic::atomic_load::h64d41284dd085cdc + 112
    frame #1: 0x00000001040d49b8 breakout`std::sys::sync::rwlock::queue::RwLock::lock_contended::ha166ff46bab1cd71 at queue.rs:358:21
    frame #2: 0x00000001040d4ef0 breakout`std::sys::sync::rwlock::queue::RwLock::unlock_queue::h0ea5bb0bc0170131 at lib.rs:1:1
    frame #3: 0x00000001040d5424 breakout`std::sys::sync::rwlock::queue::RwLock::read_unlock_contended::h78e12589d5eef61b + 60
    frame #4: 0x0000000103efaac4 breakout`_$LT$std..sync..rwlock..RwLockReadGuard$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::h74045886ac3f976a + 196
    frame #5: 0x0000000103ef0e94 breakout`core::sync::atomic::atomic_compare_exchange_weak::h3aaee500ec783651 at atomic.rs:3384:9

The last frame shouldn't be there and the rest of the stack is missing.

cc @janhohenheim

@bjorn3 bjorn3 added C-bug Category: This is a bug. O-macos Operating system: MacOS labels Jul 4, 2024
@janhohenheim
Copy link

Note that this uses Bevy 0.14.0

@janhohenheim
Copy link

Given this crash, would you rather merge the recommendations now while saying "use cranelift for Linux" or wait until the macOS issues are resolved?

@tjamaan
Copy link
Contributor

tjamaan commented Sep 22, 2024

Issue no longer happens since PR #1536. Thanks @Noratrieb !

Tested with Bevy main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-macos Operating system: MacOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants