source-engine icon indicating copy to clipboard operation
source-engine copied to clipboard

[Windows] Soundscapes are crashing the game.

Open steadyfield opened this issue 2 years ago • 5 comments

The soundscapes are crashing the game. A temporary workaround is to open the soundscapes list file hl2\scripts\soundscapes_manifest.txt, and empty the list. Then the game won't crash. Of course the sound effects will gone.

engine.dll!PSET_GetNextN(pset_t * ppset, portable_samplepair_t * pbuffer, int SampleCount, int op) Line 5555 C++ engine.dll!DSP_ProcessStereoToMono(dsp_t * pdsp, portable_samplepair_t * pbfront, portable_samplepair_t * pbrear, int sampleCount, bool bcrossfading) Line 7385 C++ engine.dll!DSP_Process(int idsp, portable_samplepair_t * pbfront, portable_samplepair_t * pbrear, portable_samplepair_t * pbcenter, int sampleCount) Line 8723 C++ engine.dll!CAudioDeviceBase::ApplyDSPEffects(int idsp, portable_samplepair_t * pbuffront, portable_samplepair_t * pbufrear, portable_samplepair_t * pbufcenter, int samplecount) Line 420 C++ engine.dll!MIX_PaintChannels(int endtime, bool bIsUnderwater) Line 2427 C++ engine.dll!S_Update_Guts(float mixAheadTime) Line 6538 C++ engine.dll!S_Update(const AudioState_t * pAudioState) Line 6325 C++ engine.dll!Host_RunFrame_Sound() Line 2914 C++ engine.dll!Host_RunFrame(float time) Line 3500 C++ engine.dll!Host_RunFrame(float time) Line 3616 C++ engine.dll!CHostState::State_Run(float frameTime) Line 505 C++ engine.dll!CHostState::FrameUpdate(float time) Line 649 C++ engine.dll!HostState_Frame(float time) Line 125 C++ engine.dll!CEngine::Frame() Line 432 C++ engine.dll!CEngineAPI::MainLoop() Line 1544 C++ engine.dll!CModAppSystemGroup::Main() Line 2113 C++ engine.dll!CAppSystemGroup::Run() Line 383 C++ engine.dll!CEngineAPI::RunListenServer() Line 1827 C++ engine.dll!StaticRunListenServer(void * arg) Line 1843 C++ tier0.dll!CatchAndWriteContext_t::Invoke() Line 379 C++ tier0.dll!CatchAndWriteMiniDump_Impl(CatchAndWriteContext_t & ctx) Line 446 C++ tier0.dll!CatchAndWriteMiniDumpForVoidPtrFn(void(*)(void *) pfn, void * pv, bool bExitQuietly) Line 524 C++ engine.dll!CEngineAPI::Run() Line 1921 C++ launcher.dll!CAppSystemGroup::Run() Line 383 C++ launcher.dll!LauncherMain(HINSTANCE * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 1487 C++ hl2_launcher.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 141 C++

steadyfield avatar Jan 13 '23 05:01 steadyfield

Also there is another build problem for Windows, in source-engine\public\mathlib\simdvectormatrix.h:

memutils::set( m_pData, value, m_nHeight*m_nPaddedWidth );

formal parameter with requested alignment of 16 won't be aligned\

I get around this problem by replacing it to the code found in the old version:

memset( m_pData, 0, m_nHeight*m_nPaddedWidth*sizeof(m_pData[0]) );

steadyfield avatar Jan 14 '23 03:01 steadyfield

@steadyfield

Also there is another build problem for Windows, in source-engine\public\mathlib\simdvectormatrix.h

That problem is fixed in last commit. But what about soundscapes... Is it 64bit or 32bit build?

nillerusr avatar Jan 14 '23 12:01 nillerusr

@steadyfield

Also there is another build problem for Windows, in source-engine\public\mathlib\simdvectormatrix.h

That problem is fixed in last commit. But what about soundscapes... Is it 64bit or 32bit build?

It is 32bit build, following the guide https://github.com/nillerusr/source-engine/wiki/How-to-build I didn't try the 64bit.

steadyfield avatar Jan 15 '23 00:01 steadyfield

@steadyfield Are you using resources from steam? I don't have problems in my windows builds. What msvc version?

nillerusr avatar Jan 15 '23 14:01 nillerusr

@steadyfield Are you using resources from steam? I don't have problems in my windows builds. What msvc version?

I‘m using VS2015. Attaching hl2_launcher.exe to VS, it seems that the PSET_GetNextN in snd_dsp.cpp is related to the problem.

Now I've tried the game binaries built by the Github CI , it didn't crash. Maybe there are some problems with the compiler on my PC. I've also tried using engine.dll built by Github CI with all the other binaries built from my PC, it also didn't crash.

Also, the Win32 version of the dedicated server doesn't seem to work, it says DLL initialization failed. (I'm using the dedicated server compiled by Github CI)

steadyfield avatar Jan 16 '23 01:01 steadyfield