Page 1 of 1

Generate Map Preview issue

Posted: Thu May 25, 2017 8:43 am
by Erik2
Sometimes when generating the map preview, this process will never finish and at some point you need to hit the No button.
This may cause the scenario to then fail loading into the editor.
I have attached such a scenario. It was close to finished so I hope it can be salvaged.
It was created as a mod, but the units.csv is currently just a duplicate of the official one.

Thanks

Edit: attached output.log

Re: Generate Map Preview issue

Posted: Thu May 25, 2017 9:23 am
by Horst
It possibly takes a very long while on giant maps. The button usually feels somewhat unresponsively when pressing that you don't know for sure if you have pressed it now or not. I tend to punch on "Yes" twice, just to be sure.

Re: Generate Map Preview issue

Posted: Thu May 25, 2017 10:47 am
by Erik2
This specific scenario is the 11th one in a series using the same map size. The scenarios are roughly the same unit-wise.
It loaded before I stupidly clicked yes to generate the preview, and then the damage was done.
But please let me know if you are able to load it :D

Re: Generate Map Preview issue

Posted: Thu May 25, 2017 10:56 am
by Horst
NullReferenceException: Object reference not set to an instance of an object
at FilesUnitsV045.ReadUnits (.Game game, System.IO.BinaryReader reader) [0x00000] in <filename unknown>:0
at FilesUnitsV045.Read (.Game game, System.IO.Stream stream, Int64 position) [0x00000] in <filename unknown>:0

The map seems to look for a new unit maybe which at least I do not have. That shouldn't have something to do with the preview pictures.
Be careful with changing that mod's units.csv. If you remove units or change IDs, the map won't load anymore. Maybe that map is KIA now if you can't restore all conditions anymore as they have been when creating the map.

Re: Generate Map Preview issue

Posted: Thu May 25, 2017 11:52 am
by Erik2
Thanks, Sherlock.

I have not used any non-official unit, so that is odd.