View Issue Details

IDProjectCategoryView StatusLast Update
0003620Spring engineGeneralpublic2013-03-27 22:36
ReporterForboding Angel Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionnot fixable 
Product Version94.1 
Summary0003620: Traqnsports call killed() when unloading units
Descriptionas a result, if you ahve a bunch of pieces flying off with CEGs in killed when an air transport gets gibbed, when that air trans unloads the unit, for some reason spring calls killed()

This bug has existed since spring 89.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2013-03-25 11:54

developer   ~0010209

if a transport dies, it either

1) RELEASES any held transportees if releaseHeld, BEFORE calling Killed
2) KILLS any held transportees if not releaseHeld, BEFORE calling Killed

we call this "expected behavior"

Forboding Angel

2013-03-25 12:06

reporter   ~0010211

Last edited: 2013-03-25 12:08

#include "sfxtype.h"
#include "exptype.h"

piece base, link, engine1, engine2, wingsfront, wingsrear, tail;

static-var Static_Var_1, unitviewer, statechg_DesiredState, statechg_StateChanging, moving;

// Signal definitions
#define SIG_MOVE 4
#define flame 1024+0



SmokeUnit(healthpercent, sleeptime, smoketype)
{
   while( get BUILD_PERCENT_LEFT )
   {
      sleep 400;
   }
   while( TRUE )
   {
      healthpercent = get HEALTH;
      if( healthpercent < 66 )
      {
         smoketype = 256 | 2;
         if( Rand( 1, 66 ) < healthpercent )
         {
            smoketype = 256 | 1;
         }
         emit-sfx 1025 from base;
      }
      sleeptime = healthpercent * 50;
      if( sleeptime < 200 )
      {
         sleeptime = 200;
      }
      sleep sleeptime;
   }
}

Thrust()
{
   while( TRUE )
   {
      if (moving)
      {
              emit-sfx flame from engine1;
              emit-sfx flame from engine2;
                }
        sleep 5;
   }
}

StartMoving()
{
        moving=1;
}
   
StopMoving()
{
        moving=0;
}

MoveRate0()
{
    turn tail to x-axis <-90.000000> speed <150.000000>;
     turn wingsfront to x-axis <-90.000000> speed <150.000000>;
     turn wingsrear to x-axis <-90.000000> speed <150.000000>;
}
MoveRate1()
{

     turn wingsfront to x-axis <-70.005495> speed <150.000000>;
     turn wingsrear to x-axis <-70.005495> speed <150.000000>;
}
MoveRate2()
{
    turn tail to x-axis <0.000000> speed <150.000000>;
     turn wingsfront to x-axis <0.000000> speed <150.000000>;
     turn wingsrear to x-axis <0.000000> speed <150.000000>;
}

InitState()
{
   statechg_DesiredState = TRUE;
   statechg_StateChanging = FALSE;
}

RequestState(requestedstate, currentstate)
{
   if( statechg_StateChanging )
   {
      statechg_DesiredState = requestedstate;
      return (0);
   }
   statechg_StateChanging = TRUE;
   currentstate = statechg_DesiredState;
   statechg_DesiredState = requestedstate;
   while( statechg_DesiredState != currentstate )
   {
      if( statechg_DesiredState == 0 )
      {
         currentstate = 0;
      }
      if( statechg_DesiredState == 1 )
      {
         currentstate = 1;
      }
   }
   statechg_StateChanging = FALSE;
}

Create()
{
        Static_Var_1 = 0;
   unitviewer = FALSE;
   call-script InitState();
// turn engine1 to y-axis <180> now;
// turn engine2 to y-axis <180> now;
   turn tail to x-axis <-90> now;
         turn wingsfront to x-axis <-90> now;
         turn wingsrear to x-axis <-90> now;
// start-script Thrust();
   start-script SmokeUnit();
}

QueryTransport(Func_Var_1)
{
   Func_Var_1 = 1;
}

BeginTransport(Func_Var_1)
{
   move link to y-axis [0.000000] - Func_Var_1 now;
}

Activate()
{
   start-script RequestState(0);
}

Deactivate()
{
   start-script RequestState(1);
}

EndTransport()
{
}

