I'm away from the computer, so I can't test or confirm anything at the moment, but here's everything I can think that I was doing in my games that caused problems.
I'm currently testing a Vayra bounty, and it is a module ship. However, the errors appeared before the bounty did.
Each time I spawned ships, I also added supplies, fuel, and crew, and repaired.
The first two times I got the error, I had spawned a couple Basilisks. Then, in a completely new save, I spawned only two Atlas, and the aforementioned supplies etc, before saving. And I got the same error. I repeated this twice in two new games.
The error was a popup, saying "Starship Legends has encountered an error, please let the mod author know." Below that was simply the word "null."
I can't recall using SetHullVariantId in any code I've written.
So, maybe it's a problem with my Vayra bounty? I will try disabling it and see if that helps.
EDIT: Okay, I've been testing. It's definitely something in the KT mod. I started by removing the Vayra bounty, then everything else I added over the past couple days. The error persists. Here's what it looks like for the record:
and it appears as soon as I quicksave, right after starting a fresh game.
The last release version of KT seems to work fine with SL, so I suppose I'll start with that and add things back in until I get the error.
EDIT2: Okay, I give up. I've tried re-implementing everything I had added to my draft mod into my released mod. No error, SL works just fine. So I have no clue what could have gone wrong.
I guess it means there's no problem - and sorry for the wild goose chase. Very strange overall. I'll be back if I start seeing these errors again.