Author Topic: How old is too old?  (Read 1658 times)

0 Members and 1 Guest are viewing this topic.

Offline Paul M (OP)

  • Vice Admiral
  • **********
  • P
  • Posts: 1438
  • Thanked: 63 times
How old is too old?
« on: October 28, 2014, 07:14:02 AM »
In my game (which really really I need to write up) I'm constantly beset with "crew morale" errors which based on a bug report response is to do with the ship exceeding its deployment lifetime given by the size of the variable used to store the number. 

To fight this I've been scrapping older ships, only I still get something like 18 error messages each five day turn.  Does anyone know how old a ship can be before it triggers this damned annoying error?  It is also weirder in that the number of error messages bounces around is by no means constant.  So it might be 18 and then 12 and then 15 and so on.

I have tried 2^24 = 16777216 seconds = 194 days (this is clearly far to short), 2^32 = 138 years (this is clearly too long).

Anyone know what the maximum allowable in service lifetime before triggering this error is?
 

Offline clement

  • Pulsar 4x Dev
  • Sub-Lieutenant
  • *
  • c
  • Posts: 137
  • Thanked: 13 times
Re: How old is too old?
« Reply #1 on: October 28, 2014, 07:24:56 AM »
The code is probably using a signed integer which would be 2^31 which I believe should be 68 years. Does that seem like an age that is close to accurate for the Northern Coalition's older ships?
 

Offline Paul M (OP)

  • Vice Admiral
  • **********
  • P
  • Posts: 1438
  • Thanked: 63 times
Re: How old is too old?
« Reply #2 on: October 28, 2014, 09:59:38 AM »
Unfortunately no...most of the older ships are 30-40 years old.  It is possible the source of the error is not what I think it is...I was told that it was caused by the fact the ships all have a tracked deployment time (even though they are not parasites).  The oldest ship, the Upholder, has been scrapped, the next oldest should be the Protecteur...most of the rest of them are from 2270 or later and I am currently scrapping and rebuilding those.  I will look in more detail as the grav survey ships may be closer to 50 years old but there can't be 18 ships that old.

It isn't really game destroying but it does get annoying when I have to click "ok" 10+ times to advance the turn and then wait a minute or so for things to finish.

Added in Edit:
The oldest ship still in service (date is Feb, 2300) was built in 2241.  There are 4-5 ships from the mid 2250s.  After that 4-5 ships from the 2260s.  The rest of the ships come from 2270 or later.
« Last Edit: October 29, 2014, 06:26:51 AM by Paul M »
 

Offline Bremen

  • Commodore
  • **********
  • B
  • Posts: 744
  • Thanked: 151 times
Re: How old is too old?
« Reply #3 on: October 29, 2014, 03:27:06 PM »
It's caused by ships going too long without shore leave. Try moving them to a populated planet.
 

Offline Paul M (OP)

  • Vice Admiral
  • **********
  • P
  • Posts: 1438
  • Thanked: 63 times
Re: How old is too old?
« Reply #4 on: October 30, 2014, 03:35:44 AM »
It is unfortunately not caused by ships exceeding their crew deployment times.  This is an error message (see the 6.10 bug list thread where I reported it) that was confirmed by Steve to be due to overflowing the number a variable can hold.

From Steve for another person with the same error:
Quote
The problem is that I am using a long variable instead of a double to store the last launch time (which is stored for all ships even if they never enter a hangar). Because your game has been running for a long time, the number of seconds passed the game has exceeded the capacity of the database field. This is fixed for v6.20 but will continue to affect current games.

If anyone wants to fix this for a current game and has Access, you need to change the data type of the LastLaunchTime in the Ship table to Double (or currency).

The trouble is a long variable should not overflow until 69 years of service life as clement points out...and none of the ships I have are anywhere near that old.
 

Offline clement

  • Pulsar 4x Dev
  • Sub-Lieutenant
  • *
  • c
  • Posts: 137
  • Thanked: 13 times
Re: How old is too old?
« Reply #5 on: October 30, 2014, 08:37:12 AM »
The only other constructs I can think of that might cause this are:
PDCs
Orbital Habitats
Civilian shipping line ships (not sure if the version you are using includes the auto-retirement functionality Steve created)
Shipyards (although I don't remember seeing age information on them before)

Other than those things, I can't think of anything else that might have that timer.
 

Offline Paul M (OP)

  • Vice Admiral
  • **********
  • P
  • Posts: 1438
  • Thanked: 63 times
Re: How old is too old?
« Reply #6 on: October 30, 2014, 09:46:42 AM »
PDCs are a possibility but as refit PDC doesn't work in 6.10 I've been using delete and SMing the new version in so none of them are that old.

Orbital Habitat Technology hasn't (yet) been developed.

Civillian shipping lines retire 20 year old ships...but I can't say for certain they may not be a culprit as they may not retire all 20 year old ships, though they are generally pretty good about it based on how regularily I see ships retired, or scrapped.

Shipyards well...possibly but I don't have enough of them to trigger the number of error messages I see.  But I don't know for example if the error message is generated x times for a single ship or x error messages means that many ships.  It is also completely random how many times I have to hit "ok" sometimes say 8 times and the next time 18 and the time after that 12.  I'm utterly baffled.  I had assumed as I scrapped ships the number of times the message showed up would go down but that isn't actually happening.
 

Offline Bryan Swartz

  • Captain
  • **********
  • B
  • Posts: 454
  • Thanked: 10 times
Re: How old is too old?
« Reply #7 on: October 30, 2014, 03:59:20 PM »
The most important information in this thread is that Paul is still playing his Northern Coalition game!  Interestingly this is a subject that I need to grapple with as I've just started playing again myself in the last couple of days.  For RP reasons I definitely want to retire ships at a certain point, though I'm on 6.2 so I don't think it'll cause me any issues.