Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

plugin crashing

Featured Replies

The plugin i'm trying to make keeps crashing over weird stuff and i can't seem to figure out why.

 

        public override bool OnCalloutAccepted()
        {


            AreaBlip = new Blip(SpawnPoint,20f);            
            AreaBlip.Color = Color.Yellow;
            AreaBlip.Alpha = 100;
            AreaBlip.EnableRoute(Color.Yellow);

            Rage.Native.NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", Victim, Suspect);
            Suspect.Tasks.EnterVehicle(Bike, -1).WaitForCompletion();
            Suspect.Tasks.ChaseWithGroundVehicle(Victim).WaitForCompletion(2000);


            check = 0;

            Game.LogTrivial("k: 1/10 Create Pursuit");
            Pursuit = Functions.CreatePursuit();
            Game.LogTrivial("k: 2/10 Entering Runthings()");
            runthings();


            return base.OnCalloutAccepted();
        }

        public override void OnCalloutNotAccepted()
        {
            if (Suspect.Exists()) Suspect.Dismiss();
            if (SuspectBlip.Exists()) SuspectBlip.Delete();
            if (Victim.Exists()) Victim.Dismiss();
            if (VictimBlip.Exists()) VictimBlip.Delete();
            base.OnCalloutNotAccepted();
        }



 
        public void runthings()
        {

            Game.LogTrivial("k: 3/10 Deleting AreaBlip");
            if (AreaBlip.Exists()) { AreaBlip.Delete(); }
            Game.LogTrivial("k: 4/10 Attaching Blips");
            SuspectBlip = Suspect.AttachBlip();
            VictimBlip = Victim.AttachBlip();
            VictimBlip.Color = Color.Yellow;
            Random randNum = new Random();
            Game.LogTrivial("k: 5/10 Display victimcall");
            Game.DisplaySubtitle("~y~Victim: ~w~" + help[randNum.Next(help.Count)], 5000);
            GameFiber.Sleep(5000);
            Game.LogTrivial("k: 6/10 Display suspectcall");
            randNum = new Random();
            Game.DisplaySubtitle("~r~Suspect: ~w~" + harrassmentlines[randNum.Next(harrassmentlines.Count)], 5000);
            GameFiber.Sleep(5000);
            Game.LogTrivial("k: 7/10 fleeing suspect");
            GameFiber.Sleep(5000);
            Rage.Native.NativeFunction.CallByName<uint>("TASK_REACT_AND_FLEE_PED", Suspect, Rage.Game.LocalPlayer.Character);
            GameFiber.Sleep(5000);
            Game.LogTrivial("k: 8/10 adding suspect to pursuit");
            Functions.AddPedToPursuit(Pursuit, Suspect);

        }



        public override void Process()
        {

            Game.LogTrivial("k: 9/10 entering process()");
            base.Process();
            if (!Functions.IsPursuitStillRunning(Pursuit))
            {
                End();
            }
        }


        public override void End()
        {
            Game.LogTrivial("k: ending call");
            if (Suspect.Exists()) Suspect.Dismiss();
            Game.LogTrivial("k: susblipdel");
            if (SuspectBlip.Exists()) SuspectBlip.Delete();            
            if (Victim.Exists()) Victim.Dismiss();
            Game.LogTrivial("k: vicblipdel");
            if (VictimBlip.Exists()) VictimBlip.Delete();
            base.End();
        }
    }
