Tested with last version of Player nightly, Windows, in a particular PC (reported, Can't reproduce in mine).
When Player loads an OPUS melody, player crashes.
Analyzing dmp file I see it crashes when Player loads the audio in AudioResampler::Open, and then in opus_select_arch inside Opus library.
It uses Opus 1.3.1 from vcpkg.
As @fdelapena said in chat, this can be related with http://lists.xiph.org/pipermail/opus/2015-May/003020.html about crashing in non SSE4.1 compatible CPU's. I won't be able to test if that is the cause.
Fixes a case where GCC would compile SSE2 code as SSE4.1, causing a crash on non-SSE4.1 CPUs.
I don't know what CPU is the crash autor using, but when I obtain the answer I will update here.
Dump files (load with https://ci.easyrpg.org/view/Player/job/player-win32/1071/ symbols).
Player_2020-02-01-20-37-50.zip
Because the crash reason is "Invalid instruction executed" we can look at the dissamebly:
vpxor xmm0,xmm0,xmm0
This is a AVX instruction, which is supported by everythign newer than a Core2. So that's likely the reason why nobody ever noticed this. Core2 is unusable for most of todays workloads.
But I still consider this a bug, it shouldn't generate AVX instructions.
SSE4.1 is supported by the Core2. Pentium 4 does not but this CPU is really unusable today.
The problem is that opus checks if the compiler supports AVX and if yes allows it to emit AVX instructions everywhere through /arch:AVX
https://github.com/xiph/opus/blob/master/opus_functions.cmake#L160
Delete the compiled opus library and in vcpkg/ports/opus/portfile.cmake add to the vcpkg_configure_cmake function:
-DOPUS_X86_MAY_HAVE_AVX=OFF
Please tell if this works
Huh? The person with that problem gave me his PC info and it says the CPU is a Intel(R) Celeron(R) CPU J1900 @ 1.99GHz with MMX , SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, x86-64, NX, VMX.
SSE 4.1 is on the list, so I'm officially confused. However I already made a new binary with @Ghabry suggestions, but I have to wait a bit for let the person test it (I don't have a pre Core2 CPU here).
This CPU has no AVX support (as figured).
That CPU is from 2013 but has no AVX support (which exists since 2011). Good job Intel... They love disabling features in there cheaper CPUs... Forgot about this.
@elsemieni
Just an update in case you don't follow IRC:
This is problematic in general because even Pentiums from 2017 lack AVX...
To fix it you can rebuild libopus with this patch (I assume you use vcpkg):
https://github.com/microsoft/vcpkg/pull/10634
Should be fixed now. Closing.