source-sdk-2013
source-sdk-2013 copied to clipboard
[Linux][mp] Crash when encountering certain NPCs
Hello, I'm encountering a crash in our mod when encountering certain NPCs, apparently npc_citizen but there may be others. One replicable point where this happens is on d3_c17_13, when the player encounters the 2nd and 3rd rebels, who are hiding adjacent to the first parking garage. This can be re-created by copying the map from HL2 to Source SDK Base 2013 Multiplayer, so it's not mod-specific. A backtrace leads to studiorender.so. This crash does not occur in Windows.
System Info: https://gist.github.com/4LT/b594ac3442698ef2dcf424f4bfe641a9
Hello @4LT, please copy your system information from steam (Steam
-> Help
-> System Information
) and put it in a gist, then include a link to the gist in this issue report. In particular, if you can find any CrashIDs or minidumps related to this issue, please include them.
I posted a gist. Can't find any minidumps (find . | grep mdmp
revealed nothing)
On linux, minidumps from steam are commonly found in /tmp/dumps/
and end with .dmp.
Thanks, uploaded dump file.
For reference, the attached minidump is indeed a SIGSEGV in studiorender.so.
@kisak-valve This seems like a duplicate of #2225 (https://github.com/ValveSoftware/Source-1-Games/issues/2225).
Some quick debugging found the segfault occurs in src/public/materialsystem/imesh.h#L1417.
Top-level function is DrawModel()
, the models I see being processed here are the Humans/Group03m/*.mdl
variants.
Unsure if it's an incorrect SIMD asm implementation, but modifying studiorender.so::r_studiodraw.cpp::R_StudioSoftwareProcessMesh()
to use FastVertex()
instead of FastVertexSSE()
in the two instances appears to effectively bypass this segfault. We'll be using this workaround for our mod. Presumed perf hit due to using the non SSE version FastVertex()
appears unmeasurable thus inconsequential for our needs.
I used the aforementioned d3_c17_13
and the end of d1_canals_01
maps as test cases for this issue.