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.
The latest updated version of RAGE Plugin Hook, required to play LSPDFR, can be found inside the LSPDFR download. It is not currently available on the RAGE Plugin Hook website.

[Bug Report] Crash as a result of adding multiple units in rapid sucession

Featured Replies

I think this is the correct section to report bugs, but sorry if its not. As you can see from the spoiler below, the game will compleatly crash out if you add loads of units in rapid succession. But whats interesting and why i created this thread is that its not a crash as a result of the game loading too many objects at once, but because its not being able to fetch the file multiple times. 

[16/08/2015 21:08:20.861] LSPD First Response: Cop added to chase
[16/08/2015 21:08:20.861] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:21.128] LSPD First Response: Cop added to chase
[16/08/2015 21:08:21.128] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:21.363] LSPD First Response: Cop added to chase
[16/08/2015 21:08:21.363] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:21.562] LSPD First Response: Cop added to chase
[16/08/2015 21:08:21.562] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:21.726] LSPD First Response: Cop added to chase
[16/08/2015 21:08:21.726] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:21.958] LSPD First Response: Cop added to chase
[16/08/2015 21:08:21.958] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.023] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.023] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.024] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.024] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.287] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.287] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.288] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.288] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.488] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.488] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.489] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.489] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.687] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.687] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:23.688] LSPD First Response: Cop added to chase
[16/08/2015 21:08:23.688] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:24.150] LSPD First Response: Cop added to chase
[16/08/2015 21:08:24.150] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:24.151] LSPD First Response: Cop added to chase
[16/08/2015 21:08:24.151] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:25.453] LSPD First Response: Cop added to chase
[16/08/2015 21:08:25.453] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:25.454] LSPD First Response: Cop added to chase
[16/08/2015 21:08:25.454] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:25.718] LSPD First Response: Cop added to chase
[16/08/2015 21:08:25.718] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:25.719] LSPD First Response: Cop added to chase
[16/08/2015 21:08:25.719] LSPD First Response: Added cop to existing chase
[16/08/2015 21:08:31.298] LSPD First Response: PlayExternalSound: IO error while opening wave stream from D:\SteamLibraryHDD\steamapps\common\Grand Theft Auto V\LSPDFR\Police Scanner\RESIDENT\NOISE_LOOP_01.wav. File already in use?
[16/08/2015 21:08:31.337] 
[16/08/2015 21:08:31.338] ==============================
[16/08/2015 21:08:31.338] UNHANDLED EXCEPTION IN PLUGIN
[16/08/2015 21:08:31.338] ------------------------------
[16/08/2015 21:08:31.338] Plugin name: LSPD First Response
[16/08/2015 21:08:31.338] ------------------------------
[16/08/2015 21:08:31.338] Exception type: System.NullReferenceException
[16/08/2015 21:08:31.338] Exception message: Object reference not set to an instance of an object.
[16/08/2015 21:08:31.338] ------------------------------
[16/08/2015 21:08:31.338] Inner exceptions:
[16/08/2015 21:08:31.338] ------------------------------
[16/08/2015 21:08:31.338] Stack trace:
[16/08/2015 21:08:31.338] at ?.?()
[16/08/2015 21:08:31.338] at ?.?.?()
[16/08/2015 21:08:31.338] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[16/08/2015 21:08:31.338] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[16/08/2015 21:08:31.338] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
[16/08/2015 21:08:31.338] at System.Threading.ThreadHelper.ThreadStart()
[16/08/2015 21:08:31.338] ==============================
[16/08/2015 21:08:31.338] 
[16/08/2015 21:08:31.360] 
[16/08/2015 21:08:31.360] ==============================
[16/08/2015 21:08:31.360] UNHANDLED EXCEPTION OCCURRED
[16/08/2015 21:08:31.360] ------------------------------
[16/08/2015 21:08:31.360] Origin: HOOK
[16/08/2015 21:08:31.360] ------------------------------
[16/08/2015 21:08:31.360] Exception type: System.NullReferenceException
[16/08/2015 21:08:31.360] Exception message: Object reference not set to an instance of an object.
[16/08/2015 21:08:31.360] ------------------------------
[16/08/2015 21:08:31.360] Inner exceptions:
[16/08/2015 21:08:31.360] ------------------------------
[16/08/2015 21:08:31.360] Stack trace:
[16/08/2015 21:08:31.360] at ?.?()
[16/08/2015 21:08:31.360] at ?.?.?()
[16/08/2015 21:08:31.360] at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[16/08/2015 21:08:31.360] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
[16/08/2015 21:08:31.360] at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
[16/08/2015 21:08:31.360] at System.Threading.ThreadHelper.ThreadStart()
[16/08/2015 21:08:31.360] ==============================
[16/08/2015 21:08:31.360] 

 

 

Well, thats to be expected if you call a million backup units, I've called about 20/30 and it works fine for me.

f5206360dd4e4e316b6c1f56c39f20d3.png

 

My Railmiles statistics: https://generic.railmiles.me/

I live in the UK. This means I will respond the most from 3-11pm BST/GMT. Do not contact for support here or through Discord.
Discord: generic train man#7633 --------------- Youtube: The Starmix

Well, thats to be expected if you call a million backup units, I've called about 20/30 and it works fine for me.

[16/08/2015 21:08:31.298] LSPD First Response: PlayExternalSound: IO error while opening wave stream from D:\SteamLibraryHDD\steamapps\common\Grand Theft Auto V\LSPDFR\Police Scanner\RESIDENT\NOISE_LOOP_01.wav. File already in use?

 

This is caused by the script file locking sound files when playing them. Shouldn't common files be loaded into memory instead of being read 1000 times off the disk? It still shouldn't crash on a file lock read error, it should continue without a siren. 

 

"I've called about 20/30 and it works fine for me."

Depends how fast your disk is really. If its slower it'll take longer to read which means a higher chance of getting a file lock error. It could also just be bad luck... either way it's super easy to fix.

Edited by Brandan

[16/08/2015 21:08:31.298] LSPD First Response: PlayExternalSound: IO error while opening wave stream from D:\SteamLibraryHDD\steamapps\common\Grand Theft Auto V\LSPDFR\Police Scanner\RESIDENT\NOISE_LOOP_01.wav. File already in use?

 

This is caused by the script file locking sound files when playing them. Shouldn't common files be loaded into memory instead of being read 1000 times off the disk? It still shouldn't crash on a file lock read error, it should continue without a siren. 

 

"I've called about 20/30 and it works fine for me."

Depends how fast your disk is really. If its slower it'll take longer to read which means a higher chance of getting a file lock error. It could also just be bad luck... either way it's super easy to fix.

I already know that locking up sound files won't crash the game, but this is the same situation as the LCPDFR Taser.

f5206360dd4e4e316b6c1f56c39f20d3.png

 

My Railmiles statistics: https://generic.railmiles.me/

I live in the UK. This means I will respond the most from 3-11pm BST/GMT. Do not contact for support here or through Discord.
Discord: generic train man#7633 --------------- Youtube: The Starmix

[16/08/2015 21:08:31.298] LSPD First Response: PlayExternalSound: IO error while opening wave stream from D:\SteamLibraryHDD\steamapps\common\Grand Theft Auto V\LSPDFR\Police Scanner\RESIDENT\NOISE_LOOP_01.wav. File already in use?

This is caused by the script file locking sound files when playing them. Shouldn't common files be loaded into memory instead of being read 1000 times off the disk? It still shouldn't crash on a file lock read error, it should continue without a siren. 

That is not a standard .NET exception message, that was an exception that was explicitly caught by LSPDFR. It would not cause the entire game to crash.

And its actually better to read the file off the disk rather than memory. The CPU is more than capable of loading a 20kb audio file from the hard disk. Remember, GTA V (as well as Windows) is very picky about memory management. You don't want to waste memory by unnecessarily preloading resources that you are not going to use very often. Even if you did, what happens when GTA or Windows garbage-collects that memory bank? You'll get an exception because you're trying to access an invalid section of memory.

And by the way, if you hit that file in memory repeatedly, you could still potentially get "already in use" exceptions.

I already know that locking up sound files won't crash the game, but this is the same situation as the LCPDFR Taser.

Actually, it's possible for a locked file to crash the game. I don't think that is what happened in this case, but it is possible. The file was locked by the operating system, and the program tried to access it again. It couldn't, so it threw up it's hands and said "Well, f*** this!!".

That being said, even though that exception was logged, it doesn't mean that the audio file being locked is the sole cause of the crash.

After that error, a NullReferenceException was logged, which in English, means "You gave me an object for me to do something with, but there's nothing in it." It does not say what it was trying to access, but one might think it was the audio file.

That would have been my initial guess, but since the audio error was logged, its obvious that LSPDFR caught the error (and logged it) before it crashed the entire script. Once you catch an error, there is no need to try and execute the next step anyway, as that defeats the whole purpose of catching the error in the first place.

My guess is, he overloaded the script too much, and so the game crashed.

Is this a "bug"? Sure, maybe, if we were talking about commercial software. But in what situation are you going to call a million backup units in? I doubt even GTA V in itself was designed to have that many objects in memory. If it was me, this would be pretty low on the priority list, frankly.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Even if you did, what happens when GTA or Windows garbage-collects that memory bank? You'll get an exception because you're trying to access an invalid section of memory.

