[Resolved] The "Error: Object reference not set instance of object" ruins another scenario

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
stolypin
Posts: 240
Joined: Sun Dec 23, 2012 1:06 pm

[Resolved] The "Error: Object reference not set instance of object" ruins another scenario

Post by stolypin »

After, for the second time, spending nearly 8 hours playing a Mediterranean Fury scenario (and enjoying it immensely), I find I cannot continue because when I attempt to load a saved game, I get the message: "ERROR: Object reference not set to an instance of an object." That means that, after a major investment of time, I cannot finish the scenario. I get the message not only with the latest save, but with earlier saves as well (including every autosave).

Guys, I've been a major fan of Command for over 4 years but this pretty much kills it for me. With effectively no save function, the game is unplayable except for the tiniest scenarios.

This error has been reported repeatedly (including recently by me) and it definitely falls into the showstopper category. This has got to get fixed.

I'm using Version 1.01.11343. Save attached.
Attachments
problem.zip
(6.39 MiB) Downloaded 14 times
Dimitris
Posts: 15321
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by Dimitris »

We are sorry this issue seems to be persisting on you. I remember your original report and I was certain we had this one tamed. We'll investigate as priority.

Has anyone else experienced the same issue with the new version?
Dimitris
Posts: 15321
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by Dimitris »

Also: Is this happening to you only on this scenario specifically, or also with other scenarios?
stolypin
Posts: 240
Joined: Sun Dec 23, 2012 1:06 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by stolypin »

ORIGINAL: Dimitris

Also: Is this happening to you only on this scenario specifically, or also with other scenarios?

This is the only scenario in which it has happened but this is the only scenario I have attempted to play using the last four or five builds. Note that the forum reports the issue existing previously (going back to November as I recall).

Is there any way to repair the save? I am not up for starting over.
Dimitris
Posts: 15321
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by Dimitris »

Yes, I've managed to repair the save and we'll also prepare a test build with a (hopefully permanent) fix.
crazydunc
Posts: 9
Joined: Sat Aug 24, 2019 5:46 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by crazydunc »

Dimitris,

In case it helps, I also have this issue, attached is my save. Seems to happen in large scenarios, after time elapsed. My Setup saves still work. This is with 1134.3

I would be very interested in a method to repair my save if possible as well!
Dunc
Attachments
Caribbean..es1994.zip
(5.05 MiB) Downloaded 10 times
stolypin
Posts: 240
Joined: Sun Dec 23, 2012 1:06 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by stolypin »

ORIGINAL: Dimitris

Yes, I've managed to repair the save and we'll also prepare a test build with a (hopefully permanent) fix.


Thank you! This is a great scenario that I'm looking forward to finishing.
gennyo
Posts: 204
Joined: Wed Apr 03, 2019 8:08 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by gennyo »

Builds before 1134.3 kills my ultra-unrealistic scenario in auto save too.
But after I acquired 1134.3, I tried to rebuild my scenario using import units from inst files, not combining multiple scenarios with many presetup changes using "merge scenario" function.
It seems working well at this moment.
Hope this information helps in someway.

Addendum: Ok, just experienced my first OutOfMemory after update and ruined my 40+ hours IRL progress (my laptop is super slow).

FYI, some portion of this time is played without "Extra Memory Protection", I enable this option since C:MANO days, and it helps with memory management for my crazy scenarios. Before this, I counted for another 40+ hours without problem, unlike older builds.
Dimitris
Posts: 15321
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by Dimitris »

Okay, let's see.

The file problem_salvaged.zip contains a repaired copy of the save.
Attachments
problem_salvaged.zip
(6.21 MiB) Downloaded 21 times
Dimitris
Posts: 15321
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by Dimitris »

And the file Command.zip has an experimental build which _should_ prevent this problem form re-appearing.

Please give it a try and let us know.
Attachments
Command.zip
(5.74 MiB) Downloaded 20 times
stolypin
Posts: 240
Joined: Sun Dec 23, 2012 1:06 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by stolypin »

ORIGINAL: Dimitris

And the file Command.zip has an experimental build which _should_ prevent this problem form re-appearing.

Please give it a try and let us know.

Will do. Thank you so much!
stolypin
Posts: 240
Joined: Sun Dec 23, 2012 1:06 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by stolypin »

So far so good. Saved scenario is working and a newly-created save opened without a problem.
gennyo
Posts: 204
Joined: Wed Apr 03, 2019 8:08 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by gennyo »

this build seems fixed my problem too. thanks
stolypin
Posts: 240
Joined: Sun Dec 23, 2012 1:06 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by stolypin »

ORIGINAL: Dimitris

Thanks, that's a relief.

Not sure if it's related but I'm occasionally getting a message about autosave failing (with something about memory being insufficient). Once I get that message, I cannot do manual saves. Autosaves from before the message work but if I try to open an autosave generated after the message, I get the "Error: Object reference not set..." message.

My computer has 16 gig of RAM which I assume is sufficient.
gennyo
Posts: 204
Joined: Wed Apr 03, 2019 8:08 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by gennyo »

Personal Time:

According to my observation, It may fail to save after an OutOfMemory Exception, if it comes continously, much progress would be lost.
The root of this is the main program is 32-bit, so the max memory for it is around 3GB.
I don't know whether migrating to 64-bit would help, at this moment, "Extra Memory Protection" helps in my experience (but I'm not sure about heavy Lua usage as my scenarios are only with events)
At this moment, using this experiment build, I still hit the 3GB memory wall and crash around 6~24 hours of continous running, max lost of progress in autosave is about 100s in game time, average is about 10~20s.
For me this is acceptable, as CMANO sometimes lost more than 5 min and older builds destroys autosaves outstraight.
stolypin
Posts: 240
Joined: Sun Dec 23, 2012 1:06 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by stolypin »

ORIGINAL: gennyo

Personal Time:

According to my observation, It may fail to save after an OutOfMemory Exception, if it comes continously, much progress would be lost.
The root of this is the main program is 32-bit, so the max memory for it is around 3GB.
I don't know whether migrating to 64-bit would help, at this moment, "Extra Memory Protection" helps in my experience (but I'm not sure about heavy Lua usage as my scenarios are only with events)
At this moment, using this experiment build, I still hit the 3GB memory wall and crash around 6~24 hours of continous running, max lost of progress in autosave is about 100s in game time, average is about 10~20s.
For me this is acceptable, as CMANO sometimes lost more than 5 min and older builds destroys autosaves outstraight.

I have the "Extra Memory Protection" checked but am getting the OutofMemory Exception every 20 minutes or so. Again, once the error appears, saving the game is no longer possible. I have to exit the game and reload a save from before the error occurred.

Maybe the scenario I've been playing ("Mediterranean Fury 1, The Road to Byzantium") is simply too big for the game to handle.
gennyo
Posts: 204
Joined: Wed Apr 03, 2019 8:08 pm

RE: The "Error: Object reference not set instance of object" ruins another scenario

Post by gennyo »

Maybe you can try some "dirty trick"?
I also enable some compatible setting as followed.

Image
Attachments
Capture.jpg
Capture.jpg (36.81 KiB) Viewed 886 times
Post Reply

Return to “Tech Support”