Page MenuHomeSchine - Phabricator

Starmade | Mass display incorrect (float-point bug)
Closed, RejectedPublic

Description

Floating point math errors cause incorrect mass to be displayed.

Python 2.7 code that demonstrates the issue (Java will be the same)

x= 0.1 # Core mass
for n in range (1,1100): x += 0.15 # Add standard hull 1100 times
x # display x, will be 164.9500000000034 (expected 165.1)
round(x,1) # display rounded x, will be 165 (expected 165.1)

Details

Task Type
Bug
Testing Results
Affected Gamemode(s)
Single and Multi
Reproducible
Yes
Last tested (version)
0.19538
Category
Engine
First occurrence (version)
0.19538
Hardware/Software/System
OS-Specific
No
Hardware-Specific
No
Video Card Vendor
uncertain
User/Reporter/Contact
Username on Registry
NoK0mm3nt
Username/Profile on Steam
NoK0mm3nt
Steps to reproduce

0) Go into Creative Mode

  1. Create a core, jump in - observe mass = 0.1
  2. Select a Black Standard Hull (mass = 0.15)
  3. In Advanced Build Mode, set X=11, Y=10, Z=10 (note, this reproduces doing a single block at a time - this is just faster)
  4. Place block of Black Standard Hull (0.15 mass * 11*10*10 = 165 mass)
  5. Observer mass = 165, not 165.1 (hull + core)
Serverconfig (server.cfg)
<replace this line with the file content>
Clientconfig (settings.cfg)
<replace this line with the file content>
Java Version (32bit)

Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.

Java Version (64bit)

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Related Objects

Event Timeline

danmcg.au updated the task description. (Show Details)Jan 5 2016, 6:59 AM
danmcg.au edited Serverconfig (server.cfg). (Show Details)
danmcg.au edited Clientconfig (settings.cfg). (Show Details)
danmcg.au edited Java Version (32bit). (Show Details)
danmcg.au edited Java Version (64bit). (Show Details)
danmcg.au set Username on Registry to NoK0mm3nt.
danmcg.au set Username/Profile on Steam to NoK0mm3nt.
danmcg.au changed Affected Gamemode(s) from none/unspecified to Single and Multi.
danmcg.au changed Reproducible from uncertain to Yes.
danmcg.au set Last tested (version) to v0.19538.
danmcg.au edited Steps to reproduce. (Show Details)
danmcg.au added a subscriber: danmcg.au.
danmcg.au created this task.
Restricted Application added a project: Issue Navigation. · View Herald TranscriptJan 5 2016, 6:59 AM
lancake added a subscriber: lancake.Jan 8 2016, 5:22 PM
lancake claimed this task.

-Validated-

Thought it was a duplicate of T753 first, but that's an issue with block count not updating (which also messes up the mass value). Most likely other values have this issue too, such as SHP, AHP, Thrust, Power, ...

We would need to find them all before sending it into queue.

lancake shifted this object from the S1 Public space to the S3 Starmade space.Jan 8 2016, 5:23 PM
lancake changed the visibility from "Custom Policy" to "Public (No Login Required)".
lancake changed the edit policy from "Task Author" to "Starmade (Project)".
lancake set Task Type to Bug.
lancake set Category to Engine.
lancake set First occurrence (version) to 0.19538.
lancake set OS-Specific to No.
lancake set Hardware-Specific to No.
lancake set Video Card Vendor to uncertain.
lancake changed Last tested (version) from v0.19538 to 0.19538.
lancake moved this task from New / Unconfirmed to Open / Validated on the Issue Navigation board.
lancake removed lancake as the assignee of this task.
lancake triaged this task as Normal priority.
lancake lowered the priority of this task from Normal to Low.
Chandler claimed this task.Jan 11 2016, 1:02 AM
Chandler added a comment.EditedJan 11 2016, 9:20 PM

Here are the results thus far;

10 standard black in all directions from the core 60*.15 +.01(core)=9.1 mass (Correct)

Also did the cube of 10x10x11
1100 Blocks with 1 core 1100*.15+.01=165.015 Game Readings are 165 and 165.1 in nav (so also correct)
Reads correct in Build mode, and in Nav.

25*25*25 cube 15625*.15+.01=2343.76 game readings 2343.8 (also correct)

I see no issue. Maybe it was fixed in the last dev update.
Please retest danmsc.au

Chandler closed this task as Rejected.Jan 21 2016, 4:36 PM

-Rejected-
Works fine for me, And as submitter has not responded... I will assume this was fixed in an update.

Restricted Application edited projects, added Starmade; removed Issue Navigation. · View Herald TranscriptJan 21 2016, 4:36 PM
AndyP moved this task from Unclassed to Archived on the Starmade board.Mar 2 2016, 12:19 AM
Restricted Application added a project: Engine. · View Herald TranscriptMar 10 2017, 6:19 PM