Jump to content

Reproducible crash when player asks ped for ID where ped Persona changed


PeterU

Recommended Posts

I have discovered a reproducible crash in LSPDFR itself that occurs when asking a ped for ID, where that ped has had their Persona replaced using the API.

 

[6/10/2019 7:18:34 PM.180] LSPD First Response: ==============================
[6/10/2019 7:18:34 PM.180] LSPD First Response: UNHANDLED EXCEPTION DURING GAME FIBER TICK
[6/10/2019 7:18:34 PM.181] LSPD First Response: ------------------------------
[6/10/2019 7:18:34 PM.181] LSPD First Response: Origin: Game fiber "<UNNAMED THREAD>".
[6/10/2019 7:18:34 PM.182] LSPD First Response: ------------------------------
[6/10/2019 7:18:34 PM.183] LSPD First Response: Exception type: System.NullReferenceException
[6/10/2019 7:18:34 PM.184] LSPD First Response: Exception message: Object reference not set to an instance of an object.
[6/10/2019 7:18:34 PM.184] LSPD First Response: ------------------------------
[6/10/2019 7:18:34 PM.185] LSPD First Response: Inner exceptions:
[6/10/2019 7:18:34 PM.185] LSPD First Response: ------------------------------
[6/10/2019 7:18:34 PM.186] LSPD First Response: Stack trace:
[6/10/2019 7:18:34 PM.187] LSPD First Response: at LSPD_First_Response.Engine.Scripting.Entities.Persona.CreatePed(Persona persona, Vector3 position) in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Scripting\Entities\Persona.cs:line 447
[6/10/2019 7:18:34 PM.187] at ............................................................................................................................GetPedHeadshotTxd(Persona persona, Boolean bigHeadshot, Boolean noObscuredFace) in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Scripting\Functions.cs:line 2095
[6/10/2019 7:18:34 PM.189] at .......................................................................................................................................................................................................................................................() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\PedInteraction.cs:line 126
[6/10/2019 7:18:34 PM.190] at .......................................................................................................................................................................................................................................................() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\PedInteraction.cs:line 108
[6/10/2019 7:18:34 PM.190] at .......................................................................................................................................................................................................................................................(........................................................................................................................... ) in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Scripting\ThreadedScriptComponent.cs:line 86
[6/10/2019 7:18:34 PM.191] at .......................................................................................................................................................................................................................................................() in E:\GTA V\LSPD First Response\LSPD First Response\Engine\RecurringTask.cs:line 48
[6/10/2019 7:18:34 PM.192] at .......................................................................................................................................................................................................................................................() in E:\GTA V\LSPD First Response\LSPD First Response\Engine\Main.cs:line 54
[6/10/2019 7:18:34 PM.192] at .......................................................................................................................................................................................................................................................() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\LSPDFR.cs:line 741
[6/10/2019 7:18:34 PM.193] at Rage.GameFiber.Main()
[6/10/2019 7:18:34 PM.193] LSPD First Response: ==============================

Proof of concept (in context of a PoC callout plugin😞

                ped = new Ped();
                ped.SetPositionWithSnap(Game.LocalPlayer.Character.GetOffsetPositionFront(3.0f));

                Persona newPersona = new Persona("Testy", "McTestFace", LSPD_First_Response.Gender.Male);
                Functions.SetPersonaForPed(ped, newPersona);

                Game.DisplaySubtitle("Now cause the ped to be Stopped by Player by holding 'E' and ask for ID.");

I've also built the DLL in case it's easier to throw this in plugins\LSPDFR, go on duty and reproduce the crash.

As you might guess, I make PeterUCallouts. I love working to bring LSPDFR players the kind of callouts that strike a good balance between realism and fun and are stable & varied!

Unfortunately I cannot offer support via PM -- please use the forums, so that others may benefit from your solutions!

Link to comment
Share on other sites

Reproduced and passed along in the testing forum. 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

Link to comment
Share on other sites

  • Management Team

Thanks for the report. The issue is the specific constructor used which does not accept a model for the persona. This model is then later necessary for certain ped specific features. I don't think removing the constructor would be good as it might break quite a few mods, so I will update the internal model reference once you assign the persona to a ped.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...