Jump to content
Sign in to follow this  
download500

My callouts are frequently crashing over invalid Rage.Ped or invalid Rage.Blip

Recommended Posts

[1/23/2016 11:57:08 PM.819] LSPD First Response: 
[1/23/2016 11:57:08 PM.819] LSPD First Response: ==============================
[1/23/2016 11:57:08 PM.819] LSPD First Response: UNHANDLED EXCEPTION DURING GAME THREAD TICK
[1/23/2016 11:57:08 PM.819] LSPD First Response: ------------------------------
[1/23/2016 11:57:08 PM.820] LSPD First Response: Origin: Game fiber "CalloutManager".
[1/23/2016 11:57:08 PM.820] LSPD First Response: ------------------------------
[1/23/2016 11:57:08 PM.820] LSPD First Response: Exception type: Rage.Exceptions.InvalidHandleableException
[1/23/2016 11:57:08 PM.820] LSPD First Response: Exception message: Operation is not valid because the specified  Rage.Blip is invalid.
[1/23/2016 11:57:08 PM.820] LSPD First Response: ------------------------------
[1/23/2016 11:57:08 PM.821] LSPD First Response: Inner exceptions:
[1/23/2016 11:57:08 PM.821] LSPD First Response: ------------------------------
[1/23/2016 11:57:08 PM.821] LSPD First Response: Stack trace:
[1/23/2016 11:57:08 PM.821] LSPD First Response: at Rage.Blip.Delete()

Almost always on the cleanup phase, but sometimes when they are first launched too. Any idea what typically causes this?

Share this post


Link to post
Share on other sites

Do you check if the entity/blip exists? If not add checks:

                        if (myBlip.Exists())
                            myBlip.Delete();

                        if (myPed.Exists())
                            myPed.Dismiss(); //or Delete(), whatever you need

                        if (myVehicle.Exists())
                            myVehicle.Dismiss(); //or Delete(), whatever you need

 

Also if you have crashes on OnBeforeCalloutDisplayed() or OnCalloutAccepted() you should check if the entities were created correctly, if not abort the callout:

                        Ped myPed = new Ped(position); //create the ped
                        if (!myPed.Exists())  //check if the ped was correctly created and now exists
                            return false;  //if the ped doesn't exists, abort the callout

                    //continue preparing ped, myPed.BlockPermanentEvents, myPed.Inventory.GiveNewWeapon()...

Edited by alexguirre

Share this post


Link to post
Share on other sites

Thanks, I'm still fighting with it. I didn't change anything to the blips before this started occuring so I'm wondering if it's from messing with the game fibers as I don't fully understand them yet. My if exist lists seem to include all the applicable blips.

On a side note though, the suspect doesn't get a blip until the baseprocess. Is this an issue? It worked fine before, but I wonder if it could be causing the crashing now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×