bongotastic / Headlines

Dwarf fortress meets RP-1 (KSP/RSS/RO). Focusing on reputation management and life trajectory of crew members.
Other
5 stars 1 forks source link

Scheduler update null reference #104

Closed DegenerateGroundState closed 3 years ago

DegenerateGroundState commented 3 years ago

Getting the following null reference hundreds of times per second:

[Headlines] Scheduler update

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[Headlines] Triggering HMM Erica Bell@role_Scientist

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[Headlines] HMM Erica Bell@role_Scientist fires accelerate_research

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

NotSupportedException: The invoked member is not supported in a dynamic module.
  at System.Reflection.Emit.AssemblyBuilder.GetExportedTypes () [0x00006] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0 
  at ExceptionDetectorUpdated.ExceptionDetectorUpdated.GetStackInfo (System.String stackLine) [0x000e1] in <46d7759f9f344950b521d107705a88f5>:0 
  at ExceptionDetectorUpdated.ExceptionDetectorUpdated.HandleLogEntry (System.String condition, System.String stackTrace, UnityEngine.LogType logType) [0x0020a] in <46d7759f9f344950b521d107705a88f5>:0 
  at (wrapper delegate-invoke) <Module>.invoke_void_string_string_LogType(string,string,UnityEngine.LogType)
  at UnityEngine.Application.CallLogCallback (System.String logString, System.String stackTrace, UnityEngine.LogType type, System.Boolean invokedOnMainThread) [0x0002a] in <5aeafee3fea24f37abd1315553f2cfa6>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

(Filename: <ad04dee02e7e4a85a1299c7ee81c79f6> Line: 0)

NullReferenceException: Object reference not set to an instance of an object
  at RPStoryteller.StoryEngine.SchedulerUpdate (System.Double currentTime) [0x00167] in <40dbce9a44ba4557ba4cb7012b51a0fa>:0 
  at RPStoryteller.StoryEngine.Update () [0x00128] in <40dbce9a44ba4557ba4cb7012b51a0fa>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

(Filename: <40dbce9a44ba4557ba4cb7012b51a0fa> Line: 0)

SchedulerNullRef.zip

Gamedata:

000_ClickThroughBlocker
000_FilterExtensions
000_FilterExtensions_Configs
000_Harmony
000_KSPBurst
000_TexturesUnlimited
001_ToolbarControl
AJE
AnyRes
ASET
AtmosphereAutopilot
B9PartSwitch
B9_Aerospace_ProceduralWings
BahaConstellation
BahaSP
Bluedog_DB
CanaveralPads
CommunityCategoryKit
CommunityResourcePack
ConfigurableStart
ConformalDecals
ContractConfigurator
CustomBarnKit
CustomPreLaunchChecks
DeadlyReentry
DistantObject
DMagicScienceAnimate
EditorExtensionsRedux
EngineGroupController
EnvironmentalVisualEnhancements
ExceptionDetectorUpdated
FASA
FerramAerospaceResearch
Firespitter
FlagPack
FMRS
FP_DPSoundFX
FShangarExtender
Headlines
HeapPadder
HullCameraVDS
JanitorsCloset
JSI
KatnisssPartsPack
Kerbalism
KerbalismConfig
KerbalJointReinforcement
KerbalKonstructs
KerbalRenamer
Kopernicus
kOS
kOS-SCANsat
KSCSwitcher
KSPWheel
MagiCore
MechJeb2
ModularFlightIntegrator
ModularLaunchPads
NavyFish
NearFutureConstruction
NearFutureProps
NearFuturePropulsion
NearFutureSolar
OSSNTR
PatchManager
PlanetShine
Principia
ProceduralFairings
ProceduralParts
ProjectManager
RCSBuildAid
RealAntennas
RealChute
RealFuels
RealHeat
RealismOverhaul
RealPlume
RealScaleBoosters
RealSolarSystem
RecoveryController
ReStock
ReStockPlus
RetractableLiftingSurface
RN_Skylab
ROCapsules
ROEngines
ROLib
ROSolar
ROTanks
RP-0
RP-1-ExpressInstall
RP-1-ExpressInstall-Graphics
RSS-CanaveralHD
RSS-Textures
RSSDateTime
RSSVE
SCANsat
scatterer
Shabby
ShipManifest
SimpleAdjustableFairings
SmartParts
SmokeScreen
SolverEngines
SpaceTuxLibrary
Squad
SquadExpansion
StagedAnimation
StationPartsExpansionRedux
StationPartsExpansionReduxIVAs
SXT
Taerobee
TestFlight
TextureReplacer
TriggerTech
TundraSpaceCenter
United States Flag Pack v2
VanguardTechnologies
VenStockRevamp
Waterfall
World-Airforce-Insignia
ZeroMiniAVC
DegenerateGroundState commented 3 years ago

screenshot2

bongotastic commented 3 years ago

Thanks, I think that I know what it going on. Would you mind attaching your persistent.sls, or pasting below the section with the SCENARIO nodes named PeopleManager and StoryEngine.

DegenerateGroundState commented 3 years ago

You mean in addition to the quicksave in the file I attached? After I posted the issue I manually fixed the issue by text editing out every mention of the kerbal in question from my persistent file. It seems the kerbal was an applicant that I didn't hire.

bongotastic commented 3 years ago

I missed the zip file, my apologies. That you fixed like this confirms my suspicion. Erica Bell died/retired or did you let her go? I will remove kerbals that do not exist in KSP anymore, but I'm curious as to why Headlines didn't catch them leaving.

She withdrew her application after having been a crew. So, unless you let her go, KSP did something strange to her.

DegenerateGroundState commented 3 years ago

I believe they were an applicant that I didn't hire and later withdrew their application. I have walk in applications turned on if that matters.

DegenerateGroundState commented 3 years ago

She withdrew her application after having been a crew. So, unless you let her go, KSP did something strange to her.

Weird. Maybe they were automatically added to a KCT simulated flight when I didn't have any other crew available. I'll try and notice if something like this happens again.

bongotastic commented 3 years ago

Interesting, I'll have this fixed and released as v0.4.7.2 tonight or tomorrow. I appreciate your issue report! I think that simulated flights may be a cause and headlines sees a new crew and builds a personnel file for it.

bongotastic commented 3 years ago

@DegenerateGroundState , v0.4.7.2 should hit CKAN in a few hours. Thanks for your issue report. Although I can't reproduce the circumstances, Headlines systematically deletes random processes not attached to KSP entities. This should make the issue go away.