Hazeron Forums

Full Version: 2024-03-30 Lockup Bug, Billion Hit Point Buildings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Lockup Bug
Two different cases of program lockups were reported. One occurred at the moment the avatar gave the vulcium knife to Xian at the University, something I have done hundreds of times. The other lockup occurred at the moment a spacecraft entered a wormhole, another activity I have done hundreds of times. Both of these juicy bugs were captured in save game files.

I lumped these two bugs together because the same program error was causing the problem. Oddly the bug was introduced some time in 2015. It is fixed.

Billion Hit Point Buildings
Pirate buildings report billions of hit points. This makes them very difficult to destroy.

This problem is caused by an inconsistency between the building subsystem volumes and the overall volume of the building itself. This error also afflicts some spacecraft blueprints.

I updated the building and spacecraft blueprint finalize functions to catch this situation and report it as an error. It also tells you how to fix it, which simply requires a refresh of the obstacles data and then to Ok the properties. A careful look at the subsystem volumes is recommended.

I also fixed the total hit points function to return a reasonable number when this situation occurs.

The default building and spacecraft blueprints should be reviewed and republished as necessary. There is no time for that today. I'll do it some time next week.
(03-30-2024, 09:59 PM)Haxus Wrote: [ -> ]I lumped these two bugs together because the same program error was causing the problem. Oddly the bug was introduced some time in 2015. It is fixed.

Issues like this always make me curious about the cause, but I assume it isn't too interesting?
Quote:the cause

The error was caused by a read/write lock that was unlocked one too many times. It happened when determining the star density somewhere in a galaxy, the first time the function was called.

The error was sort of like this...

Code:
float Galaxy::StarDensity(where)
{
  rwLock.LockForRead
  if(dataNotLoaded)
  {
    rwLock.Unlock
    rwLock.LockForWrite
    LoadData
    rwLock.Unlock
  }
  starDensity = CalculateStarDensityUsingData(where)
  rwLock.Unlock
  return starDensity
}
(03-30-2024, 11:09 PM)Haxus Wrote: [ -> ]The error was caused by a read/write lock that was unlocked one too many times. It happened when determining the star density somewhere in a galaxy, the first time the function was called.

Ah. So my guess was right. The story crashed as well because it was looking for or generating sectors/systems.

Just weird it didn't cause more issues then, but likely just some conditions your example didn't show.
Either way, the bug is fixed and everyone is happy! And thanks for the explanation!
Quote:The story crashed as well because it was looking for or generating sectors/systems.

The story lock was locked to run the script. While running the script, it generated sectors which hung on the galaxy lock.

In another thread, an npc checked to see if his story instance was still active. This hung on the story lock.

In another thread, a routine maintenance function ran to manage the open stories. This thread also hung on the story lock.

In all, seven threads hung because one or the other of those locks was locked.
That XML export bug is fixed and an update was posted.
In terms of other annoying bugs, I've noticed that ever since the addition of spacecraft customization at the factory, it's been taking extremely long to load some blueprints into the UI from media

The bigger the spacecraft the worse it gets, with huge ships like the Spaceball One causing the game to hang for over 30mins (if you wanna try it for yourself and see how long it takes)
Not sure which of the recent updates this happened in, but it seems like we now have a critical bug of being unable to drop items on the ground. Items just seem to not appear in the world, or vanish instantly.

See: (Bug report) [Critical] Cannot drop items
I posted an update.

The drop item bug is fixed.

I worked on the spacecraft manufacture UI to eliminate that huge delay. Please try again. I don't have that huge design to test with.
Can confirm the dropping is fixed

Manufacture UI freeze still seems huge, it's this design if you wanna download it off the Workshop

https://steamcommunity.com/sharedfiles/f...3207238338

If not lemme know and I can send the file directly
Pages: 1 2 3 4