alliedmodders / hl2sdk

Half-Life 2 SDK Mirrors
https://github.com/valvesoftware
353 stars 174 forks source link

BMS EmitGameSound crash #78

Open Alienmario opened 4 years ago

Alienmario commented 4 years ago

EmitGameSound* functions in Black Mesa crash the server. Same sound plays correctly via playgamesound command. I'm guessing it could be CSGO code like with trace functions in #70 .

Test code soundtest.txt

Throttle Thread 0 (crashed): 0: jit_code_3890720768_1048576 + 0xf64e0 https://crash.limetech.org/qdvzopc5s77y

SM 1.11.0.6562 Metamod 1.10.7-dev

psychonic commented 4 years ago

I'll preface this with saying that I haven't had time to do any testing or debugging. However, from a look at the binary, it seems they added a few fields to CSoundParametersInternal. That could cause issues if the game's SoundEmitterSystem is trying to write past the bounds of our allocated struct.

The new fields do seem to be specific to BMS, but they did also add the Flush functionality from CS:GO to completely reload sounds. I pushed an update with both of those things now.

Alienmario commented 4 years ago

So, how can I test this from a sm plugin?

psychonic commented 4 years ago

So, how can I test this from a sm plugin?

The latest SM dev builds (1.11.0.6621 for example) should have this change. They use the latest version of the SDK at the time of building. Try your test case on that.

Alienmario commented 4 years ago

No luck. Tested on both windows and linux.

psychonic commented 1 month ago

@Alienmario is this no longer an issue?

Alienmario commented 1 month ago

Err, looks like only an issue on windows now.