ampreeT / SourceCoop

Black Mesa cooperative plugin for SourceMod
GNU General Public License v3.0
182 stars 13 forks source link

`CAI_BaseNPC::RunTask` crash on `TASK_MOVE_AWAY_PATH` #148

Closed ampreeT closed 1 month ago

ampreeT commented 1 month ago

This crash occurs on a call to AI_GetSinglePlayer inside of CAI_BaseNPC::RunTask and can be replicated on bm_c1a3a.

Logs:

https://crash.limetech.org/l4hp245ugs7u

Raw Dump:

Thread 0 (crashed):
   0: server_srv.so!CAI_BaseNPC::RunTask(Task_t const*) + 0x252
      eip: 0xf0a404c2  esp: 0xfff2d400  ebp: 0xfff2d518  ebx: 0xf14a7ff4
      esi: 0xf7c9ac00  edi: 0x12ad0090  eax: 0x00000000  ecx: 0xffffffb4
      edx: 0x09316010  efl: 0x00210246  

      f0a404a8  8b 85 18 ff ff ff        mov eax, [ebp-0xe8]
      f0a404ae  f3 0f 5c 87 9c 02 00 00  subss xmm0, [edi+0x29c]
      f0a404b6  f3 0f 59 fe              mulss xmm7, xmm6
      f0a404ba  f3 0f 59 c9              mulss xmm1, xmm1
      f0a404be  f3 0f 59 c0              mulss xmm0, xmm0
  >   f0a404c2  f6 80 19 01 00 00 08     test byte [eax+0x119], 0x8
      f0a404c9  f3 0f 58 cf              addss xmm1, xmm7
      f0a404cd  f3 0f 58 c1              addss xmm0, xmm1
      f0a404d1  f3 0f 11 85 08 ff ff ff  movss [ebp-0xf8], xmm0
      f0a404d9  0f 85 b1 26 00 00        jnz 0xf0a42b90
      f0a404df  8b 85 18 ff ff ff        mov eax, [ebp-0xe8]

      fff2d400  90 00 ad 12 a0 d4 f2 ff  00 00 e0 41 c0 97 ec f7  ...........A....
      fff2d410  00 90 ec f7 00 d7 c9 f7  0b 00 00 00 27 7c d3 f7  ............'|..
      fff2d420  dc d9 d7 e6 00 00 9c c3  00 00 b7 43 00 40 ab c4  ...........C.@..
      fff2d430  00 00 00 00 30 3e b0 12  a0 d4 f2 ff 00 00 00 00  ....0>..........
      fff2d440  40 42 25 0e 60 f4 b6 0b  d8 d4 f2 ff d2 c0 a0 db  @B%.`...........
      fff2d450  50 79 b0 11 b0 0d 30 f2  90 d4 f2 ff b0 36 70 0b  Py....0......6p.
      fff2d460  00 00 00 00 00 80 e2 43  00 00 00 00 60 19 b7 0b  .......C....`...
      fff2d470  b0 0d 30 f2 f4 7f 4a f1  b8 d4 f2 ff 1f 8f e9 f0  ..0...J.........
      fff2d480  40 cc fd 10 a8 15 ad 12  b8 d4 f2 ff 20 f4 b6 0b  @........... ...
      fff2d490  20 f4 b6 0b f5 c6 e1 f7  10 00 00 00 71 99 a1 db   ...........q...
      fff2d4a0  30 91 00 0b 08 00 00 00  00 00 00 00 01 00 00 00  0...............
      fff2d4b0  30 91 00 0b 02 00 00 00  00 00 00 00 00 00 00 00  0...............
      fff2d4c0  00 00 00 00 50 e7 d5 10  02 00 00 00 00 00 00 00  ....P...........
      fff2d4d0  01 00 00 00 50 e7 d5 10  f0 b7 06 0b 02 00 00 00  ....P...........
      fff2d4e0  00 00 00 00 01 00 00 00  f0 b7 06 0b 96 b6 e0 59  ...............Y
      fff2d4f0  90 00 ad 12 00 00 00 00  9a 27 8d 39 24 d6 f2 ff  .........'.9$...
      fff2d500  00 00 00 00 f4 7f 4a f1  7b 02 a4 f0 f4 7f 4a f1  ......J.{.....J.
      fff2d510  24 d6 f2 ff 00 00 00 00  48 d5 f2 ff 7c 55 8d dc  $.......H...|U..

https://github.com/user-attachments/assets/948668f5-2768-4340-aecd-6f24f38a67ea