Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Game crash if an older preset from before v4.2.6 is loaded #124

Open
ArlEamon opened this issue Jul 26, 2024 · 55 comments
Open

[BUG]: Game crash if an older preset from before v4.2.6 is loaded #124

ArlEamon opened this issue Jul 26, 2024 · 55 comments
Labels
bug Something isn't working

Comments

@ArlEamon
Copy link

Which Mod?

Cluster Generation Manager [Vanilla/DLC]

Description of the bug/crash

Getting "MISSING.STRINGS.UI.CGMEXPORT_SIDEMENUS.PRESETWINDOW.CGM....." when I select a preset. (error code continues but does not fit into the screen.)

When I press apply I get a crash. (Not all presets crash though)

Steps To Reproduce

Choose an older preset. You will get the error on preset selection screen. Not all presets give this error. When you get an error with the preset try to apply it. You will get a crash.

Player.log

Player-prev.log

@ArlEamon ArlEamon added the bug Something isn't working label Jul 26, 2024
@ArlEamon
Copy link
Author

Also crash log is here

NullReferenceException: Object reference not set to an instance of an object

ClusterTraitGenerationManager.ClusterData.CGSMClusterManager+<>c.b__40_0 (ClusterTraitGenerationManager.ClusterData.StarmapItem item) (at :0)
System.Linq.EnumerableSorter2[TElement,TKey].ComputeKeys (TElement[] elements, System.Int32 count) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.EnumerableSorter1[TElement].ComputeMap (TElement[] elements, System.Int32 count) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.EnumerableSorter1[TElement].Sort (TElement[] elements, System.Int32 count) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.OrderedEnumerable1[TElement].SortedMap (System.Linq.Buffer1[TElement] buffer) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.OrderedEnumerable1[TElement].ToList () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) ClusterTraitGenerationManager.ClusterData.CGSMClusterManager.GenerateClusterLayoutFromCustomData (System.Boolean log) (at <d4af71eb3fb245f9b075641ae8598178>:0) ClusterTraitGenerationManager.ClusterData.CGSMClusterManager.get_GeneratedLayout () (at <d4af71eb3fb245f9b075641ae8598178>:0) ClusterTraitGenerationManager.UI.SO_StarmapEditor.StarmapToolkit.RebuildGrid () (at <d4af71eb3fb245f9b075641ae8598178>:0) ClusterTraitGenerationManager.UI.Screens.CGM_MainScreen_UnityScreen.ResetSOStarmap (System.Boolean reset) (at <d4af71eb3fb245f9b075641ae8598178>:0) ClusterTraitGenerationManager.UI.Screens.CGM_MainScreen_UnityScreen.RebuildStarmap (System.Boolean reset) (at <d4af71eb3fb245f9b075641ae8598178>:0) ClusterTraitGenerationManager.UI.Screens.CGM_MainScreen_UnityScreen.<InitializeItemSettings>b__177_22 () (at <d4af71eb3fb245f9b075641ae8598178>:0) ClusterTraitGenerationManager.UnityPresetScreen.<Init>b__39_2 () (at <d4af71eb3fb245f9b075641ae8598178>:0) UtilLibs.UIcmp.FButton.OnPointerUp (UnityEngine.EventSystems.PointerEventData eventData) (at <d4af71eb3fb245f9b075641ae8598178>:0) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerUpHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <e9635660f69b4d9d84c085aeda3be353>:0) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction1[T1] functor) (at :0)
UnityEngine.EventSystems.EventSystem:Update()

Build: U52-623711-SCD

@Sgt-Imalas
Copy link
Owner

are there random planets in these presets that crash?

@ArlEamon
Copy link
Author

ArlEamon commented Jul 26, 2024

@ArlEamon
Copy link
Author

No. There aren't any random planets.

@ArlEamon
Copy link
Author

I have deletes one of the presets.

There is a strange behaviour. After I get the error when selecting one of the broken ones, if I select a working one it gives an error too; but works.

@ArlEamon
Copy link
Author

I should also point out that all of the broken presets have Ceres Minor as Outer Asteroid.

I have older presets without Ceres Minor and they are working.

@Sgt-Imalas
Copy link
Owner

the one in your log seems to be missing SmallOilySwampOuter, which is an outer variant of SmallWarpOilySwamp.

@Sgt-Imalas
Copy link
Owner

it is missing, because apparently Klei removed it from the Terra Cluster recently, leading to it no longer getting loaded into the game

@ArlEamon
Copy link
Author

LOL. So they won't work no matter what you do.

@Sgt-Imalas
Copy link
Owner

Sgt-Imalas commented Jul 26, 2024

the asteroid is still there, I can force the game to still load it (like with that one variant of moonlet)

@Sgt-Imalas
Copy link
Owner

this might or might not be something that broke with either last nights hotfix or the frosty planet release and it just did not trigger until now

@ArlEamon
Copy link
Author

I checked and yes it is not there anymore as a selectable asteroid. Only the normal sized one is there.

@ArlEamon
Copy link
Author

this might or might not be something that broke with either last nights hotfix or the frosty planet release and it just did not trigger until now

It was there until last nights update I think. Because I created these presets after Fosty Pack. They all have Ceres Minor.

I thought it was something to do with that asteroid, but it doesn't seem to be the case

@ArlEamon
Copy link
Author

ArlEamon commented Jul 26, 2024

I don't think; I am sure. Because I recreated the same preset from the beginning while testing the previous bug.

@ArlEamon
Copy link
Author

I think you don't have to work for it; if it is already removed.

But if you like to do so; I won't say no don't do it. :)

@Sgt-Imalas
Copy link
Owner

it is not removed (from the files at least)

