System Information
Please provide the following information about your system:
Operating System and version:
macOS 14.5 (23F79)
Ubuntu 24.04
Compiler:
AppleClang 15.0.0.15000309
gcc 13.2.0-23ubuntu4
CPU architecture: x86_64
Issue Description
SteamAudio on x86_64 macOS and Linux compiled to not use Intel IPP crashes during HRTF creation. This issue does not affect arm64 macOS or x86_64 Windows.
Configure output:
-- CMAKE_CXX_FLAGS:
-- Could NOT find IPP (missing: IPP_core_LIBRARY IPP_vm_LIBRARY IPP_s_LIBRARY IPP_INCLUDE_DIR)
-- Disabling IPP
-- Found PFFFT: PFFFT
-- Found MySOFA: mysofa-static
-- Found FlatBuffers: $<TARGET_FILE:flatc> (found version "23.5.26")
-- Could NOT find ISPC (missing: ISPC_EXECUTABLE) (Required is exact version "1.12")
-- Could NOT find Embree (missing: Embree_sse2_LIBRARY Embree_sse4_LIBRARY Embree_avx_LIBRARY Embree_avx2_LIBRARY Embree_lexers_LIBRARY Embree_math_LIBRARY Embree_simd_LIBRARY Embree_sys_LIBRARY Embree_tasking_LIBRARY Embree_INCLUDE_DIR) (Required is exact version "2.17")
-- Disabling Embree
Steps To Reproduce
Steps to reproduce the behavior:
Compile SteamAudio for x86_64 macOS or Linux without Intel IPP.
Compile and run the included reproducible case
See error
If you are able to provide a minimal project or minimal source code that reproduces the issue, include a link to the project/code here.
Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
#0 0x0000000104c94ab4 in ipl::float4::load(float const*) at steam-audio/core/src/core/sse_float4.h:171
#1 0x0000000104db3629 in ipl::ArrayMath::addConstant(int, float const*, float, float*) at steam-audio/core/src/core/array_math.cpp:273
#2 0x0000000104ca93ae in ipl::HRTFDatabase::decomposeToMagnitudePhase(ipl::Array<float, 3ul> const&, ipl::Array<float, 3ul>&, ipl::Array<float, 3ul>&) at steam-audio/core/src/core/hrtf_database.cpp:333
#3 0x0000000104ca833e in ipl::HRTFDatabase::HRTFDatabase(ipl::HRTFSettings const&, int, int) at steam-audio/core/src/core/hrtf_database.cpp:57
#4 0x0000000104ca9e89 in ipl::HRTFDatabase::HRTFDatabase(ipl::HRTFSettings const&, int, int) at steam-audio/core/src/core/hrtf_database.cpp:52
#5 0x0000000104d6a8a2 in std::__1::__shared_ptr_emplace<ipl::HRTFDatabase, ipl::allocator<ipl::HRTFDatabase>>::__shared_ptr_emplace[abi:ue170006]<ipl::HRTFSettings&, int&, int&>(ipl::allocator<ipl::HRTFDatabase>, ipl::HRTFSettings&, int&, int&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/shared_ptr.h:303
#6 0x0000000104d6a64d in std::__1::__shared_ptr_emplace<ipl::HRTFDatabase, ipl::allocator<ipl::HRTFDatabase>>::__shared_ptr_emplace[abi:ue170006]<ipl::HRTFSettings&, int&, int&>(ipl::allocator<ipl::HRTFDatabase>, ipl::HRTFSettings&, int&, int&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/shared_ptr.h:292
#7 0x0000000104d6a549 in std::__1::shared_ptr<ipl::HRTFDatabase> std::__1::allocate_shared[abi:ue170006]<ipl::HRTFDatabase, ipl::allocator<ipl::HRTFDatabase>, ipl::HRTFSettings&, int&, int&, void>(ipl::allocator<ipl::HRTFDatabase> const&, ipl::HRTFSettings&, int&, int&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__memory/shared_ptr.h:1023
#8 0x0000000104d69fe5 in std::__1::shared_ptr<ipl::HRTFDatabase> ipl::make_shared<ipl::HRTFDatabase, ipl::HRTFSettings&, int&, int&>(ipl::HRTFSettings&, int&, int&) at steam-audio/core/src/core/memory_allocator.h:203
#9 0x0000000104d69ebf in api::CHRTF::CHRTF(api::CContext*, _IPLAudioSettings_t*, IPLHRTFSettings*) at steam-audio/core/src/core/api_hrtf.cpp:58
#10 0x0000000104d6a08d in api::CHRTF::CHRTF(api::CContext*, _IPLAudioSettings_t*, IPLHRTFSettings*) at steam-audio/core/src/core/api_hrtf.cpp:37
#11 0x0000000104d6a2db in api::CContext::createHRTF(_IPLAudioSettings_t*, IPLHRTFSettings*, api::IHRTF**) at steam-audio/core/src/core/api_hrtf.cpp:100
#12 0x0000000104d604c8 in ::iplHRTFCreate(IPLContext, IPLAudioSettings *, IPLHRTFSettings *, IPLHRTF *) at steam-audio/core/src/core/phonon_interfaces.h:1105
I changed some of the SSE intrinsics to their non-aligned versions which enabled the macOS build to get further, so it appears to be an alignment issue.
System Information Please provide the following information about your system:
Issue Description SteamAudio on x86_64 macOS and Linux compiled to not use Intel IPP crashes during HRTF creation. This issue does not affect arm64 macOS or x86_64 Windows. Configure output:
Steps To Reproduce Steps to reproduce the behavior:
If you are able to provide a minimal project or minimal source code that reproduces the issue, include a link to the project/code here.
Stack Trace:
I changed some of the SSE intrinsics to their non-aligned versions which enabled the macOS build to get further, so it appears to be an alignment issue.