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

fix: ispaused invalid iterator

Open maxime1907 opened this issue 9 months ago • 1 comments
trafficstars

This fixes that sort of crash:

  • https://crash.limetech.org/5aeubpubbsgt

Which happens on this function call:

  • https://github.com/alliedmodders/metamod-source/blob/2009298c32735b6de1712ff88e2309c151e5eb31/core/sourcehook/sourcehook_impl_chook.h#L95

Coming from here:

  • https://github.com/alliedmodders/metamod-source/blob/4bc5a3a0b7c9b92fc2365ab86f9d7d425459a547/core/sourcehook/sourcehook_impl.h#L259

So from my understanding, this->m_Paused crashes because this is null

That's why i am trying to avoid any call with iter being an invalid iterator

i added this on our prod servers since 04/02/2025 and we have not encountered this crash again:

  • https://github.com/srcdslab/metamod-source/pull/1#issue-2831162461
  • https://stats.nide.gg/hlstats.php?game=css_ze

maxime1907 avatar Feb 14 '25 09:02 maxime1907

Please describe your fix & crash in details, without that information it's unclear what you're trying to fix.

On that note, your crash seems like it could stem from an unproperly setup dynamic sourcehook.

done! thanks for the info

maxime1907 avatar Feb 18 '25 12:02 maxime1907