source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[Linux][mp] Crash when encountering certain NPCs

Open 4LT opened this issue 7 years ago • 7 comments

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

crash_dump.zip

4LT avatar Jan 07 '18 03:01 4LT

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.

kisak-valve avatar Jan 07 '18 13:01 kisak-valve

I posted a gist. Can't find any minidumps (find . | grep mdmp revealed nothing)

4LT avatar Jan 07 '18 14:01 4LT

On linux, minidumps from steam are commonly found in /tmp/dumps/ and end with .dmp.

kisak-valve avatar Jan 07 '18 14:01 kisak-valve

Thanks, uploaded dump file.

4LT avatar Jan 07 '18 15:01 4LT

For reference, the attached minidump is indeed a SIGSEGV in studiorender.so.

kisak-valve avatar Jan 07 '18 17:01 kisak-valve

@kisak-valve This seems like a duplicate of #2225 (https://github.com/ValveSoftware/Source-1-Games/issues/2225).

Yetoo1 avatar Mar 08 '20 07:03 Yetoo1

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.

TravisWehrman avatar Dec 12 '21 04:12 TravisWehrman