Skip to content

warpPedIntoVehicle causing C++ runtime assertion failure #2906

@Dark-Dragon

Description

@Dark-Dragon

Describe the bug

Some obscure, mostly trailer-like vehicles that can technically have a driver currently misbehave when you attempt to warp someone inside on a passenger seat using warpPedIntoVehicle, causing network trouble for the player at best and a Microsoft Visual C++ Runtime assertion failure on the server at worst (see below).

Example Vehicle IDs: 610, 611, and a couple more

Steps to reproduce

run veh = createVehicle(611,0,0,3) plyr = getRandomPlayer() warpPedIntoVehicle(plyr,veh,0) -- works as intended, contrary to...

run veh = createVehicle(611,0,0,3) plyr = getRandomPlayer() warpPedIntoVehicle(plyr,veh,1) -- warpPedIntoVehicle will falsely return true but warp the player on top of the vehicle instead, causing network trouble after a while

run veh = createVehicle(611,0,0,3) plyr = getRandomPlayer() warpPedIntoVehicle(plyr,veh,10) -- to cause the assertion failure

Version

MTA:SA Server v1.5.9-release-21554 (Windows 10, 64 bit)

Additional context

Possibly related: #2907 getVehicleMaxPassengers returns 'false' for those instead of the expected 0

Relevant log output

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Assertion failed!

Program: ... Andreas 1.5\server\mods\deathmatch\deathmatch.dll
File: C:\BuildAgent\work\675e5b8e8f135823...\SharedU....Misc.h
Line: 1571

Expression: uiIndex < SIZE

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)
---------------------------
Abbrechen   Wiederholen   Ignorieren   
---------------------------

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions