Mikusch / friendlyfire

A plugin that fixes mp_friendlyfire in Team Fortress 2
https://forums.alliedmods.net/showthread.php?t=342166
GNU General Public License v3.0
16 stars 2 forks source link

Array index out-of-bounds error #11

Open Jugheadbomb opened 6 months ago

Jugheadbomb commented 6 months ago

Happens sometimes and only with DHookCallback_CTFProjectile_Flare_Post

L 03/09/2024 - 09:18:40: [SM] Exception reported: Array index out-of-bounds (index -1, limit 8)
L 03/09/2024 - 09:18:40: [SM] Blaming: friendlyfire.smx
L 03/09/2024 - 09:18:40: [SM] Call stack trace:
L 03/09/2024 - 09:18:40: [SM]   [0] SetFailState
L 03/09/2024 - 09:18:40: [SM]   [1] Line 152, friendlyfire\entity.sp::Entity.CheckArrayBounds
L 03/09/2024 - 09:18:40: [SM]   [2] Line 158, friendlyfire\entity.sp::Entity.GetTeamInternal
L 03/09/2024 - 09:18:40: [SM]   [3] Line 141, friendlyfire\entity.sp::Entity.ResetTeam
L 03/09/2024 - 09:18:40: [SM]   [4] Line 301, friendlyfire\dhooks.sp::DHookCallback_CTFProjectile_Flare_Explode_Post
Jugheadbomb commented 6 months ago

According to previous message, there is another error spam with these dhook IDS (686 and 687), happens on map change

L 03/09/2024 - 14:12:45: [friendlyfire.smx] Failed to remove dynamic hook (ID 687)
L 03/09/2024 - 14:12:45: [friendlyfire.smx] Failed to remove dynamic hook (ID 686)
Mikusch commented 5 months ago

Would need repro steps for the flare issue, as well as plugins that might have caused this. Usually it's when other plugins modify attacker, which breaks the whole system.

On Sun, Mar 10, 2024, 05:52 Jugheadbomb @.***> wrote:

According to previous message, there is another error spam with these dhook IDS (686 and 687), happens on map change

L 03/09/2024 - 14:12:45: [friendlyfire.smx] Failed to remove dynamic hook (ID 687) L 03/09/2024 - 14:12:45: [friendlyfire.smx] Failed to remove dynamic hook (ID 686)

— Reply to this email directly, view it on GitHub https://github.com/Mikusch/friendlyfire/issues/11#issuecomment-1987088843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCVAPARYD32JKNGIHVOTCTYXPRJVAVCNFSM6AAAAABEN7CXO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGA4DQOBUGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

NNinja1255 commented 2 months ago

Got this same issue whenever Zatoichi dueling.

Mikusch commented 2 months ago

Got this same issue whenever Zatoichi dueling.

Could you provide more info? Is there any specific setup that allows me to reproduce this consistently? Can you rule out that this isn't other plugins interfering?

NNinja1255 commented 2 months ago

It is literally just hitting people who have the zatoichi with the zatoichi. The only other plugin I have that modifies the attacker is the OnDamageTaken Hook, which I disabled and it didn't change anything.

Mikusch commented 2 months ago

It is literally just hitting people who have the zatoichi with the zatoichi. The only other plugin I have that modifies the attacker is the OnDamageTaken Hook, which I disabled and it didn't change anything.

Thanks, I can reproduce this. Could you submit a new issue so I can track this better? Hopefully the fix won't take too long.

NNinja1255 commented 2 months ago

Thanks, I can reproduce this. Could you submit a new issue so I can track this better? Hopefully the fix won't take too long.

15