winit icon indicating copy to clipboard operation
winit copied to clipboard

Multiple "error finding potential wrapper bundle for node, kLSNotAnApplicationErr: Item needs to be an application, but is not" when running trivial winit app under lldb on macOS

Open chamons opened this issue 3 years ago • 3 comments

When running a trivial winit application on macOS (12.2.1, Apple M1 Pro) I get these warnings from lldb (and thus vscode):

2022-09-11 15:50:36.301182-0500 winit_bug[77727:9970253] [default] error finding potential wrapper bundle for node <FSNode 0x100515600> { isDir = ?, path = '/Users/donblas/tmp/winit_bug/target/debug' }: Error Domain=NSOSStatusErrorDomain Code=-10811 "kLSNotAnApplicationErr: Item needs to be an application, but is not" UserInfo={_LSLine=1579, _LSFunction=wrapperBundleNodeForWrappedNode}
2022-09-11 15:50:36.301229-0500 winit_bug[77727:9970253] [default] error finding potential wrapper bundle for node <FSNode 0x100515600> { isDir = ?, path = '/Users/donblas/tmp/winit_bug/target/debug' }: Error Domain=NSOSStatusErrorDomain Code=-10811 "kLSNotAnApplicationErr: Item needs to be an application, but is not" UserInfo={_LSLine=1579, _LSFunction=wrapperBundleNodeForWrappedNode}
2022-09-11 15:50:36.301247-0500 winit_bug[77727:9970253] [default] error finding potential wrapper bundle for node <FSNode 0x100515600> { isDir = ?, path = '/Users/donblas/tmp/winit_bug/target/debug' }: Error Domain=NSOSStatusErrorDomain Code=-10811 "kLSNotAnApplicationErr: Item needs to be an application, but is not" UserInfo={_LSLine=1579, _LSFunction=wrapperBundleNodeForWrappedNode}

Steps to Reproduce

  1. Create a new rust project.
  2. Add winit = "0.27.3"
  3. Add this to main: let _ = winit::event_loop::EventLoop::new();
  4. cargo build
  5. lldb target/debug/winit_bug(replace with your project name
  6. r (to run from lldb)

chamons avatar Sep 11 '22 20:09 chamons

Doing some digging, it appears here:

https://github.com/rust-windowing/winit/blob/master/src/platform_impl/macos/event_loop.rs#L145-L150

chamons avatar Sep 11 '22 21:09 chamons

The warning appears harmless so far, but bundling the test with cargo-bundle appeared to make it go away. So not sure if this is a bug, a documentation request, or what.

chamons avatar Sep 11 '22 21:09 chamons

I'm unsure, though probably unlikely to be something we can solve (since winit can't really do bundling). Documentation directing users to cargo-bundle or likewise would be nice though

madsmtm avatar Sep 11 '22 23:09 madsmtm