And by the way, if you hit that file in memory repeatedly, you could still potentially get "already in use" exceptions.

I forgot this was built in .NET and not C/C++, if it was in C++/C there shouldn't ever be "already in use" or garbage collection when reading a memory buffer. If so you're doing something wrong.

Is this a "bug"? Sure, maybe, if we were talking about commercial software. But in what situation are you going to call a million backup units in? I doubt even GTA V in itself was designed to have that many objects in memory. If it was me, this would be pretty low on the priority list, frankly.

Yes absolutely, either limit the amount of backup units that can spawn or code to handle it using hash tables/BSTs etc. However, you are right it is low priority. The CPU is more than capable, but a thing to note is hard drives are not especially if they're older.

70% of programming is figuring out how the user will break it, spawning a million units is one of them.

I'm not sure what tools  .NET has to fix this problem (being a C++ programmer) but I assume they have something for large operations. 

Edited by Brandan

  • Author

That is not a standard .NET exception message, that was an exception that was explicitly caught by LSPDFR. It would not cause the entire game to crash.

And its actually better to read the file off the disk rather than memory. The CPU is more than capable of loading a 20kb audio file from the hard disk. Remember, GTA V (as well as Windows) is very picky about memory management. You don't want to waste memory by unnecessarily preloading resources that you are not going to use very often. Even if you did, what happens when GTA or Windows garbage-collects that memory bank? You'll get an exception because you're trying to access an invalid section of memory.

And by the way, if you hit that file in memory repeatedly, you could still potentially get "already in use" exceptions.

Actually, it's possible for a locked file to crash the game. I don't think that is what happened in this case, but it is possible. The file was locked by the operating system, and the program tried to access it again. It couldn't, so it threw up it's hands and said "Well, f*** this!!".

That being said, even though that exception was logged, it doesn't mean that the audio file being locked is the sole cause of the crash.

After that error, a NullReferenceException was logged, which in English, means "You gave me an object for me to do something with, but there's nothing in it." It does not say what it was trying to access, but one might think it was the audio file.

That would have been my initial guess, but since the audio error was logged, its obvious that LSPDFR caught the error (and logged it) before it crashed the entire script. Once you catch an error, there is no need to try and execute the next step anyway, as that defeats the whole purpose of catching the error in the first place.

My guess is, he overloaded the script too much, and so the game crashed.

Is this a "bug"? Sure, maybe, if we were talking about commercial software. But in what situation are you going to call a million backup units in? I doubt even GTA V in itself was designed to have that many objects in memory. If it was me, this would be pretty low on the priority list, frankly.

Its happening all of the time now, even if i call two units or in a pursuit with two people, its only crashing the plugin now it's really weird, its this mainly now

[19/08/2015 15:52:48.149] LSPD First Response: ==============================
[19/08/2015 15:52:48.149] LSPD First Response: UNHANDLED EXCEPTION DURING GAME THREAD TICK
[19/08/2015 15:52:48.149] LSPD First Response: ------------------------------
[19/08/2015 15:52:48.149] LSPD First Response: Origin: Game fiber "<UNNAMED THREAD>".
[19/08/2015 15:52:48.149] LSPD First Response: ------------------------------
[19/08/2015 15:52:48.149] LSPD First Response: Exception type: Rage.Exceptions.InvalidHandleableException
[19/08/2015 15:52:48.149] LSPD First Response: Exception message: Operation is not valid because this Rage.Ped is invalid.
[19/08/2015 15:52:48.149] LSPD First Response: ------------------------------
[19/08/2015 15:52:48.149] LSPD First Response: Inner exceptions:
[19/08/2015 15:52:48.149] LSPD First Response: ------------------------------
[19/08/2015 15:52:48.149] LSPD First Response: Stack trace:
[19/08/2015 15:52:48.164] LSPD First Response: at Rage.Ped.set_Voice(String value)
[19/08/2015 15:52:48.164] at LSPD_First_Response.Engine.Scripting.Entities.Persona.?()
[19/08/2015 15:52:48.164] at LSPD_First_Response.Engine.Scripting.Entities.Persona..ctor(Ped A_0)
[19/08/2015 15:52:48.164] at ?..ctor(UInt32 A_0)
[19/08/2015 15:52:48.164] at ?.?(UInt32 A_0)
[19/08/2015 15:52:48.164] at ?.?(Ped A_0)
[19/08/2015 15:52:48.164] at LSPD_First_Response.ArrestManager.?()
[19/08/2015 15:52:48.164] at LSPD_First_Response.ArrestManager.?()
[19/08/2015 15:52:48.164] at Rage.GameFiber.Main()
[19/08/2015 15:52:48.164] LSPD First Response: ==============================
[19/08/2015 15:52:48.164] LSPD First Response: 

 

