[bug] Fresh Tauri 2 project crashes on `npm run tauri dev` (Intel macOS)
Opened this issue · 0 comments
sunshinewithmoonlight commented
Describe the bug
A fresh Tauri project created with npm create tauri-app@latest
crashes immediately when running npm run tauri dev
on macOS. The crash occurs with a segmentation fault in the ImageIO/AppKit layer.
Reproduction
- Create a new project:
npm create tauri-app@latest
- Navigate to project directory and run:
npm run tauri dev
- Application crashes immediately with a segmentation fault
Expected behavior
- The development server should start successfully
- The application window should open without crashing
Full tauri info
output
> demo@0.1.0 tauri
> tauri info
[✔] Environment
- OS: Mac OS 14.5.0 x86_64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.82.0 (f6e511eec 2024-10-15)
✔ cargo: 1.82.0 (8f40fc59f 2024-08-21)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-x86_64-apple-darwin (default)
- node: 20.12.2
- npm: 10.9.2
[-] Packages
- tauri 🦀: 2.1.1
- tauri-build 🦀: 2.0.3
- wry 🦀: 0.47.2
- tao 🦀: 0.30.8
- tauri-cli 🦀: 2.1.0
- @tauri-apps/api : 2.1.1
- @tauri-apps/cli : 2.1.0
[-] Plugins
- tauri-plugin-shell 🦀: 2.0.2
- @tauri-apps/plugin-shell : 2.0.1
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: Vue.js
- bundler: Vite
Stack trace
Thread 0 Crashed:: main Dispatch queue: com.apple.main-thread
0 ??? 0xbad4007 ???
1 ImageIO PNGReadPlugin::InitializePluginData(IIOImageReadSession, IIODictionary, IIODictionary, CGImageMetadata, CGColorSpace, ReadPluginData&, PNGPluginData&, _CFDictionary) + 883
2 ImageIO PNGReadPlugin::initialize(IIODictionary) + 62
3 ImageIO IIOReadPlugin::callInitialize() + 550
4 ImageIO IIO_Reader::initImageAtOffset(CGImagePlugin, unsigned long, unsigned long, unsigned long) + 84
5 ImageIO IIOImageSource::makeImagePlus(unsigned long, IIODictionary) + 709
6 ImageIO IIOImageSource::getPropertiesAtIndexInternal(unsigned long, IIODictionary) + 49
7 ImageIO IIOImageSource::copyPropertiesAtIndex(unsigned long, IIODictionary) + 16
8 ImageIO CGImageSourceCopyPropertiesAtIndex + 332
9 AppKit ImageSourceOptionsForCGImageSource_index_ + 53
10 AppKit +[NSBitmapImageRep imagesWithData:hfsFileType:extension:zone:expandImageContentNow:includeAllReps:] + 421
11 AppKit +[NSBitmapImageRep imageRepsWithData:] + 69
12 AppKit -[NSImage initWithData:] + 93
13 base $LT$$LP$A$C$$RP$$u20$as$u20$objc2..encode..EncodeArguments$GT$::invoke::h46bab79a9d0f612e + 67
14 base objc2::runtime::message_receiver::msg_send_primitive::send::h1653ce0c372d0797 + 55
15 base tauri::app::on_event_loop_event::hedde69c4bf060b8e + 1952
16 base tauri::app::App$LT$R$GT$::run::$u7b$$u7b$closure$u7d$$u7d$::h32b7f4ce21041e1d + 858
17 base tauri_runtime_wry::handle_event_loop::hc02437d7aa3fc6c5 + 1238
18 base base::main::hf49a2e47de30fc77 + 9 (main.rs:5)