but the game only loads asteroids that are present in at least one cluster
(for that reason there is also one moonlet variant from the moonlet starts that is in the files, but not loaded)

@Sgt-Imalas
Copy link
Owner

So I'll have to force the game to load the asteroid again (and add better "missing asteroids" handling)

@ArlEamon
Copy link
Author

Yes it would of course be better to have that included in the mod.

@Sgt-Imalas
Copy link
Owner

MiniMetallicSwampyWarp is the one not loaded by default

@ArlEamon
Copy link
Author

It might be a game bug

@ArlEamon
Copy link
Author

Do you have any connection with klei

@Sgt-Imalas
Copy link
Owner

it is by design (not good design, but still design)

since there is no moonlet cluster where metallic swampy is a teleporter asteroid

@Sgt-Imalas
Copy link
Owner

Do you have any connection with klei

sadly not

@ArlEamon
Copy link
Author

Ok then it's up to you if you work for it.

It is of course better to have a failsafe code in the mod. But also it is what it is. So you don't have to fix this. Because in the future there might be more dramatic changes to asteroids, which you would have to include every possible change in your code.

@ArlEamon
Copy link
Author

In patch notes it doesn't mention any of the asteroids removal. I still think this might be a bug.

@Sgt-Imalas
Copy link
Owner

the file has a note at the top:
"# Unused - Was used for VanillaSandstoneCluster"

@Sgt-Imalas
Copy link
Owner

oh.
and SmallRadioactiveLandingSite has met the same fate

@ArlEamon
Copy link
Author

So this was left in the game until sometime.

Then you shouldn't be working on a fix for this. This might get removed completely in the future; which would brake the mod again. (if you use those files of course)

@Sgt-Imalas
Copy link
Owner

I can readd those files over the mod in the future

@ArlEamon
Copy link
Author

What will happen when they get removed completely?

@ArlEamon
Copy link
Author

Oh I miss read. You are talking about putting those asteroid files into the mod.

@Sgt-Imalas
Copy link
Owner

in theory I can readd them as modded asteroids in CGM

@Sgt-Imalas
Copy link
Owner

but it might be better to instead add redirects for old presets

@ArlEamon
Copy link
Author

Redirects might be a better choice for now.

@ArlEamon
Copy link
Author

ArlEamon commented Jul 26, 2024

Or you might add a warning about removed asteroids instead of an error, and do not allow loading that preset. This way people would get notified about the missing asteroids and create new presets with existing asteroids.

This will save you from putting redirects every time an asteroid is removed.

@ArlEamon
Copy link
Author

Klei seems to be going after biome scrambling. This would also reduce the count of asteroids needed. You can get every type of biome on whichever asteroid you want with scrambling.

@Sgt-Imalas
Copy link
Owner

Sgt-Imalas commented Jul 26, 2024

thats my assumption as well - remove the "duplicate" smaller asteroid variant that was unfit for biome mixing

@ArlEamon
Copy link
Author

Yep. So what will yo do? Will you give a warning to change the preset; or try to redirect older asteroids?

@Sgt-Imalas
Copy link
Owner

both for now
redirect if possible + warning counter

@ArlEamon
Copy link
Author

Ok. Good luck then.

I will always be pleased to help you if I'm available. Don't bother to ask for help any time.

@ArlEamon
Copy link
Author

ArlEamon commented Jul 26, 2024

Still not working.

If I don't change anything from an older not working preset, I get this error.

Cluster Generation Manager - Bug in asteroid creation

I'm familiar with this error; it is caused by small asteroids; where the game cannot generate POI's because of lack of space.

After I got this error I changed that asteroids size to a standard and this time I got a crash. The crash occures after asteroid generation is complete when it says "Success! Space adventure awaits." on the generation screen.

Player-prev.log

crashlog.txt

zzzzz_Test_16D2E9.json

@Sgt-Imalas
Copy link
Owner

ah rip I forgot to add that override to starmap locations too

@ArlEamon
Copy link
Author

LOL. You need a full time tester. :)

@Sgt-Imalas
Copy link
Owner

and work with more sleep

@ArlEamon
Copy link
Author

Yep I need that too :)

@Sgt-Imalas
Copy link
Owner

here, that should fix it:
ClusterTraitGenerationManager_dev.zip

@ArlEamon
Copy link
Author

I can confirm that it is working with older presets.

Generation is consistent with geysers, POI's and plants (growth rate is different though)

@ArlEamon
Copy link
Author

Last nights modifications changed another thing.

Before last night when I changed a Space POI location in starmap; I was getting a different geyser generation. Tiles, POI's and plants were the same but geysers were changing. They were still consistent with preset load. So with same starmap, same seed, same planetoids; I was getting the exact same generation.

Now; if I change a space POI location in starmap; I always get the same geysers. Other things are also the same. Nothing changes at all.

Changing a space POI location was a quick geyser reroll technique for me with a desired (and of course the same) tile, POI and plant generation.

@Sgt-Imalas
Copy link
Owner

Sgt-Imalas commented Jul 27, 2024

that sounds like something weird with that afformentioned random on your system doing weird things, because they should not influence each other

@ArlEamon
Copy link
Author

So I should understand this as it wasn't supposed to be like that. Am I right?

@Sgt-Imalas
Copy link
Owner

yes

@ArlEamon
Copy link
Author

Sad. It was a usefull "feature" of a bug then. :)

Thanks for your work and time.

@Sgt-Imalas
Copy link
Owner

Sgt-Imalas commented Jul 27, 2024

its likely a similar thing (or the same thing) that caused presets on your machine to roll different geysers than the original world

@Sgt-Imalas
Copy link
Owner

the seeded random should have rolled identical, but it didnt

@ArlEamon
Copy link
Author

LOL I was really getting used to it. Trying to get a perfect generation with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants