Icinga agent on Windows Server 2012 fails to start after updates

I am running Icinga 2 and only have 1 windows agent (the rest are Linux based). My one windows agent has been working fine on a Windows 2012 server. However, after some recent Windows security updates the service fails to start with the error:

The Icinga 2 service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.

I have tried re-configuring Icinga and even tried fully uninstalling and reinstalling it, however I still get the same error. I checked the event logs and the error that I get there is:

critical/cli: Failed to restore state file: Error: Invalid NetString (missing : )

Has anyone else encountered or is experiencing this? Please keep in mind that the Icinga agent was working just fine up until a couple of days ago.

We had some reports on corrupted state files after an unclean shutdown on Windows. You can have a look at the state file (C:\ProgramData\icinga2\var\lib\icinga2/icinga2.state) with a text editor. It should look like many repeated instances of 1234:{"json":"formatted data"},. But since that file is in a corrupt state, deleting it is probably the only option right now.

For reference, the issue on GitHub: Verify consistency guarantees of file operations on Windows · Issue #8840 · Icinga/icinga2 · GitHub

Simply deleting the state file allowed me to start the agent service. Thanks!