[18/05/2016 21:09:31.479] LSPD First Response: k: 1/10 Create Pursuit
[18/05/2016 21:09:31.482] [TRACE] Created new chase
[18/05/2016 21:09:31.482] LSPD First Response: k: 2/10 Entering Runthings()
[18/05/2016 21:09:31.485] LSPD First Response: k: 3/10 Deleting AreaBlip
[18/05/2016 21:09:31.485] LSPD First Response: k: 4/10 Attaching Blips
[18/05/2016 21:09:31.486] LSPD First Response: k: 5/10 Display victimcall
[18/05/2016 21:09:36.132] [TRACE] Asked thread ZoomThread #2 to abort: Timeout exceeded
[18/05/2016 21:09:36.132] [TRACE] Instance cleaned (ZoomThread #2)
[18/05/2016 21:09:36.134] [TRACE] Thread ZoomThread #2 has been shut down
[18/05/2016 21:09:36.491] LSPD First Response: k: 6/10 Display suspectcall
[18/05/2016 21:09:41.507] LSPD First Response: k: 7/10 fleeing suspect
[18/05/2016 21:09:51.526] LSPD First Response: k: 8/10 adding suspect to pursuit
[18/05/2016 21:09:51.528] [TRACE] Suspect added to chase
[18/05/2016 21:09:51.650] LSPD First Response: 
[18/05/2016 21:09:51.651] LSPD First Response: ==============================
[18/05/2016 21:09:51.651] LSPD First Response: UNHANDLED EXCEPTION DURING GAME FIBER TICK
[18/05/2016 21:09:51.651] LSPD First Response: ------------------------------
[18/05/2016 21:09:51.652] LSPD First Response: Origin: Game fiber "CalloutManager".
[18/05/2016 21:09:51.652] LSPD First Response: ------------------------------
[18/05/2016 21:09:51.654] LSPD First Response: Exception type: Rage.Exceptions.InvalidHandleableException
[18/05/2016 21:09:51.654] LSPD First Response: Exception message: Operation is not valid because the specified  Rage.Blip is invalid.
[18/05/2016 21:09:51.654] LSPD First Response: ------------------------------
[18/05/2016 21:09:51.654] LSPD First Response: Inner exceptions:
[18/05/2016 21:09:51.654] LSPD First Response: ------------------------------
[18/05/2016 21:09:51.654] LSPD First Response: Stack trace:
[18/05/2016 21:09:51.655] LSPD First Response: at Rage.Blip.Delete()
[18/05/2016 21:09:51.655] at LSPD_First_Response.Mod.Callouts.Callout.OnCalloutAccepted() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\Callout.cs:line 154
[18/05/2016 21:09:51.655] at LSPDFR_Khallouts.Callouts.Sexual_Harrassment.OnCalloutAccepted()
[18/05/2016 21:09:51.655] at ?????????????????????????????????????????.?????????????????????????????????????????() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 338
[18/05/2016 21:09:51.656] at ?????????????????????????????????????????.?????????????????????????????????????????() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 173
[18/05/2016 21:09:51.656] at Rage.GameFiber.Main()
[18/05/2016 21:09:51.657] LSPD First Response: ==============================

 

I even tried to stop the removal of the blips by commenting it out, it still crashes on the same thing.

  • Author

pervs chasing girls, but that's beyond the point :p

 

Fixed my problem, had a loop error.

But now this is what happens after my callout finishes :

 

[19/05/2016 04:19:43.914] [TRACE] Arrested or dead
[19/05/2016 04:19:43.940] [TRACE] No more suspects useable, aborting chase
[19/05/2016 04:19:43.944] [TRACE] Removing ped from ChaseController #1 (GameplayMandatory)
[19/05/2016 04:19:43.948] [TRACE] Removing ped from ChaseController #1 (GameplayMandatory)
[19/05/2016 04:19:43.948] [TRACE] Instance cleaned (ChaseController #1)
[19/05/2016 04:19:43.948] [TRACE] Aborted chase
[19/05/2016 04:19:43.951] [TRACE] Instance cleaned ( #1)
[19/05/2016 04:19:55.837] [TRACE] Ending already
[19/05/2016 04:19:55.842]    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
[19/05/2016 04:19:55.842]    at System.Environment.get_StackTrace()
[19/05/2016 04:19:55.842]    at LSPD_First_Response.Engine.BaseComponent.End() in E:\GTA V\LSPD First Response\LSPD First Response\Engine\BaseComponent.cs:line 34
[19/05/2016 04:19:55.842]    at LSPD_First_Response.Mod.Callouts.Callout.End() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\Callout.cs:line 194
[19/05/2016 04:19:55.842]    at LSPDFR_Khallouts.Callouts.Sexual_Harrassment.End()
[19/05/2016 04:19:55.842]    at LSPDFR_Khallouts.Callouts.Sexual_Harrassment.Process()
[19/05/2016 04:19:55.842]    at ?????????????????????????????????????????.?????????????????????????????????????????() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 197
[19/05/2016 04:19:55.842]    at Rage.GameFiber.Main()
[19/05/2016 04:19:55.842]    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[19/05/2016 04:19:55.842]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[19/05/2016 04:19:55.842]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
[19/05/2016 04:19:55.842]    at System.Threading.ThreadHelper.ThreadStart()
[19/05/2016 04:19:55.842] [TRACE] Ending already
[19/05/2016 04:19:55.842]    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
[19/05/2016 04:19:55.842]    at System.Environment.get_StackTrace()
[19/05/2016 04:19:55.842]    at LSPD_First_Response.Engine.BaseComponent.End() in E:\GTA V\LSPD First Response\LSPD First Response\Engine\BaseComponent.cs:line 34
[19/05/2016 04:19:55.842]    at LSPD_First_Response.Mod.Callouts.Callout.End() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\Callout.cs:line 194
[19/05/2016 04:19:55.842]    at LSPDFR_Khallouts.Callouts.Sexual_Harrassment.End()
[19/05/2016 04:19:55.842]    at LSPDFR_Khallouts.Callouts.Sexual_Harrassment.Process()
[19/05/2016 04:19:55.842]    at ?????????????????????????????????????????.?????????????????????????????????????????() in E:\GTA V\LSPD First Response\LSPD First Response\Mod\Callouts\CalloutManager.cs:line 197
[19/05/2016 04:19:55.842]    at Rage.GameFiber.Main()
[19/05/2016 04:19:55.842]    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[19/05/2016 04:19:55.842]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[19/05/2016 04:19:55.843]    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
[19/05/2016 04:19:55.843]    at System.Threading.ThreadHelper.ThreadStart()

anyone?

The crash log doesn't say much because you may not have had the pdb file loaded. 

When you build your project you get a .DLL and a .pdb -- the pdb allows the game to know where your code actually crashed so copy it to the lspdfr plugin dir with your plugin.

If you look at your first crash log it tells you the issue was dealing with rage blips that were destroyed. The log file above has a bunch of ?????? Marks 

AreaBlip = new Blip(SpawnPoint,20f);            
            AreaBlip.Color = Color.Yellow;
            AreaBlip.Alpha = 100;
            AreaBlip.EnableRoute(Color.Yellow);

Try putting this in a different place than your OnCalloutAccepted() override.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

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...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.