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.

LCPDFR Crash: System.InvalidCastException

Featured Replies

I was playing LCPDFR today after installing the 1.0b hotfix and I ended up having the first crash I've had in a while. I was aiming at a suspect who had drawn a gun at me and was shooting at me while I was trying to arrest him. The game suddenly froze and after several seconds crashed to the desktop with no error message. I checked all the log files to see what happened and the LCPDFR log file said to report this issue, so that's what I'm doing. Here are the parts of the log files starting with the LCPDFR log file: (Note the crash occurred at 1:55:30 PM)

 

[WARNING - 1:53:00 PM] [script.Lights] Process: Not a valid police vehicle, hence siren manager instance is missing. Forcing creation


[ERROR - 1:55:30 PM] [Main] CRITICAL ERROR DURING MAINLOOP! REPORT THIS ISSUE AT LCPDFR.COM BY INCLUDING THIS LOGFILE.
[ERROR - 1:55:30 PM] [] System.InvalidCastException: Unable to cast object of type 'freval_70' to type 'freval_90'.
at freval_238.eval_fr0(freval_82 A_0, Boolean A_1)
at freval_55.eval_3.eval_fr0()
at freval_55.eval_3.eval_fr0(Object[] A_0)
at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()
at LCPD_First_Response.Engine.Main.fr2()

 

The Advanced Hook log file:

[iNFO - 13:55:30] An exception occured


[iNFO - 13:55:30]
Process: FFC10000

Address: 7511C41F (¬êë”'k)

Code: E0434352

Registerdump - EAX: 5A54E9F0 EBP: 5A54EA40 EBX: 5 ECX: 5 EDI: 1 EDX: 0 EIP: 7511C41F ESI: 5A54EAB0 ESP: 5A54E9F0

 

And the ScriptHookDotNet log file:

2014-04-20 13:55:30 - Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'freval_70' to type 'freval_90'.


at freval_238.eval_fr0(freval_82 A_0, Boolean A_1)
at freval_55.eval_3.eval_fr0()
at freval_55.eval_3.eval_fr0(Object[] A_0)
at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()
at LCPD_First_Response.Engine.Main.fr2()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
2014-04-20 13:55:30 - CRASH!
2014-04-20 13:55:30 - Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'freval_70' to type 'freval_90'.
at freval_238.eval_fr0(freval_82 A_0, Boolean A_1)
at freval_55.eval_3.eval_fr0()
at freval_55.eval_3.eval_fr0(Object[] A_0)
at LCPD_First_Response.Engine.Timers.DelayedCaller.fr0()
at LCPD_First_Response.Engine.Main.fr2()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
2014-04-20 13:55:30 - CRASH!

 

My guess is that it's just a bug, but I'm not sure though. Hope you guys can help.

 

Just found out that this appears to be very similar to another known issue: "System.InvalidCastException: Unable to cast object of type 'freval_77' to type 'freval_89" but they are not the same issue though. I guess it must be a bug.

Edited by bucky16

I see you have the freval error in there. The freval error was fixed for some users by doing this: Open up your LCPDFR.ini, look under "Main", it should look something like this by default:

[Main]
AdditionalCopCarModels=
SuspectTransporterModels=POLICE;POLICE2;PSTOCKADE;
VehicleTrunkWeapons=Shotgun_Baretta;
AllTextMode=False
AmbientScenariosMaximum=2
AmbientScenariosMultiplier=250
DepartmentName=Liberty City Police Department
DepartmentShortName=LCPD
FirstStart=True
UsingPoliceStationMod=False

Now, add to the bottom of that part

PreloadAllModels=True
The "Main" part should now look like this:

[Main]
AdditionalCopCarModels=
SuspectTransporterModels=POLICE;POLICE2;PSTOCKADE;
VehicleTrunkWeapons=Shotgun_Baretta;
AllTextMode=False
AmbientScenariosMaximum=2
AmbientScenariosMultiplier=250
DepartmentName=Liberty City Police Department
DepartmentShortName=LCPD
FirstStart=True
UsingPoliceStationMod=False
PreloadAllModels=True

Invenio, Investigatio, Imperium

This is a support topic.
Only reply here to offer help or assistance to bucky16. Off-topic or "me too" replies will be removed.

Need support yourself? Make a new topic instead.

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.