limoka / DSP-Mods

An example how to add a custom model with your mesh and animations
MIT License
33 stars 13 forks source link

[BUG] - Giga Stations throws errors with More MegaStructures mod #109

Open Umbrasong opened 1 month ago

Umbrasong commented 1 month ago

On loading the save file (mentioned in bug 107, https://file.io/zjJsTnn7cZYN ) I get a red error within 5 seconds. It is a different error than in that bug, however.

image

limoka commented 1 month ago

Why does it have to be so complicated, uh 😓 .Will look at it tomorrow.

limoka commented 1 month ago

May I ask what mods do you use? Specifically I found that the issue happens relating to a object with ProtoID of 9512, which I don't even know what is.

limoka commented 1 month ago

[Info :GigaStationsUpdated] Running somewhere in deep. This is: 2111, on factory: 66. Component is: 9512, factory: 105 [Info :GigaStationsUpdated] This has 12 slots, other has: 5. This has 12 locks, other has: 5 [Info :GigaStationsUpdated] I'm about to access 8! Fingers crossed! Then the exception occurs. Your save seems to only like get two errors.

Umbrasong commented 1 month ago

ohhh....so you finding 9512 is key, because: "Add 9512 Exchange Logistic Station to ItemProtoSet." Exchange Logistic Station is from MoreMegaStructures https://thunderstore.io/c/dyson-sphere-program/p/jinxOAO/MoreMegaStructure/ https://github.com/jinxOAO/DSPmod_MoreMegaStructures

I guess it's not listed in the red error because it doesn't patch that function, it's just adding a whole new freaking building.

Umbrasong commented 1 month ago

I run something like 57 mods, so generating a list is...non-trivial. I can try to attach an export from r2modman, but I think that didn't work last time I tried...let's see

attempting to attach Default_1726168118216.zip (no idea if it'll work or not)

Umbrasong commented 1 month ago

off-the-cuff theory: station logic has been changing in patches (I believe, there seem new errors related to it recently, at least), perhaps MMS uses an older version...which would mean accounting for the possibility of both, unless MMS gets patched (assuming that's even the issue)...

limoka commented 1 month ago

Thank you for the info. Unfortunately my time today ran out, so I will have to look at this later. Given this issue seems to be occurring not every tick and that it seems to involve another mod, I will probably take some time before I determine the cause and fix (hopefully) the bug.

Umbrasong commented 1 month ago

entirely fair, thanks for looking into it

Umbrasong commented 1 month ago

a couple random thoughts that may (or may not( be helpful:

  1. I believe the Exchange stations only have 4 slots, not 5 or 12 (12, I believe, is a giga-ILS)
  2. Products in them may periodically 'disappear' as they are provided into the Interstellar Assembly (dyson sphere factory). No idea if that could cause a race condition or similar
Umbrasong commented 1 month ago
1. I believe the Exchange stations only have 4 slots, not 5 or 12 (12, I believe, is a giga-ILS)

nope, I'm wrong, they have 5...I just always have warpers in the 5th, so I forget about it

dodexahedron commented 1 month ago

I'm seeing the same stack traces as in the initial post, as well.

They appear to happen about once per second or so.

Kubis88 commented 1 month ago

I got same error several times today, I believe it's caused by building regular interstellar station, then upgrading it to giga station, and setting 6+ slot to demand. Some part of the code probably still has 5-sized array for items that was initialized when building the regular station and wasn't enlarged with the upgrade action.

Umbrasong commented 1 week ago

I don't know if it helps, or if you've already seen the response, but jinxOAO responded on the issue I opened over for MoreMegaStructures: I'm sorry, I've checked the vanilla StationComponent code, seems the error is at stationComponent3.priorityLocks. It is inited from prefabDesc.stationMaxItemKindswhich is 5 by default. I don't think I've patched/changed that, nor the other StationComponent's methods. The interstellar assembly simply patches the GameData.GameTickrather than StationComponent. So I don't find the reason. Is it possible that the Gigastations code don't know that my mod added a new station, so that it won't check that, and, maybe treated my station as a giga station?

dodexahedron commented 6 days ago

That looks like a good hypothesis to me.

Have you tried removing the interstellar assembly stations to see if the errors stop happening once they're all gone?

Or I wonder if maybe grouping them to isolate the stations from each mod so that vessels and bots will not try to use both types of stations would also avoid the problem as a temporary workaround, perhaps? 🤔