Jump to content

(super bad) BUG with crew :(


Schakar

Recommended Posts

http://steamcommunity.com/sharedfiles/filedetails/?id=1171818656

 

All started with fighter start/call back and ~600 pilots instead of 150.

After some time I suddenly had 2.7 BILLION Pilots (eu billions, not us).

Then I created a second ship (crew quaters only) and tryed to transfare the Pilots.

 

Now I have 4,3 bil Generals, Comanders and Miner + 2,7 bil Pilots.

 

I allready posted this bug month ago. It's still in and  as my friend has the same problem ... I am not the only one.

Link to comment
Share on other sites

Someone said a bugged fighter adds exactly 65536 pilots to the ship, wich is 2^16. On our server another one said he had 4 billions of pilots. Maybe it was 4.294.967.296 wich would be 2^32 (but cant say for sure).

 

Maybe this helps finding the issue.

 

I thought this initially but didn't post the reply I had drafted because he said EU billions (10^12) not using the American/British short scale (10^9). Also he said 2.7 Billion so even if it was short scale (10^9) it doesn't check out. 2^31 = 2.147x10^9 not 2.7x10^9 so either way the numbers don't match his report. Although 4.3 Bil does match if you assume short scale because 2^32 = 4.295x10^9

 

---------------------

 

Therefore, assuming the reported numbers are incorrect, and they were actually 2.1 Bil and 4.3 Bil using the short scale (10^9) then I'd offer the following root-cause analysis:

 

I would venture to guess that the ship data in Avorion is stored in class-based instances which hold all pertinent ship information? I would further speculate that the crew values for that specific ship are stored in standard LONG data types (32-bit integers) since standard INT would only allow for about 32k of each crew type. This class data is probably accessed from the main Avorion code using data call functions in order to do displays and transfers.

 

My guess is that at some point that crew value became corrupted for the ship in question. Depending on the coding language used for Avorion source, this corrupt number may be equal to negative zero: (-)0. Negative zero in binary for a signed integer is (1000 0000 0000 0000 plus 16 more zeros). I would speculate that Avorion has code which checks for a negative numbers since they are not allowed for calculations. This is probably done by looking for numbers less than zero (crew < 0) and then forcing this number to be positive or zero depending on what the devs chose. Although (-)0 is not < (0) in many code bases, although (-)0 may or may not == 0.

 

If this is the case I assume that something in the code is forcing the signed complement (0111 1111 1111 1111 plus 16 more ones) which = 2^31 = 2.1 x10^9 (2.1 Bil in short scale units). This compliment is probably caused by whatever is calling for the corrupted data in the ship instance for doing the calculations.

 

When you go to transfer the corrupted value to the new ship, it transfers the values and now you end up with 2.1 Bil in each ship, so now you have 2^32 crew = 4.3 x10^9.

 

I would guess that ship #2 legitimately now has 2.1 Billion crew and if you did it a second time you now have 4.3 Bil in ship #2. But I'd guess if you transferred the ship #2 crew to another ship (#3) then ship #2 would actually be empty. It's probably just ship #1 with the corrupt instanced data, but from this you could theoretically farm Billions of legitimate crew at a time doing crew transfer.

 

 

TLDR: Probably an issue with the integer bit math (2^31), and/or a signed integer issue with +/- zero, and/or a 1's or 2's complement issue. If you can crack into the stored data for the ship's instances you could probably see what the saved value was in that table and then figure out the problem from there. If you can view this data from the server files have the owners send you the files dictating the name/location of the ship in question so you can view the crew values the engine is referencing.

Link to comment
Share on other sites

Therefore, assuming the reported numbers are incorrect, and they were actually 2.1 Bil and 4.3 Bil using the short scale (10^9) then I'd offer the following root-cause analysis:

 

Did you check the screenshot at all?

4.294.967.124

4 eu billion

294 eu million

967 thousend

124 hundret

 

And well, there IS a screenshot. That hard to check it before post?

 

PS: in before "but this isn't EXACT (whatever)" ... I tryed to fix it by dismissing some via mouse wheel down = left click and fast spin the wheel.

 

Link to comment
Share on other sites

So first, I did view the screenshot before posting. The number shown is short scale billions 10^9, not long scale billions 10^12. I am not familiar with EU counting as I am an American engineer. Based on what I read on the wiki about long scale usage I assumed the EU used long scale since it says most of Europe:

https://en.m.wikipedia.org/wiki/Long_and_short_scales

 

That is why I was questioning the validity of the reported numbers.

 

I specifically have been using scientific notation (10^exponents) to avoid linguistic confusion.

 

There was no screenshot showing the 2.7 billion so I can't confirm if it was actually 2.1 or 2.7 billion.

 

---------------

 

I appreciate that you posted the screenshot and wanted to make sure I viewed it, but trying to flame me with your comments is unnecessary and not productive for getting this bug resolved.

Link to comment
Share on other sites

May it be that fighters pick up ejected pilots from killed fighters and this triggers the issue? Can anybody confirm?

 

That should it be. Did more tests:

 

[*]Have a small wreckage few km away of your ship

[*]Have... lets say 2 fighter squads of mining fighters -> required pilots 24

[*]Let mining fighters mine the wreckage (just gives them anything to do they will not finish, so you get time for testing)

[*]Select one of your fighters and when its near the wreckage type /destroy

[*]Be sure the pilot ejected

[*]Another fighter will pick up the pilot

[*]Call all fighters (23 cause you killed one) back into hangar

[*]Required pilots still 24, for only 23 fighters. I think its the same issue that pumps required fighters even higer into billions.

Link to comment
Share on other sites

Yea sorry, I just have one mouse pointer Pyrax. But the numbers are correct.

Well, why the hell should I fake them if I want the bug to be fixed. Would be stupid, not?

 

And again, it is NOT related with the fighters. They might have a bug on their own. But a fighter bug could never explain my Generals, Commander and Miners!

 

Even more as this bug exist FAR longer then the fighter-patch!

Link to comment
Share on other sites

Do you know which ship started the problem? If so, can you do the following test:

 

1) Transfer crew to from ship with the original problem to a new ship (Ship #2).

2) Confirm that Ship #2 now has the issue