[16/08/2015 21:08:31.298] LSPD First Response: PlayExternalSound: IO error while opening wave stream from D:\SteamLibraryHDD\steamapps\common\Grand Theft Auto V\LSPDFR\Police Scanner\RESIDENT\NOISE_LOOP_01.wav. File already in use?

 

This is caused by the script file locking sound files when playing them. Shouldn't common files be loaded into memory instead of being read 1000 times off the disk? It still shouldn't crash on a file lock read error, it should continue without a siren. 

 

"I've called about 20/30 and it works fine for me."

Depends how fast your disk is really. If its slower it'll take longer to read which means a higher chance of getting a file lock error. It could also just be bad luck... either way it's super easy to fix.

My HHD speed is 7500RPM 

Edited by officerAMR

 

I forgot this was built in .NET and not C/C++, if it was in C++/C there shouldn't ever be "already in use" or garbage collection when reading a memory buffer. If so you're doing something wrong.

Oh yeah, I'm sure you can do it in .NET. But any time this subject has come up in any job I've worked, we steered away from keeping files in memory. Simply because the computer has more than enough resources to handle it, and it conserves memory that may be wasted.

 

Yes absolutely, either limit the amount of backup units that can spawn or code to handle it using hash tables/BSTs etc. However, you are right it is low priority. The CPU is more than capable, but a thing to note is hard drives are not especially if they're older.

70% of programming is figuring out how the user will break it, spawning a million units is one of them.

I'm not sure what tools  .NET has to fix this problem (being a C++ programmer) but I assume they have something for large operations. 

Oh yeah, of course you can do this. I'm not sure what LMS and Sam have done, but it may have been low on the priority list for them, too. Or the issue may be something else, since its happening all the time for him now.

Its happening all of the time now, even if i call two units or in a pursuit with two people, its only crashing the plugin now it's really weird, its this mainly now

What version of RPH are you running?

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

  • Author

Oh yeah, I'm sure you can do it in .NET. But any time this subject has come up in any job I've worked, we steered away from keeping files in memory. Simply because the computer has more than enough resources to handle it, and it conserves memory that may be wasted.

Oh yeah, of course you can do this. I'm not sure what LMS and Sam have done, but it may have been low on the priority list for them, too. Or the issue may be something else, since its happening all the time for him now.

What version of RPH are you running?

v22

Its happening all of the time now, even if i call two units or in a pursuit with two people, its only crashing the plugin now it's really weird, its this mainly now

Hidden Content

 

My HHD speed is 7500RPM 

The max speed is 7500RPM, It will never be 7500RPM and the disk could have been being used heavily by the OS at that point. The rate of HDD failure is exponential so after 3-4 years the chance of an HDD failure is very high depending on the use. 

 

"Its happening all of the time now," I've had this happen when I called like 20 backup units, I didn't check the log so I can't confirm. I can confirm my disk was inactive because the only thing on that disk was GTA V. I'm not going to put a 70 Gb game on my SSDs.

 

Oh yeah, I'm sure you can do it in .NET. But any time this subject has come up in any job I've worked, we steered away from keeping files in memory. Simply because the computer has more than enough resources to handle it, and it conserves memory that may be wasted.

Well that depends on what you're trying to do with the file. If you're going to use the file once per draw (60 times a second) then it should be in memory. If you're going to use it every now and then (maybe like the siren) it might make more sense to keep it in file form. But if the file loading fails you shouldn't execute the play functions or whatever's making the null error.

 

Unless you're building a game the chances you'll need to keep a file in memory (or VRAM) is low. 

 

 

  • Author
 

The max speed is 7500RPM, It will never be 7500RPM and the disk could have been being used heavily by the OS at that point. The rate of HDD failure is exponential so after 3-4 years the chance of an HDD failure is very high depending on the use. 

 

"Its happening all of the time now," I've had this happen when I called like 20 backup units, I didn't check the log so I can't confirm. I can confirm my disk was inactive because the only thing on that disk was GTA V. I'm not going to put a 70 Gb game on my SSDs.

 

To me it seems like LSPDFR can draw the sound file more then once in rapid succession, my HDD is a few months old and it works perfectly, i load into a match of Bf3 with the SSD guys. It may just be a LSPDFR bug with multiple units 

 

 

I should of explained a bit better, its crashing when theres more then 2 suspects and more cars, if both try to use the file at the same time= crash, though now its just a LSPDFR crash

Edited by officerAMR

Similar Content

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.