What you were doing at the time - Building vessels with pre-fabbed components
Conventional or TN start - Conventional, with 20k starting RP used to unlock TN tech and a handful of other technologies.
Random or Real Stars - Random
Is the bug is easy to reproduce, intermittent or a one-off? - Should be relatively easy to reproduce.
If this is a long campaign - say 75 years or longer - let me know the length of the campaign as well - Done with a brand-new start that hadn't incremented yet.
Construction Cycle is 86000s
I've discovered that if you construct a vessel with pre-fabricated components, the setting appears to cause a sort of phantom effect in certain circumstances that allows you to build vessels with significantly reduced mineral costs (including entirely omitting them for some minerals)
The test I performed was to design an engine, any engine (In this instance I used Nuclear Thermal engine tech, 100% power). I then designed a ship that used that engine, slapping 20 engines on. Removing any other items that consumed gallicite, I then had a cost of exactly 2000 gallicite. Earth already had 2000 gallicite on it, so I quickly SM'd away all conventional factories, added 1000 construction factories and edited the pop to be 5b so I had people to man the facilities. Adding a new naval shipyard and quickly modifying it to be 50kt (about 7k more than I needed, but quicker to type for me), I assigned the ship class to it, then went to industry and built the components over the course of a few 30 day increments. Quickly checking and confirming that I had 0 gallicite on Earth, I then queued the shipyard to build a ship of that class using components. A few 30d increments later it was finished, no issues.
Here's where it gets funny.
I then re-opened the shipyards page, and noticed that the gallicite cost for the ship class was now just...missing. It no longer listed the cost as being there at all, and to test if it was just a visual glitch I queued up another ship to be built without ticking the Use Components box. A few 30d increments later and the ship, while taking much longer than before, was built. And I had no issues with gallicite usage, even though I very clearly had 0 in my stockpile, and I had also double checked to make sure I didn't have stockpiled engines for some reason. I conducted a further test, adding 2000 more gallicite to Earth via SM and closing/reopening the shipyard window. It now correctly displayed the gallicite need, and when I built this ship, while taking the same time as the previous "free" one, it did use the gallicite and what's more, gave an message in the event log upon completion that there were not enough minerals. Trying to build a new ship then gave the correct behavior, throwing the same message into the event log about missing the required minerals.
tl:dr is that it seems to be possible to trigger the game into thinking there are components available when there aren't, and this removes the mineral usage of a ship class
SJW: Fixed