dotnet/Silk.NET

sdl2 crash in macos arm64

Coloryr opened this issue · 10 comments

Summary

sdl2 crash in macos arm64

var sdl = Sdl.GetApi();

Steps to reproduce

  • Platform: Desktop
  • Framework Version: .NET8
  • API: SDL2
  • API Version: SDL2

Comments

2024-09-16.13-41-53.mov

Hi. We don’t support MAUI at this time, only .NET Android without MAUI. In addition, there’s not enough information on this issue to suggest anything other than following the Android example we have in the repo if you do want to pursue this.

this is avalonia not maui. and this desktop application

Ah ok. We don’t support Avalonia at all at this time, at least for SDL.

So it never work in macos arm64?
I saw #2174 and #2173, it maybe work

By all means give it a go but Avalonia is not a scenario we support for SDL. I also have no idea what your error was, given that you did not include any details such as an exception or stack trace, so I did my best to identify the issue with the information provided.

Just crash went

var sdl = Sdl.GetApi();

not log and any info with osx-arm64 build.
But use osx-x64 build it's work by Rosetta.
I only see the SDL2 library in the runtimes/osx/native/ folder, can this library be used on x64 and arm64?
maybe like this libsdl-org/SDL#8696

Yes this library can be used on macOS arm64, that’s my daily driver. I advise making a brand new project and copying the code from an example in the repo to see whether known-good code works. If it does, then it’s likely a problem with your specific scenario.

Ok, I will try it out on the weekend.

Nope it just crash on consoleapp

yes, it's SDL arch issues, I replaced the sdl library built with arm64 and it work now.