tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
83.38k stars 2.5k forks source link

[bug] [macOS] crash when start #5843

Open takkuumi opened 1 year ago

takkuumi commented 1 year ago

Describe the bug

crash when start

Reproduction

No response

Expected behavior

No response

Platform and versions

Environment › OS: Mac OS 13.1.0 X64 › Node.js: 19.3.0 › npm: 9.2.0 › pnpm: Not installed! › yarn: 3.2.1 › rustup: 1.25.1 › rustc: 1.68.0-nightly › cargo: 1.68.0-nightly › Rust toolchain: nightly-x86_64-apple-darwin

Packages › @tauri-apps/cli [NPM]: 1.2.2 › @tauri-apps/api [NPM]: 1.2.0 › tauri [RUST]: 1.2.2, › tauri-build [RUST]: 1.2.1, › tao [RUST]: 0.15.7, › wry [RUST]: 0.23.4,

App › build-type: bundle › CSP: unset › distDir: ../built › devPath: http://localhost:1234/ › framework: Vue.js › bundler: Vite

App directory structure ├─ .yarn ├─ plugins ├─ target ├─ typings ├─ node_modules ├─ built ├─ .cargo ├─ public ├─ .github ├─ src-tauri ├─ .parcel-cache ├─ .git ├─ .vscode └─ src

Stack trace

1   HIToolbox                           0x00007ff81a220726 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 102
2   HIToolbox                           0x00007ff81a2202b8 _ZN15MenuBarInstance14EnableAutoShowEv + 52
3   HIToolbox                           0x00007ff81a1c4908 SetMenuBarObscured + 408
4   HIToolbox                           0x00007ff81a1c44ca _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + 164
5   HIToolbox                           0x00007ff81a1be996 _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 252
6   HIToolbox                           0x00007ff81a186bd2 _NotifyEventLoopObservers + 153
7   HIToolbox                           0x00007ff81a1be3e6 AcquireEventFromQueue + 494
8   HIToolbox                           0x00007ff81a1ad5a4 ReceiveNextEventCommon + 725
9   HIToolbox                           0x00007ff81a1ad2b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
10  AppKit                              0x00007ff8139b4f33 _DPSNextEvent + 909
11  AppKit                              0x00007ff8139b3db4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
12  AppKit                              0x00007ff8139a63f7 -[NSApplication run] + 586

Additional context

No response

lucasfernog commented 1 year ago

We need more information. Is that the full stack trace? Did you make any changes in the Rust binary?

Also, might be worth trying Rust stable instead of nightly.

patrick91 commented 1 year ago

@lucasfernog I get this too, I think it's something related to the latest macos update, log:

/private/tmp/tauri-app ❯ pnpm tauri dev

> tauri-app@0.0.0 tauri /private/tmp/tauri-app
> tauri "dev"

     Running BeforeDevCommand (`pnpm dev`)

> tauri-app@0.0.0 dev /private/tmp/tauri-app
> vite

  VITE v4.0.4  ready in 235 ms

  ➜  Local:   http://127.0.0.1:1420/
  ➜  Network: use --host to expose
        Info Watching /private/tmp/tauri-app/src-tauri for changes...
   Compiling tauri-app v0.0.0 (/private/tmp/tauri-app/src-tauri)
    Finished dev [unoptimized + debuginfo] target(s) in 1.35s
