2025-07-22 08:55 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003975Spring engineGeneralpublic2013-08-29 02:32
Reporterabma 
Assigned ToKloot 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionreopened 
Product Version94.1.1+git 
Target Version95.0Fixed in Version 
Summary0003975: spring: rts/Sim/Objects/SolidObject.cpp:136: virtual void CSolidObject::UpdatePhysicalState(): Assertion `(IsInAir() != IsOnGrou
Description[f=0000006] Error: Aborted (SIGABRT) in spring 94.1.1-1033-g58f61fa develop (Debug)
[f=0000006] Error: Stacktrace:
[f=0000006] Error: <0> /lib/x86_64-linux-gnu/libpthread.so.0(+0xfbd0) [0x7f424413ebd0]
[f=0000006] Error: <1> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7f4240a7b037]
[f=0000006] Error: <2> /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f4240a7e698]
[f=0000006] Error: <3> /lib/x86_64-linux-gnu/libc.so.6(+0x2fe03) [0x7f4240a73e03]
[f=0000006] Error: <4> /lib/x86_64-linux-gnu/libc.so.6(+0x2feb2) [0x7f4240a73eb2]
[f=0000006] Error: <5> /var/tmp/home/dev/spring/develop/rts/Game/UnsyncedGameCommands.cpp:3285
[f=0000006] Error: <6> /var/tmp/home/dev/spring/develop/rts/Game/SelectedUnitsHandler.cpp:121
[f=0000006] Error: <7> /var/tmp/home/dev/spring/develop/rts/Game/SelectedUnitsHandler.cpp:108 (discriminator 1)
[f=0000006] Error: <8> /usr/include/c++/4.7/bits/stl_tree.h:1285
[f=0000006] Error: <9> /var/tmp/home/dev/spring/develop/rts/Game/Game.cpp:1554
[f=0000006] Error: <10> /var/tmp/home/dev/spring/develop/rts/Net/NetCommands.cpp:436
[f=0000006] Error: <11> /var/tmp/home/dev/spring/develop/rts/Game/Game.cpp:962
[f=0000006] Error: <12> /var/tmp/home/dev/spring/develop/rts/Rendering/DefaultPathDrawer.cpp:516
[f=0000006] Error: <13> /var/tmp/home/dev/spring/develop/rts/Rendering/Env/AdvTreeDrawer.cpp:1021 (discriminator 1)
[f=0000006] Error: <14> /var/tmp/home/dev/spring/develop/rts/Rendering/Env/AdvTreeDrawer.cpp:1048
[f=0000006] Error: <15> /var/tmp/home/dev/spring/develop/rts/Map/SMF/SMFRenderState.h:38
[f=0000006] Error: <16> /var/tmp/home/dev/spring/develop/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:117
[f=0000006] Error: <17> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f4240a65ea5]
[f=0000006] Error: <18> ??:?
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0011463

abma (administrator)

Last edited: 2013-08-29 01:18

View 2 revisions

(gdb) print IsInAir()
$1 = false
(gdb) print IsOnGround()
$2 = false
(gdb) print IsInWater()
$3 = false
(gdb)print pos
$4 = {static binder = {class_ = 0x1adf490, base = 0x0, flags = creg::CF_None,
    memberRegistrator = 0x19998a0 <float3::memberRegistrator>, name = 0x12d1a6e "float3",
    size = 12, alignment = 4, hasVTable = false,
    constructor = 0xcd646a <float3::_ConstructInstance(void*)>,
    destructor = 0xcd6496 <float3::_DestructInstance(void*)>,
    nextBinder = 0x1999820 <float2::binder>}, static memberRegistrator = 0x1999988 <float3mreg>,
  static hasVTable = false, static CMP_EPS = 9.99999975e-05,
  static NORMALIZE_EPS = 9.99999996e-13, static maxxpos = 2047, static maxzpos = 2047, {{x = 176,
      y = -0.388069987, z = 992}, {r = 176, g = -0.388069987, b = 992}, {x1 = 176,
      y1 = -0.388069987, x2 = 992}, {s = 176, t = -0.388069987, p = 992}, {xstart = 176,
      ystart = -0.388069987, xend = 992}}}
(gdb) print gh
$5 = -2.35473633
(gdb) print wh
$6 = 0
(gdb) print pos.y
$7 = -0.388069987
(gdb) print midPos.y
$8 = {x = 7.41299915}
(gdb) print radius
$9 = 15.7437

~0011464

Kloot (developer)

O_O

Not in the air, not on the ground, and not in water (even though pos.y == -0.388069987 <= 0)... where the hell is it then?

~0011465

abma (administrator)

print ps
$30 = 34

~0011466

Kloot (developer)

34 = 32 + 2 (MOVING and ONGROUND) so this makes no sense at all :$

~0011467

abma (administrator)

Last edited: 2013-08-29 01:45

View 3 revisions

ps is a local var while HasPhysicalStateBit checks class var physicalState...

asserts needs to be behind

        physicalState = static_cast<PhysicalState>(ps);
^^

~0011468

Kloot (developer)

PicardFacePalm.png

Thanks.

~0011469

abma (administrator)

Last edited: 2013-08-29 01:58

View 2 revisions

hm, the assert still fails...

(gdb) print ps
$10 = 32
print physicalState
$11 = CSolidObject::STATE_BIT_MOVING
(gdb) print pos.y
$14 = 0.506672919
(gdb) print gh
$15 = -2.32666016
(gdb) print midPos.y
$16 = {x = 10.1957598}
(gdb) print radius
$17 = 12
(gdb) print wh
$19 = 0



does this make sense?

~0011470

Kloot (developer)

No, one of the ground/air/water bits must always be true...

~0011471

Kloot (developer)

Oh, I see it now:

pos.y = 0.506672919
gh = -2.32666016

--> does not satisfy the criteria for either ground, air, or water.

~0011472

abma (administrator)

Last edited: 2013-08-29 02:13

View 3 revisions

don't really know how it should be -> can't fix :-|

i guess
pos.y > gh = inair
pos.y == gh && pos.y > 0 = onground
pos.y <= 0 = inwater

?!

is water defined as < 0 or <= ?

~0011473

abma (administrator)

ah, validation test doesn't fail because there is no water on the map i guess...

~0011474

Kloot (developer)

Last edited: 2013-08-29 02:18

View 2 revisions

Problem is using exactly 0 for the test will usually fail because of FP inaccuracy and using a small epsilon can still trigger the assert (but less often).

"is water defined as < 0 or <= ?"

<= right now

~0011475

abma (administrator)

then:

if ...
ps = inwater
else if ...
ps = onground
else
ps = inair

?!

i know this makes the asserts obsolete, but then there is no problem with a small epsilon.
+Notes

-Issue History
Date Modified Username Field Change
2013-08-29 01:02 abma New Issue
2013-08-29 01:03 abma Product Version 95.0 => 94.1.1+git
2013-08-29 01:03 abma Target Version 94.1.1+git => 95.0
2013-08-29 01:04 abma File Added: 20130829_010249_AI: Proving Grounds v02_94.1.1-1033-g58f61fa develop.sdf
2013-08-29 01:05 abma File Deleted: 20130829_010249_AI: Proving Grounds v02_94.1.1-1033-g58f61fa develop.sdf
2013-08-29 01:05 abma File Added: 20130829_010435_AI: Proving Grounds v02_94.1.1-1033-g58f61fa develop.sdf
2013-08-29 01:16 abma Note Added: 0011463
2013-08-29 01:18 abma Note Edited: 0011463 View Revisions
2013-08-29 01:32 Kloot Note Added: 0011464
2013-08-29 01:35 abma Note Added: 0011465
2013-08-29 01:41 Kloot Note Added: 0011466
2013-08-29 01:43 abma Note Added: 0011467
2013-08-29 01:44 abma Note Edited: 0011467 View Revisions
2013-08-29 01:45 abma Note Edited: 0011467 View Revisions
2013-08-29 01:48 Kloot Note Added: 0011468
2013-08-29 01:55 abma Changeset attached => spring develop 878d3fb4
2013-08-29 01:55 abma Assigned To => abma
2013-08-29 01:55 abma Status new => resolved
2013-08-29 01:55 abma Resolution open => fixed
2013-08-29 01:56 abma Note Added: 0011469
2013-08-29 01:58 abma Note Edited: 0011469 View Revisions
2013-08-29 01:58 Kloot Note Added: 0011470
2013-08-29 01:58 Kloot Status resolved => feedback
2013-08-29 01:58 Kloot Resolution fixed => reopened
2013-08-29 02:01 Kloot Note Added: 0011471
2013-08-29 02:10 abma Assigned To abma => Kloot
2013-08-29 02:10 abma Status feedback => assigned
2013-08-29 02:12 abma Note Added: 0011472
2013-08-29 02:12 abma Note Edited: 0011472 View Revisions
2013-08-29 02:13 abma Note Edited: 0011472 View Revisions
2013-08-29 02:14 abma Note Added: 0011473
2013-08-29 02:16 Kloot Note Added: 0011474
2013-08-29 02:18 Kloot Note Edited: 0011474 View Revisions
2013-08-29 02:19 abma Note Added: 0011475
2013-08-29 02:32 Kloot Changeset attached => spring develop ff2902ad
2013-08-29 02:32 Kloot Status assigned => resolved
+Issue History