Re: macOS Metal Issue - App Crashes Immediately
Henry M <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
VZ> Does this happen only with the universal builds or with just arm64 one too? I'm on an x86_64 Mac, but it happens with the universal builds as well as the x86_64 build I tried your advice (reducing my application code until the issue disappears) by commenting out a large chunk of the GUI setup code, and my app ran without crashing. However, clicking on any button or menu item causes the same Metal-related crash. I did more experiments with the environment—I tried downgrading to the MacOS 13.1 SDK, but that didn't fix it. I tried downloading Xcode 14, but Xcode 14 won't run on macOS 14. So I made a bootable USB with macOS 13 and Xcode 14, and the app runs perfectly using the exact same Xcode project. I then exported the build commands from both Xcode 15 and Xcode 14 and did a git diff on them. There are numerous differences. I can post both files somewhere if anyone wants to see them. Anyways, I'm currently circumventing the problem by using a bash script made up of all the Xcode 14 build commands. Conclusion: I think the problem is the interaction between wxWidgets and Xcode 15. On Friday, March 15, 2024 at 12:00:38 PM UTC-7 Vadim Zeitlin wrote: > On Fri, 15 Mar 2024 09:43:38 -0700 (PDT) Henry M wrote: > > HM> I have no issues building and running my wxWidgets project with Xcode > 14 on > HM> macOS 12.7. However, when building it and running it with Xcode 15 on > macOS > HM> 14.4, the app crashes once it gets to this line: > wxIMPLEMENT_APP(myApp); > > Sorry, I don't have Xcode 15 yet, so I can't test this and all I can say > is that "this line" is the application entry point, so it doesn't really > say much. Also, the crash doesn't happen in the main thread. > > HM> I first thought the crash was due to an outdated wxWidgets build, so I > HM> rebuilt it with the following commands, but that didn't fix it. > HM> > HM> git clone --recurse-submodules > HM> https://github.com/wxWidgets/wxWidgets.git ./configure > --disable-sys-libs > HM> --enable-macosx_arch=x86_64,arm64 make -j5 > > Does this happen only with the universal builds or with just arm64 one > too? > > HM> The stack trace shows that the crash comes from an instruction in > HM> MTLInputStageReflectionReader::deserialize(id<MTLDeviceSPI>, > HM> NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>) (), which is > is a > HM> Metal library. > HM> > HM> Does anyone have any ideas where I should start looking to fix this > issue? > > As wx doesn't Metal at all, it's really difficult to say, unfortunately. > > HM> Also, I should mention that on the newer Mac, I'm able to build (from > the > HM> command line) all the wxWidgets OpenGL samples and the wxWidgets > minimal > HM> sample and run them without issue. > > The usual advice is to start bisecting the problem, i.e. reduce your > application code, by disabling parts of it, until the issue disappears. > > Good luck, > VZ > > -- > TT-Solutions: wxWidgets consultancy and technical support > https://www.tt-solutions.com/ > -- Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/73056fa1-b665-46a4-a298-d843e6c4929fn%40googlegroups.com.