Killed(severity, corpsetype) // how it explodes
{
    corpsetype = 1;
    explode base type EXPLODE_ON_HIT;
    explode engine1 type EXPLODE_ON_HIT;
    explode engine2 type EXPLODE_ON_HIT;
    explode wingsfront type EXPLODE_ON_HIT;
    explode wingsrear type EXPLODE_ON_HIT;
    explode tail type EXPLODE_ON_HIT;
}

http://www.twitch.tv/forbodingangel/c/2068787

http://youtu.be/jtMZd-S0cS4

About as expected as your "pathing fixes".

Suck it.

abma

2013-03-25 19:11

administrator   ~0010225

replay please!

or please give exact instructions how to reproduce.

also, please read http://springrts.com/wiki/Bugs and better read also http://springrts.com/wiki/Bugs . If you haven't read http://springrts.com/wiki/Bugs then you should read http://springrts.com/wiki/Bugs again until you understand it.


i can't reproduce it with BA 7.74, it works fine there.

Forboding Angel

2013-03-25 22:19

reporter   ~0010227

The problem is, you guys tend to default to "If I can't reproduce it in BA, it doesn't exist".

Load up Evo, use test-500 (my latest commit so that way we are on the same page),
and do exactly what I did in the vid...

/give 1 etransport
load up overseer (comm, starting unit...)
unload overseer

abma

2013-03-25 22:23

administrator   ~0010228

fix this first before blaming engine:
[f=0000747] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000747] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000747] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000747] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000747] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000747] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000748] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000748] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000748] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?
[f=0000748] Error: LuaRules::RunCallIn: error = 2, UnitPreDamaged, [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: attempt to index field '?' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/unit_noenemyfire.lua"]:40: in function 'UnitPreDamaged'
    [string "LuaRules/gadgets.lua"]:1383: in function <[string "LuaRules/gadgets.lua"]:1378>
    (tail call): ?

Forboding Angel

2013-03-25 22:25

reporter   ~0010229

Last edited: 2013-03-25 22:36

Oh you mean that error that was fixed in commit 500?

Edit: Use 501, as soon as the Enemy fire gadget was removed, the ff gadget started throwing errors. Fixed in 501.

emmanuel

2013-03-25 22:45

reporter   ~0010234

can you use the "AIR" word in title when you reporting air transport bugs(we are not all using BA gameplay as you)
not any killed() call for ground sea transports when unloading

Kloot

2013-03-27 22:36

developer   ~0010299

There might be a bug in the BOS compiler you used for etransport.bos.

The script's EndTransport function is called which is empty, but instructions from the body of Killed are executed instead --> points to a miscompilation.

Those instructions include 'explode' directives which cause CEGs to be spawned.

The CEGs then create projectiles which can collide with the transport and sometimes do enough damage to kill it.

TLDR: probably not fixable from this end.

Issue History

Date Modified Username Field Change
2013-03-25 03:56 Forboding Angel New Issue
2013-03-25 11:54 Kloot Note Added: 0010209
2013-03-25 11:54 Kloot Status new => closed
2013-03-25 11:54 Kloot Assigned To => Kloot
2013-03-25 11:54 Kloot Resolution open => no change required
2013-03-25 12:06 Forboding Angel Note Added: 0010211
2013-03-25 12:06 Forboding Angel Status closed => feedback
2013-03-25 12:06 Forboding Angel Resolution no change required => reopened
2013-03-25 12:08 Forboding Angel Note Edited: 0010211
2013-03-25 12:21 Kloot Assigned To Kloot =>
2013-03-25 12:21 Kloot Status feedback => new
2013-03-25 19:11 abma Note Added: 0010225
2013-03-25 19:11 abma Assigned To => abma
2013-03-25 19:11 abma Status new => feedback
2013-03-25 22:19 Forboding Angel Note Added: 0010227
2013-03-25 22:19 Forboding Angel Status feedback => assigned
2013-03-25 22:23 abma Note Added: 0010228
2013-03-25 22:25 Forboding Angel Note Added: 0010229
2013-03-25 22:36 Forboding Angel Note Edited: 0010229
2013-03-25 22:45 emmanuel Note Added: 0010234
2013-03-27 22:36 Kloot Note Added: 0010299
2013-03-27 22:36 Kloot Status assigned => closed
2013-03-27 22:36 Kloot Assigned To abma =>
2013-03-27 22:36 Kloot Resolution reopened => not fixable