SDL2 Crash in Wine-3.21

Questions about Wine on macOS.
Locked
NikitaSadkov
Newbie
Newbie
Posts: 3
Joined: Sun Feb 10, 2019 12:58 pm

SDL2 Crash in Wine-3.21

Post by NikitaSadkov »

Hi! I'm game developer and I use OSX, yet my game is for Windows, so thought it would be convenient to test it in Wine:
https://nikitasadkov.itch.io/spell-of-mastery-demo

The game okay on real hardware and in emulator, but fails in wine-3.21 (started using "wine explorer cmd"), while trying to init SDL2, with following errors:

Code: Select all

0031:fixme:win:EnumDisplayDevicesW ((null),0,0x21b3ed80,0x00000000), stub!
0031:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x21b3ed80,0x00000000), stub!
0031:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x21b3e8a0,0x00000000), stub!
0031:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x21b3ed80,0x00000000), stub!
0031:fixme:win:EnumDisplayDevicesW ((null),1,0x21b3ed80,0x00000000), stub!
0031:fixme:win:EnumDisplayDevicesW ((null),0,0x21b3ed80,0x00000000), stub!
0031:fixme:win:EnumDisplayDevicesW ((null),1,0x21b3ed80,0x00000000), stub!
0009:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14a3f0 (0x618ae8)
0009:fixme:shell:IShellBrowser_fnOnViewWindowActive stub, 0x14a3f0 (0x618ae8)
0009:fixme:exec:SHELL_execute flags ignored: 0x0000000c
003a:fixme:win:EnumDisplayDevicesW ((null),0,0x21b3ed80,0x00000000), stub!
003a:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x21b3ed80,0x00000000), stub!
003a:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x21b3e8a0,0x00000000), stub!
003a:fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x21b3ed80,0x00000000), stub!
003a:fixme:win:EnumDisplayDevicesW ((null),1,0x21b3ed80,0x00000000), stub!
003a:fixme:win:EnumDisplayDevicesW ((null),0,0x21b3ed80,0x00000000), stub!
003a:fixme:win:EnumDisplayDevicesW ((null),1,0x21b3ed80,0x00000000), stub!
003a:fixme:seh:call_stack_handlers calling personality routine in system library not supported yet
003a:fixme:seh:call_stack_handlers calling personality routine in system library not supported yet
003a:fixme:seh:call_stack_handlers calling personality routine in system library not supported yet
Is it just me or SDL2 isn't supposed to work in Wine?

Thanks!!!!
NikitaSadkov
Newbie
Newbie
Posts: 3
Joined: Sun Feb 10, 2019 12:58 pm

Re: SDL2 Crash in Wine-3.21

Post by NikitaSadkov »

winecfg says it is Windows 7. The emulator runs Windows 7 too. The program is 64bit only. I’ve also tested it with Windows 10 running on real hardware, no problems either. But Wine just doesn’t want to run SDL games. I remember having troubles running SDL games by other people too under Wine in Linux.

Before crashing, it also produces a nasty sound, like if you cat some random file to /dev/snd
And sometimes also gives errors like
mastery.exe(10573,0xb0004000) malloc: *** error for object 0x40513e18: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
on the SDL init stage.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: SDL2 Crash in Wine-3.21

Post by Gcenx »

The problem here is with the files you're providing.

I installed faudio using winetricks and your game launched. I then tried again using a clean prefix but just replaced the provided SDL2.dll with the 64Bit version from faudio and the game started.
NikitaSadkov
Newbie
Newbie
Posts: 3
Joined: Sun Feb 10, 2019 12:58 pm

Re: SDL2 Crash in Wine-3.21

Post by NikitaSadkov »

Gcenx wrote:The problem here is with the files you're providing.

I installed faudio using winetricks and your game launched. I then tried again using a clean prefix but just replaced the provided SDL2.dll with the 64Bit version from faudio and the game started.
Yeah. I know I'm using older SDL2, but why real Windows 7 has no problems running it?
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: SDL2 Crash in Wine-3.21

Post by Gcenx »

NikitaSadkov wrote:
Gcenx wrote:The problem here is with the files you're providing.

I installed faudio using winetricks and your game launched. I then tried again using a clean prefix but just replaced the provided SDL2.dll with the 64Bit version from faudio and the game started.
Yeah. I know I'm using older SDL2, but why real Windows 7 has no problems running it?
No idea.
Stranger still is I can launch it correctly if I use my own cross-compile wine but not the winehq compile :?

So I'm going to guess the problem here is related debian stretch and OSX10.8SDK since that's what the Winehq cross-compile setup was using last I checked.

Where I'm using native macOS libs along with the OSX10.11SDK.
Locked