3) Transfer crew from Ship #2 to yet another ship, Ship #3 (do not let Ship #3 interact with Ship #1)

4) Report back if Ship #2 still has the issue and if Ship #3 has the issue

 

Following those specific steps may shed some light on if the problem is infectious, as in stays permanently with intermediate ships by messing up their instances thus enabling them to spread the issue. Or if it only affects the original Ship #1 and the excess crew in Ship #2 is just crew duplication.

Link to comment
Share on other sites

This

 

http://steamcommunity.com/sharedfiles/filedetails/?id=1184739338

 

happens, when I build a new/fresh ship (same blueprint) and move full crew.

 

And realy guys. It is NOT (only) a fighter problem! It is a crew (quater) problem.

Fighter have no Miners, Commander etc.

 

Interesting to see:

The bug allready happens at crew-level 1 (first class officers). While first class officers level 2 and 3 are OK.

On the other side level 1 miners are ok but level 2 and 3 are bugged.

 

So it starts with level 1 and carries over to 2 and 3.

 

And it can happen with just a view crew members as you normaly don't have many Officers (this ship needs ~150 workpower of first class officers for example > 50 "crew"*3).

Link to comment
Share on other sites

this also happen to me. this happen when i start recalling my fighter all at once . then they start to circle around my ship not going in for about 1-2 min then suddenly they did and each time i command them to reenter will triger the bug more and more until the server crash. leaving and saving the server will not remove the bug.

 

My suggestion is why not try to recalculate the ship and fighter each time u login and out so that the number will go back like. but this doesnt remove the bug with duping pilot. just my 2 cent.

Link to comment
Share on other sites

700 hours in game.

 

 

There are actually two sides to this bug.  They often appear at the same time, but not always. 

 

First:  A bug in the displayed workforce available to the ship.  I'll look up the number later, but it's the 4.3 billion one I believe.  This is not actually available workforce nor does the ship have this many crew, it is just the displayed number.  The bar also goes off the chart. 

 

Second, and less often:  Infinite crew.  It's one of the above said amounts, I'll look it up if requested.  Attempting to transfer them only gives the 2nd ship that number of crew.  The first ship keeps the ridiculously high number of crew no matter what. 

 

 

Reproducing: always has to do with opening the transfer crew screen.  It's not just *poof* there it is in the ship menu, I always notice it first time on the transfer crew screen before anything else is done. 

 

 

Hope this helps, I'll try to reproduce....

Link to comment
Share on other sites

  • 4 weeks later...

Same issue with me and a buddy of mine last night on my server for pilot count bug.

 

Suddenly had about 7k pilots,. I agree with hammer, it appears fore to come from fighters

 

Hopefully 15 branch resolves this, I got rid of the pilots but it now thinks I need like 7 generals after getting rid of them, and I don't want the moral hit that I will never be able to fix.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...