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

Crash when running on macOS with "My Mac (Desinged for iPad) #2262

Closed
maxammann opened this issue Apr 23, 2022 · 1 comment
Closed

Crash when running on macOS with "My Mac (Desinged for iPad) #2262

maxammann opened this issue Apr 23, 2022 · 1 comment
Labels
B - bug Dang, that shouldn't have happened DS - ios H - help wanted Someone please save us

Comments

@maxammann
Copy link

XCode has a special mode for iOS projects which lets you run apps iOS on macOS. When targeting this destination in XCode the app crashs in the event loop:

2022-04-23 11:56:12.464040+0200 example[97556:577789] [example] copy_read_only: vm_copy failed: status 1.
2022-04-23 11:56:12.486575+0200 example[97556:577789] [default] capability properties: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.492293+0200 example[97556:577789] [default] LSPrefs: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.493021+0200 example[97556:577789] Metal GPU Frame Capture Enabled
2022-04-23 11:56:12.493135+0200 example[97556:577789] Metal API Validation Enabled
[2022-04-23T09:56:12Z INFO  wgpu_core::instance] Adapter Metal AdapterInfo { name: "Apple M1", vendor: 0, device: 0, device_type: IntegratedGpu, backend: Metal }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] configuring surface with SurfaceConfiguration { usage: RENDER_ATTACHMENT, format: Bgra8UnormSrgb, width: 1440, height: 900, present_mode: Fifo }
[2022-04-23T09:56:12Z INFO  wgpu_hal::metal::surface] build swapchain SurfaceConfiguration { swap_chain_size: 3, present_mode: Fifo, composite_alpha_mode: Opaque, format: Bgra8UnormSrgb, extent: Extent3d { width: 1440, height: 900, depth_or_array_layers: 1 }, usage: COLOR_TARGET }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created buffer Valid((0, 1, Metal)) with BufferDescriptor { label: None, size: 33554432, usage: COPY_DST | VERTEX, mapped_at_creation: false }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created buffer Valid((1, 1, Metal)) with BufferDescriptor { label: None, size: 33554432, usage: COPY_DST | VERTEX, mapped_at_creation: false }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created buffer Valid((2, 1, Metal)) with BufferDescriptor { label: None, size: 33554432, usage: COPY_DST | INDEX, mapped_at_creation: false }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created buffer Valid((3, 1, Metal)) with BufferDescriptor { label: None, size: 4096, usage: COPY_DST | VERTEX, mapped_at_creation: false }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created buffer Valid((4, 1, Metal)) with BufferDescriptor { label: Some("Layer Metadata ubo"), size: 98304, usage: COPY_DST | VERTEX, mapped_at_creation: false }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created buffer Valid((5, 1, Metal)) with BufferDescriptor { label: Some("Globals ubo"), size: 80, usage: COPY_DST | UNIFORM, mapped_at_creation: false }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created texture Valid((0, 1, Metal)) with TextureDescriptor { label: Some("Depth texture"), size: Extent3d { width: 1440, height: 900, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 4, dimension: D2, format: Depth24PlusStencil8, usage: RENDER_ATTACHMENT }
[2022-04-23T09:56:12Z INFO  wgpu_core::device] Created texture Valid((1, 1, Metal)) with TextureDescriptor { label: Some("Multisampled frame descriptor"), size: Extent3d { width: 1440, height: 900, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 4, dimension: D2, format: Bgra8UnormSrgb, usage: RENDER_ATTACHMENT }
2022-04-23 11:56:12.537171+0200 example[97556:578275] [default] capability properties: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.546343+0200 example[97556:577789] [default] capability properties: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.552312+0200 example[97556:577789] [default] LSPrefs: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.558417+0200 example[97556:577789] [default] capability properties: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.564381+0200 example[97556:577789] [default] LSPrefs: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.570483+0200 example[97556:577789] [default] capability properties: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
2022-04-23 11:56:12.577245+0200 example[97556:577789] [default] LSPrefs: could not find untranslocated node for <FSNode 0x6000029e48c0> { isDir = ?, path = '/private/var/folders/1b/3_hwyq796_l6_5ms_6jyktnm0000gn/X/EA68C82C-51B0-50B2-AE73-C6B760858396/d/Wrapper/example.app' }, proceeding on the assumption it is not translocated: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
thread '<unnamed>' panicked at 'not implemented', /Users/ehrenamtskarte/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.1/src/platform_impl/ios/event_loop.rs:242:39
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
libc++abi: terminating with uncaught foreign exception
terminating with uncaught foreign exception

Here is a lldb backtrace:

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x000000019d1fcdb8 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x000000010567ee84 libsystem_pthread.dylib`pthread_kill + 288
    frame #2: 0x000000019d16c340 libsystem_c.dylib`abort + 168
    frame #3: 0x000000019d1ecb08 libc++abi.dylib`abort_message + 132
    frame #4: 0x000000019d1dc884 libc++abi.dylib`demangling_terminate_handler() + 132
    frame #5: 0x000000019d1ebea4 libc++abi.dylib`std::__terminate(void (*)()) + 20
    frame #6: 0x000000019d1ebe2c libc++abi.dylib`std::terminate() + 44
    frame #7: 0x000000019d1eeec0 libc++abi.dylib`__cxa_rethrow + 152
    frame #8: 0x000000019d0decb0 libobjc.A.dylib`objc_exception_rethrow + 44
    frame #9: 0x000000019fe4c63c AppKit`-[NSApplication run] + 672
    frame #10: 0x000000019fe1dd08 AppKit`NSApplicationMain + 1132
    frame #11: 0x00000001a00f3dd0 AppKit`_NSApplicationMainWithInfoDictionary + 24
    frame #12: 0x00000001b2b7ea7c UIKitMacHelper`UINSApplicationMain + 1276
    frame #13: 0x00000001c52199f8 UIKitCore`UIApplicationMain + 164
  * frame #14: 0x000000010111f1e0 example`winit::platform_impl::platform::event_loop::EventLoop$LT$T$GT$::run::hd76983324db2c4fa(self=EventLoop<()> @ 0x000000016eecd630, event_handler={closure_env#0} @ 0x000000016eecd658) at event_loop.rs:120:13
    frame #15: 0x0000000101174d34 example`winit::event_loop::EventLoop$LT$T$GT$::run::h10defa8f4c1aa8da(self=<unavailable>, event_handler=<unavailable>) at event_loop.rs:154:9
    frame #16: 0x000000010118b230 example`maplibre::winit::_$LT$impl$u20$maplibre..map_state..Runnable$LT$winit..event_loop..EventLoop$LT$$LP$$RP$$GT$$GT$$u20$for$u20$maplibre..map_state..MapState$LT$winit..window..Window$GT$$GT$::run::h2073a06255e497d5(self=MapState<winit::window::Window> @ 0x000000016eece6f0, event_loop=EventLoop<()> @ 0x000000016eecece0, max_frames=Option<u64> @ 0x000000016eece680) at winit.rs:25:9
    frame #17: 0x0000000100f3a348 example`maplibre::Map$LT$W$C$E$GT$::run_with_optionally_max_frames::hf566462469b6c8a5(self=Map<winit::window::Window, winit::event_loop::EventLoop<()>> @ 0x000000016eeced88, max_frames=Option<u64> @ 0x000000016eeced00) at lib.rs:46:9
    frame #18: 0x0000000100f3abc0 example`maplibre::UninitializedMap$LT$W$C$E$GT$::run_sync_with_optionally_max_frames::_$u7b$$u7b$closure$u7d$$u7d$::h88179b499cbd459d((null)=ResumeTy @ 0x000000016eed06f8) at lib.rs:103:17
    frame #19: 0x0000000100f34858 example`_$LT$core..future..from_generator..GenFuture$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h1d06a7d9b2de31b1(self=Pin<&mut core::future::from_generator::GenFuture<maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<winit::window::Window, winit::event_loop::EventLoop<()>>>> @ 0x000000016eed0770, cx=0x000000016eed0a08) at mod.rs:84:19
    frame #20: 0x0000000100f3df30 example`tokio::park::thread::CachedParkThread::block_on::_$u7b$$u7b$closure$u7d$$u7d$::hfe7af0bd1d868424 at thread.rs:263:54
    frame #21: 0x0000000100f334dc example`tokio::coop::with_budget::_$u7b$$u7b$closure$u7d$$u7d$::h432dc820e1efcb1f(cell=0x00006000032a8f68) at coop.rs:102:9
    frame #22: 0x0000000100f39d7c example`std::thread::local::LocalKey$LT$T$GT$::try_with::h4c6ce7ec7c103413(self=0x0000000102794f68, f={closure_env#0}<core::task::poll::Poll<()>, tokio::park::thread::{impl#5}::block_on::{closure_env#0}<core::future::from_generator::GenFuture<maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<winit::window::Window, winit::event_loop::EventLoop<()>>>>> @ 0x000000016eed0920) at local.rs:413:16
    frame #23: 0x0000000100f39c00 example`std::thread::local::LocalKey$LT$T$GT$::with::h8aad5cd2a867a0e3(self=0x0000000102794f68, f=<unavailable>) at local.rs:389:9
    frame #24: 0x0000000100f3d9ec example`tokio::park::thread::CachedParkThread::block_on::h466c6f94b2381095 [inlined] tokio::coop::with_budget::h59c7f0d433e4d437(budget=(__0 = core::option::Option<> @ 0x000000016eed0ebe), f={closure_env#0}<core::future::from_generator::GenFuture<maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<winit::window::Window, winit::event_loop::EventLoop<()>>>> @ 0x000000016eed0ec0) at coop.rs:95:5
    frame #25: 0x0000000100f3d9cc example`tokio::park::thread::CachedParkThread::block_on::h466c6f94b2381095 [inlined] tokio::coop::budget::h405f6c130e9da668(f={closure_env#0}<core::future::from_generator::GenFuture<maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<winit::window::Window, winit::event_loop::EventLoop<()>>>> @ 0x000000016eed0e80) at coop.rs:72:5
    frame #26: 0x0000000100f3d97c example`tokio::park::thread::CachedParkThread::block_on::h466c6f94b2381095(self=0x000000016eed0f27, f=(__0 = maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<> @ 0x000000016eed0f28)) at thread.rs:263:31
    frame #27: 0x0000000100f34138 example`tokio::runtime::enter::Enter::block_on::h82cc9f2edd55ba13(self=0x000000016eed13a7, f=(__0 = maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<> @ 0x000000016eed13a8)) at enter.rs:151:13
    frame #28: 0x0000000100f3d6ec example`tokio::runtime::thread_pool::ThreadPool::block_on::h9f1011c5599b4463(self=0x000000016eed2130, future=(__0 = maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<> @ 0x000000016eed1c78)) at mod.rs:73:9
    frame #29: 0x0000000100f35f14 example`tokio::runtime::Runtime::block_on::he3b65f184b0aed38(self=0x000000016eed2128, future=(__0 = maplibre::{impl#2}::run_sync_with_optionally_max_frames::{async_block_env#1}<> @ 0x000000016eed2328)) at mod.rs:477:43
    frame #30: 0x0000000100f3a8f0 example`maplibre::UninitializedMap$LT$W$C$E$GT$::run_sync_with_optionally_max_frames::h3e77dad286407c9f(self=UninitializedMap<winit::window::Window, winit::event_loop::EventLoop<()>> @ 0x000000016eed2ba0, max_frames=Option<u64> @ 0x000000016eed2118) at lib.rs:92:9
    frame #31: 0x0000000100f3a7b4 example`maplibre::UninitializedMap$LT$W$C$E$GT$::run_sync::h0c2785ac12a47a07(self=<unavailable>) at lib.rs:84:9
    frame #32: 0x0000000100f398ac example`maplibre_apple_main at lib.rs:13:5
    frame #33: 0x0000000100f33304 example`static MapLibre.start(self=0x00000001028a80c8) at maplibre.swift:3:9
    frame #34: 0x0000000100f3329c example`static App.main(self=example.App) at exampleApp.swift:7:29
    frame #35: 0x0000000100f332b4 example`static App.$main(self=example.App) at exampleApp.swift:4:1
    frame #36: 0x0000000100f332cc example`main at exampleApp.swift:0
    frame #37: 0x00000001054cd088 dyld`start + 516

winit: 0.26.1

@madsmtm
Copy link
Member

madsmtm commented Jun 24, 2024

This was fixed in #2480.

@madsmtm madsmtm closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - ios H - help wanted Someone please save us
Development

No branches or pull requests

2 participants