1   HIToolbox                           0x00000001951e45c8 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120
2   HIToolbox                           0x00000001951e4188 _ZN15MenuBarInstance14EnableAutoShowEv + 60
3   HIToolbox                           0x0000000195187310 SetMenuBarObscured + 372
4   HIToolbox                           0x0000000195186ee8 _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + 172
5   HIToolbox                           0x0000000195180fcc _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 296
6   HIToolbox                           0x0000000195147cd0 _NotifyEventLoopObservers + 176
7   HIToolbox                           0x000000019518096c AcquireEventFromQueue + 432
8   HIToolbox                           0x000000019516fe0c ReceiveNextEventCommon + 712
9   HIToolbox                           0x000000019516fb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
10  AppKit                              0x000000018ed1c424 _DPSNextEvent + 632
11  AppKit                              0x000000018ed1b5b4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
12  AppKit                              0x000000018ed0f9e4 -[NSApplication run] + 464
13  tauri-app                           0x0000000100d3ab3c _ZN60_$LT$$LP$$RP$$u20$as$u20$objc..message..MessageArguments$GT$6invoke17h08deffd08596745aE + 84
14  tauri-app                           0x0000000100d3f998 _ZN4objc7message8platform15send_unverified28_$u7b$$u7b$closure$u7d$$u7d$17h7803af75862d7748E + 52
15  tauri-app                           0x0000000100d3dfac _ZN14objc_exception3try28_$u7b$$u7b$closure$u7d$$u7d$17hf399c8932cd2a0bdE + 44
16  tauri-app                           0x0000000100d3c4c4 _ZN14objc_exception10try_no_ret24try_objc_execute_closure17h1a77eb1761f7053dE + 80
17  tauri-app                           0x0000000100d4bab8 RustObjCExceptionTryCatch + 36
18  tauri-app                           0x0000000100d3b7ec _ZN14objc_exception10try_no_ret17h347e142faceadfd7E + 192
19  tauri-app                           0x0000000100d3cb70 _ZN14objc_exception3try17h50ce65bc27f4dd15E + 72
20  tauri-app                           0x0000000100d42384 _ZN4objc9exception3try17h4b57b47850e49247E + 40
21  tauri-app                           0x0000000100d3e6d8 _ZN4objc7message8platform15send_unverified17hae00989e54ed8ba2E + 136
22  tauri-app                           0x00000001005ecdb0 _ZN3tao13platform_impl8platform10event_loop18EventLoop$LT$T$GT$10run_return17h72c1daa0872c1ad9E + 1060
23  tauri-app                           0x00000001005edc34 _ZN3tao13platform_impl8platform10event_loop18EventLoop$LT$T$GT$3run17h0ade10f9ef57fc73E + 52
24  tauri-app                           0x00000001006b927c _ZN45_$LT$T$u20$as$u20$alloc..string..ToString$GT$9to_string17hc9224d9b1907e08fE + 0
25  tauri-app                           0x0000000100680508 _ZN83_$LT$tauri_runtime_wry..Wry$LT$T$GT$$u20$as$u20$tauri_runtime..Runtime$LT$T$GT$$GT$3run17h7553828792ab04aeE + 692
26  tauri-app                           0x00000001007561e4 _ZN5tauri3app12App$LT$R$GT$3run17h33984ae2f4796787E + 276
27  tauri-app                           0x0000000100756590 _ZN5tauri3app16Builder$LT$R$GT$3run17h521a08a0db90a3e0E + 232
28  tauri-app                           0x00000001008b9aa0 _ZN9tauri_app4main17h9e9afef53d72ca64E + 6996
29  tauri-app                           0x00000001006021c4 _ZN4core3ops8function6FnOnce9call_once17h07184b78b3e9f7d0E + 20
30  tauri-app                           0x00000001007c7d24 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17hbefc2ecbcc411d59E + 24
31  tauri-app                           0x0000000100705088 _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hcea787f684cb362bE + 28
32  tauri-app                           0x000000010100d0e0 _ZN3std2rt19lang_start_internal17h659a783147314d97E + 616
33  tauri-app                           0x0000000100705050 _ZN3std2rt10lang_start17hdf41d62dfbf5dc0bE + 84
34  tauri-app                           0x00000001008b9e2c main + 36
35  dyld                                0x000000018b693e50 start + 2544

this happens even on a brand new tauri app with react for me:

https://user-images.githubusercontent.com/667029/210900084-b8d075c8-bde7-45fa-8c7e-810d7fb7c3e1.mp4

sazzer commented 1 year ago

Getting this here as well. The Tauri app does seem to work, but every time it gains or loses focus I get the stack trace showing up in the console.