View Issue Details

IDProjectCategoryView StatusLast Update
0001424OpenMPTGeneralpublic2022-06-04 07:48
Reportermanx Assigned To 
PriorityhighSeverityblockReproducibilityalways
Status confirmedResolutionopen 
Product VersionOpenMPT 1.29.01.00 / libopenmpt 0.5.0 (upgrade first) 
Target VersionOpenMPT 1.30.05.00 / libopenmpt 0.6.4 (upgrade first)Fixed in VersionOpenMPT 1.31.00.* (current testing) 
Summary0001424: OpenMPT amd64 does not work in Wine on macOS
Description

See <https://developercommunity.visualstudio.com/t/64-bit-exes-built-with-vs2019-crash-under-wine-on/1248753>.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2021-04-06 23:47

administrator   ~0004704

Related Wine bug report: https://bugs.winehq.org/show_bug.cgi?id=49802

Saga Musix

Saga Musix

2021-04-06 23:52

administrator   ~0004705

Last edited: 2021-04-07 00:09

The only usages of _beginthreadex should be in PortAudio and RtAudio. PortAudio already can use CreateThread as an alternative for WinCE, so I'm not sure why they don't use it for plain Win32. Maybe we should enforce its usage on Win32 as well. RtAudio hardcodes its _beginthreadex usage. Maybe we can enforce that component to be disabled on macOS for now. The relevant code is not compiled into OpenMPT, so RtAudio should not be a problem.

I'll verify later that these solutions work on macOS.

Edit: It doesn't, the crash still occurs. Probably caused by one of our std::threads then.

manx

manx

2021-05-15 18:03

administrator   ~0004769

Do we know if building with VS2017 works for Wine on macOS?

Saga Musix

Saga Musix

2021-05-17 10:06

administrator   ~0004772

OpenMPT 1.28 works with Wine on macOS. Compiling the latest 1.30 code with VS2017 doesn't work. See attached log. It just freezes after that.

wine.zip (658 bytes)
manx

manx

2021-05-17 11:19

administrator   ~0004773

Do we know if this is due to a breaking change in later VS2017 updates, or due to our changes? i.e. does 1.28 with current VS2017 work?

Saga Musix

Saga Musix

2021-05-17 11:23

administrator   ~0004774

Recently-compiled 1.28 still works.

manx

manx

2021-05-17 11:32

administrator   ~0004775

So we could bisect trunk from 1.28 branch point on and find the change that broke Wine on macOS. And if it is fixable with reasonable effort, we could switch 1.30 (and maybe also 1.29) builds to VS2017 as a work-around.

manx

manx

2021-12-10 18:47

administrator   ~0004947

amd64 RETRO builds targeting Windows XP do work in Wine on macOS, and will hopefully continue to do so after r16139, See <https://developercommunity.visualstudio.com/t/64-bit-exes-built-with-vs2019-crash-under-wine-on/1248753#T-N1609837>. This is far from perfect as these are not included in the intended installer package, but better than the situation before.

manx

manx

2022-06-03 11:20

administrator   ~0005194

r17389

[Fix] build: Use Windows 11 SDK 10.0.22621.0 for VS2022 builds. This SDK is included since VS2022 17.2.3. Apparently, this fixes the segment register access in the UCRT which caused OpenMPT to fail on Wine on macOS. See <https://bugs.openmpt.org/view.php?id=1424> and <https://developercommunity.visualstudio.com/t/64-bit-EXEs-built-with-VS2019-crash-unde/1248753>. As Microsoft in their infinite wisdom and incompetence again fails to provide release notes (<https://developercommunity.visualstudio.com/t/no-Release-Notes-for-Windows-11-SDK-100/10061520>), we cannot know if this SDK still supports older Windows versions. Thus, for Windows 7 and Windows 8.1, stick with an older Windows 10 SDK version for now. Microsoft is just great.

To consider back-porting to 1.30, we should at least wait until support for older Windows versions has been confirmed for this SDK version.

Issue History

Date Modified Username Field Change
2021-02-28 14:07 manx New Issue
2021-02-28 14:08 manx Status new => confirmed
2021-02-28 14:10 manx Reproducibility have not tried => always
2021-04-06 23:47 Saga Musix Note Added: 0004704
2021-04-06 23:52 Saga Musix Note Added: 0004705
2021-04-06 23:54 Saga Musix Note Edited: 0004705
2021-04-06 23:54 Saga Musix Note Edited: 0004705
2021-04-07 00:09 Saga Musix Note Edited: 0004705
2021-05-15 18:03 manx Note Added: 0004769
2021-05-17 10:06 Saga Musix Note Added: 0004772
2021-05-17 10:06 Saga Musix File Added: wine.zip
2021-05-17 11:19 manx Note Added: 0004773
2021-05-17 11:23 Saga Musix Note Added: 0004774
2021-05-17 11:32 manx Note Added: 0004775
2021-05-17 12:31 manx Product Version OpenMPT 1.30.00.* (old testing) => OpenMPT 1.29.01.00 / libopenmpt 0.5.0 (upgrade first)
2021-12-10 18:47 manx Note Added: 0004947
2022-06-03 11:20 manx Note Added: 0005194
2022-06-04 07:48 manx Fixed in Version => OpenMPT 1.31.00.* (current testing)
2022-06-04 07:48 manx Target Version OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first) => OpenMPT 1.30.05.00 / libopenmpt 0.6.4 (upgrade first)