Very Odd Crashing Bug

Very Odd Crashing Bug

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Very Odd Crashing Bug

Post by Argh »

I saw a crash-bug with DRB last night, during the final MP testing of P.U.R.E., and it's rather worrisome.

Was running TASClient with UberServer with a Vista and XP 64 machine. Had a bug where certain units caused a hard crash upon being built.

I can't reproduce the bug here under XP 32 running without another client. And it only happens with certain units, so I'm very puzzled about the circumstances.

Because I'm fairly certain that the error is related somehow to the unit scripts, I'm going to post the BOS and the Lua it's looping into- the only new things I've added since last week, when the crash wasn't happening:

BOS:

Code: Select all

// Argh's PURE Tank Script

// This script is copyright (C) Wolfe Games, 2007
// All contents were created by Wolfe Games.

// This Include is absolutely VITAL.  
// You must call it FIRST.  PERIOD.
// Don't say I didn't warn you ;-)
#include "STANDARD_COMMANDS_PURE.h"


piece body, turret, aimer, barrel, flare, groundflash, tread1, tread2, tread3, tread4, tread5, dust1, dust2, light;

// FX and Smoke Code.
// SmokeUnit_PURE is a completely optional Include.  It *requires* STANDARD_COMMANDS_PURE.h
// ExplosionIncludes_PURE is for explosion FX.  It *requires* SoundLibrary_PURE.h
// This code (C) Wolfe Games.
piece center, explode_point01, explode_point02, explode_point03, explode_point04, explode_point05, explode_point06, explode_point07, explode_point08;
#define SMOKEPIECE1 explode_point01
#define SMOKEPIECE2 explode_point02
#define SMOKEPIECE3 explode_point03
#define SMOKEPIECE4 explode_point04
#include "SmokeUnit_PURE.h"
///////////////////////////////////////FX RESERVED FOR EXPLOSIONS
#define EXPLOSION1 1024+1
#define EXPLOSION2 1024+2
#define EXPLOSION3 1024+3
#define EXPLOSION4 1024+4
#define BIG_EXPLOSION1 1024+5
#define BIG_EXPLOSION2 1024+6
#define BIG_EXPLOSION3 1024+7
#define BIG_EXPLOSION4 1024+8
#define MinExplosions 2
#define MaxExplosions 6
#include "ExplosionIncludes_PURE.h"
///////////////////////////////////////END RESERVED
#define WHAM_LAUNCH_FX 1024+9
#define WHAM_GROUND_FLASH 1024+10
#define TRACKED_FX 1024+11

static-var isMoving, amMoving;

lua_CreateLightMe(arg) { return (0); }
lua_DestroyLightMe(arg) { return (0); }
lua_KnockOver(arg) { return (0); }

TreadControl()
{
	var RandomSeed, TreadSection;
	
	RandomSeed = rand (200, 350);
	While(amMoving)
	{
		++TreadSection;
		If(TreadSection == 6)
		{
			TreadSection = 1;
		}
		If(TreadSection == 1)
		{
			show tread5;
			hide tread1;
			emit-sfx TRACKED_FX from dust1;
			emit-sfx TRACKED_FX from dust2;				
		}
		If(TreadSection == 2)
		{
			show tread4;
			hide tread5;
			emit-sfx TRACKED_FX from dust1;
			emit-sfx TRACKED_FX from dust2;					
		}
		If(TreadSection == 3)
		{
			show tread3;
			hide tread4;
			emit-sfx TRACKED_FX from dust1;
			emit-sfx TRACKED_FX from dust2;					
		}
		If(TreadSection == 4)
		{
			show tread2;
			hide tread3;
			emit-sfx TRACKED_FX from dust1;
			emit-sfx TRACKED_FX from dust2;					
		}
		If(TreadSection == 5)
		{
			show tread1;
			hide tread2;
			emit-sfx TRACKED_FX from dust1;
			emit-sfx TRACKED_FX from dust2;					
		}
		sleep 30;
	}
	return 0;
}

KnockOver()
{
	var knockTimer;
	knockTimer = rand(500,1500);
	while(amMoving)
	{
		call-script lua_KnockOver();
		sleep knockTimer;
	}
	return 0;
}

Halt()
{
	sleep 150;
	if(!amMoving)
	{
		isMoving = FALSE;
	}	
}

StartMoving()
{
	amMoving = TRUE;
	if (!isMoving)
	{
		isMoving = TRUE;
		start-script TreadControl();
		start-script KnockOver();
	}
}

StopMoving()
{
	amMoving = FALSE;
	start-script Halt();
}

Create()
{
	hide flare;

	hide tread2;
	hide tread3;
	hide tread4;
	hide tread5;

	amMoving = FALSE;
	start-script SmokeUnit_PURE();
}

RestoreAfterDelay()
{
	var RandomSeed;
	RandomSeed = RAND(3000, 4000);
	sleep RandomSeed;
	turn turret to y-axis <0.0> speed <65.0>;
	turn aimer to x-axis <0.0> speed <65.0>;
}

QueryWeapon1 (piecenum)
{
	piecenum = flare;
}

AimFromWeapon1 (piecenum)
{
	piecenum = turret;
}

AimWeapon1(heading, pitch)
{
	signal SIG_AIM1;
	set-signal-mask SIG_AIM1;

	turn aimer to x-axis 0 - pitch speed <80.0>;
	turn turret to y-axis heading speed <80.0>;

	wait-for-turn turret around y-axis;
	wait-for-turn aimer around x-axis;
	start-script RestoreAfterDelay();
	return(TRUE);
}

FireWeapon1()
{ 

	call-script lua_CreateLightMe(light, 255, 255, 64, 128);
	emit-sfx WHAM_GROUND_FLASH from groundflash;
   	emit-sfx WHAM_LAUNCH_FX from flare; 
	move barrel to z-axis [-9] speed [100];
	sleep 200;
	call-script lua_DestroyLightMe();
	move barrel to z-axis [0] speed [10];
	return(0);
}

Killed(severity, corpsetype)
{
	if (severity <= 50)
	{
		corpsetype = 1;
		call-script Explosion();	
		return (corpsetype);
	} else
	{	
		corpsetype = 2;
		call-script Explosion();		
		return (corpsetype);
	}
	return(0);
}
Lua:

Code: Select all

function gadget:GetInfo()
	return {
		name = "KnockOver",
		desc = "Destroys Units with the KnockOver tag, if a Unit gets too close (trees, etc.)",
		author = "Argh",
		date = "March 3, 2009",
		license = "GPL",
		layer = 1,
		enabled = true,
	}
end

local Gaia = Spring.GetGaiaTeamID()
local sizeX = 0
local GetUnitPosition 
local knockOverTable = {}

local GetUnitDefID = Spring.GetUnitDefID
local DestroyUnit = Spring.DestroyUnit
local GetUnitsInSphere = Spring.GetUnitsInSphere
local GetUnitPosition = Spring.GetUnitPosition
local GetUnitTeam = Spring.GetUnitTeam

if (gadgetHandler:IsSyncedCode()) then

function gadget:Initialize()
	for ud,_ in ipairs(UnitDefs) do  -- search all UnitDef entries
		if UnitDefs[ud].customParams.knockover == "yes" then
			table.insert(knockOverTable,ud,0)
		end
	end
end

function KnockOver(u,ud,team)
	sizeX = UnitDefs[ud].xsize
	local x, y, z = GetUnitPosition(u)
	unitGroupNum = GetUnitsInSphere(x, y, z,sizeX * 5.5)
	for _,me in ipairs (unitGroupNum) do
		if me ~= u and knockOverTable[GetUnitDefID(me)] then
			DestroyUnit(me,true,false)
		end
	end
end
gadgetHandler:RegisterGlobal("KnockOver", KnockOver)

end
As you can see, the BOS loop that contains a reference to lua_KnockOver is only triggered by StartMoving(), and I can't see what could possibly be causing these crashes.

We saw these crashes in two instances- where this unit was being built (i.e., crash during Create() ) or when it died.

I presume that part of the reason why it may be crashing is that Lua's expecting a valid UnitID to return to, and maybe it's removing the UnitID before the Lua returns? That's problematical, and IDK how I can handle that, other than making amMoving FALSE then sleeping a few frames, which I'm going to try as a safety step.

But we didn't see the errors with lots of other units using KnockOver, so it's a bit of a mystery.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Very Odd Crashing Bug

Post by aegis »

stacktrace?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Very Odd Crashing Bug

Post by Argh »

It didn't bring up anything on Bibim's page. No debug symbols. I'll try and get DRB to send me one here in a bit, just to see.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Very Odd Crashing Bug

Post by Argh »

I can't get anything out of this infolog. Anybody else have a clue what's causing this? We're still seeing semi-random crashes here. Sometimes it's fine for the whole game, sometimes we lose a game after 5 minutes.
LogOutput initialized.
Available log subsystems: unit, CollisionVolume, VFS-detail, VFS, ArchiveScanner, mapinfo
Enabled log subsystems:
Enable or disable log subsystems using the LogSubsystems configuration key
or the SPRING_LOG_SUBSYSTEMS environment variable (both comma separated).
Using script script.txt
using configuration source "C:\Users\David\AppData\Local\springsettings.cfg"
OS: Microsoft Windows Vista Home Premium Edition, 32-bit Service Pack 1 (build 6001)
Hardware: Intel(R) Core(TM)2 Duo CPU T5550 @ 1.83GHz; 2045MB RAM, 21984MB pagefile
Using read-write data directory: C:\Users\David\Desktop\taspring\
Scanning: C:\Users\David\Desktop\taspring\maps
Scanning: C:\Users\David\Desktop\taspring\base
Scanning: C:\Users\David\Desktop\taspring\mods
Video mode set to 1280 x 800 / 32 bit
[ 0] SDL: 1.2.10
[ 0] GL: 2.1.2
[ 0] GL: NVIDIA Corporation
[ 0] GL: GeForce 8700M GT/PCI/SSE2
[ 0] GLEW: 1.4.0
[ 0] Connecting to 192.168.11.2:1462 using name [PURE]Argh
[ 0] Starting demo recording
[ 0] Using map Unpleasantville.smf
[ 0] Recording demo demos/20090310_031602_Unpleasantville_0.78.2.sdf
[ 0] Using script Commanders
[ 0] Using mod P.U.R.E. RC4 0.9
[ 0] Using mod archive PURE_COMPLETE.sdz
[ 0] Became player 1 (team 1, allyteam 1)
[ 0] Parsing unit icons
[ 0] Loading all definitions: 0.699000
[ 0] You are missing the "ARB_shadow_ambient" extension (this will probably make shadows darker than they should be)
[ 0] Opening map file
[ 0] Loading Map
[ 0] Loading detail textures
[ 0] Creating overhead texture
[ 0] Creating ground shading
[ 0] Loading tile file
[ 0] Reading tiles
[ 0] Reading tile map
[ 0] Creating projectile texture
[ 0] Number of damage types: 5
[ 0] Loading weapon definitions
[ 0] Loading unit definitions
[ 0] Loading feature definitions
[ 0] Generating trees
[ 0] Creating unit textures
[ 0] Initializing map features
[ 0] Reading estimate path costs
[ 0] Pathing data checksum: df72a618
[ 0] Creating sky
[ 0] Loading LuaRules
[ 0] gf1 = LuaRules/Gadgets/ai_boost.lua
[ 0] gf1 = LuaRules/Gadgets/alternative_radar.lua
[ 0] gf1 = LuaRules/Gadgets/ancientartifacts.lua
[ 0] gf1 = LuaRules/Gadgets/anticheat.lua
[ 0] gf1 = LuaRules/Gadgets/artyvelocitycontrol.lua
[ 0] gf1 = LuaRules/Gadgets/autohack.lua
[ 0] gf1 = LuaRules/Gadgets/autoreclaim.lua
[ 0] gf1 = LuaRules/Gadgets/blockingmap.lua
[ 0] gf1 = LuaRules/Gadgets/buildings.lua
[ 0] gf1 = LuaRules/Gadgets/cob_gadgets.lua
[ 0] gf1 = LuaRules/Gadgets/cob_gadgets_map.lua
[ 0] gf1 = LuaRules/Gadgets/customcommands.lua
[ 0] gf1 = LuaRules/Gadgets/decloak_fx.lua
[ 0] gf1 = LuaRules/Gadgets/dropme.lua
[ 0] gf1 = LuaRules/Gadgets/dropmine.lua
[ 0] gf1 = LuaRules/Gadgets/freezeme.lua
[ 0] gf1 = LuaRules/Gadgets/giverandommoveorder.lua
[ 0] gf1 = LuaRules/Gadgets/glsl_lighting.lua
[ 0] gf1 = LuaRules/Gadgets/group_select.lua
[ 0] gf1 = LuaRules/Gadgets/infantrycapture.lua
[ 0] gf1 = LuaRules/Gadgets/ionlaserexplosion.lua
[ 0] gf1 = LuaRules/Gadgets/knockover.lua
[ 0] gf1 = LuaRules/Gadgets/mapfixer.lua
[ 0] gf1 = LuaRules/Gadgets/maximartydeploy.lua
[ 0] gf1 = LuaRules/Gadgets/mbt_speedmod.lua
[ 0] gf1 = LuaRules/Gadgets/neutralizer.lua
[ 0] gf1 = LuaRules/Gadgets/prone.lua
[ 0] gf1 = LuaRules/Gadgets/reclaim_fx.lua
[ 0] gf1 = LuaRules/Gadgets/resourcefeaturesneutral.lua
[ 0] gf1 = LuaRules/Gadgets/resources.lua
[ 0] gf1 = LuaRules/Gadgets/simplegui.lua
[ 0] gf1 = LuaRules/Gadgets/teamdamage.lua
[ 0] gf1 = LuaRules/Gadgets/tiercontrol.lua
[ 0] gf1 = LuaRules/Gadgets/trails.lua
[ 0] gf1 = LuaRules/Gadgets/transform_heavytrooper.lua
[ 0] gf1 = LuaRules/Gadgets/transformadvancebase.lua
[ 0] gf1 = LuaRules/Gadgets/transformairbase.lua
[ 0] gf1 = LuaRules/Gadgets/transformmultitruck.lua
[ 0] gf1 = LuaRules/Gadgets/unblock.lua
[ 0] gf1 = LuaRules/Gadgets/unitgiven.lua
[ 0] gf2 = LuaRules/Gadgets/ai_boost.lua
[ 0] gf2 = LuaRules/Gadgets/alternative_radar.lua
[ 0] gf2 = LuaRules/Gadgets/ancientartifacts.lua
[ 0] gf2 = LuaRules/Gadgets/anticheat.lua
[ 0] gf2 = LuaRules/Gadgets/artyvelocitycontrol.lua
[ 0] gf2 = LuaRules/Gadgets/autohack.lua
[ 0] gf2 = LuaRules/Gadgets/autoreclaim.lua
[ 0] gf2 = LuaRules/Gadgets/blockingmap.lua
[ 0] gf2 = LuaRules/Gadgets/buildings.lua
[ 0] gf2 = LuaRules/Gadgets/cob_gadgets.lua
[ 0] gf2 = LuaRules/Gadgets/cob_gadgets_map.lua
[ 0] gf2 = LuaRules/Gadgets/customcommands.lua
[ 0] gf2 = LuaRules/Gadgets/decloak_fx.lua
[ 0] gf2 = LuaRules/Gadgets/dropme.lua
[ 0] gf2 = LuaRules/Gadgets/dropmine.lua
[ 0] gf2 = LuaRules/Gadgets/freezeme.lua
[ 0] gf2 = LuaRules/Gadgets/giverandommoveorder.lua
[ 0] gf2 = LuaRules/Gadgets/glsl_lighting.lua
[ 0] gf2 = LuaRules/Gadgets/group_select.lua
[ 0] gf2 = LuaRules/Gadgets/infantrycapture.lua
[ 0] gf2 = LuaRules/Gadgets/ionlaserexplosion.lua
[ 0] gf2 = LuaRules/Gadgets/knockover.lua
[ 0] gf2 = LuaRules/Gadgets/mapfixer.lua
[ 0] gf2 = LuaRules/Gadgets/maximartydeploy.lua
[ 0] gf2 = LuaRules/Gadgets/mbt_speedmod.lua
[ 0] gf2 = LuaRules/Gadgets/neutralizer.lua
[ 0] gf2 = LuaRules/Gadgets/prone.lua
[ 0] gf2 = LuaRules/Gadgets/reclaim_fx.lua
[ 0] gf2 = LuaRules/Gadgets/resourcefeaturesneutral.lua
[ 0] gf2 = LuaRules/Gadgets/resources.lua
[ 0] gf2 = LuaRules/Gadgets/simplegui.lua
[ 0] gf2 = LuaRules/Gadgets/teamdamage.lua
[ 0] gf2 = LuaRules/Gadgets/tiercontrol.lua
[ 0] gf2 = LuaRules/Gadgets/trails.lua
[ 0] gf2 = LuaRules/Gadgets/transform_heavytrooper.lua
[ 0] gf2 = LuaRules/Gadgets/transformadvancebase.lua
[ 0] gf2 = LuaRules/Gadgets/transformairbase.lua
[ 0] gf2 = LuaRules/Gadgets/transformmultitruck.lua
[ 0] gf2 = LuaRules/Gadgets/unblock.lua
[ 0] gf2 = LuaRules/Gadgets/unitgiven.lua
[ 0] Loaded gadget: AI Booster <ai_boost.lua>
[ 0] Loaded gadget: GLSL Lighting <glsl_lighting.lua>
[ 0] Loaded gadget: Simple GUI <simplegui.lua>
[ 0] Loaded gadget: TeamDamage <teamdamage.lua>
[ 0] Loaded gadget: Ancient Artifacts <ancientartifacts.lua>
[ 0] Loaded gadget: AntiCheat <anticheat.lua>
[ 0] Loaded gadget: Artillery Velocity Control <artyvelocitycontrol.lua>
[ 0] Loaded gadget: AutoHack <autohack.lua>
[ 0] Loaded gadget: AutoReclaim <autoreclaim.lua>
[ 0] Loaded gadget: BlockingMap.lua <blockingmap.lua>
[ 0] Loaded gadget: Buildings <buildings.lua>
[ 0] Loaded gadget: COB_Gadgets.lua <cob_gadgets.lua>
[ 0] Loaded gadget: COB_Gadgets_MAP.lua <cob_gadgets_map.lua>
[ 0] Loaded gadget: Cloak FX <decloak_fx.lua>
[ 0] Loaded gadget: CustomCommands.lua <customcommands.lua>
[ 0] Loaded gadget: Drop Mine <dropmine.lua>
[ 0] Loaded gadget: DropMe <dropme.lua>
[ 0] Loaded gadget: FreezeMe <freezeme.lua>
[ 0] Loaded gadget: Infantry Capture <infantrycapture.lua>
[ 0] Loaded gadget: IonLaserExplosion <ionlaserexplosion.lua>
[ 0] Loaded gadget: KnockOver <knockover.lua>
[ 0] Loaded gadget: MBT SpeedMod <mbt_speedmod.lua>
[ 0] Loaded gadget: Map Fixer <mapfixer.lua>
[ 0] Loaded gadget: Maxim Artillery Deploy Gadget <maximartydeploy.lua>
[ 0] Loaded gadget: Neutralizer <neutralizer.lua>
[ 0] Loaded gadget: Prone <prone.lua>
[ 0] Loaded gadget: Random Move Order <giverandommoveorder.lua>
[ 0] Loaded gadget: Reclaim FX <reclaim_fx.lua>
[ 0] Loaded gadget: ResourceFeaturesNeutral <resourcefeaturesneutral.lua>
[ 0] Loaded gadget: Resources <resources.lua>
[ 0] Inserted unit advancebase into the build-tier system
[ 0] Inserted unit airbase into the build-tier system
[ 0] Inserted unit airfactory into the build-tier system
[ 0] Inserted unit landfactory into the build-tier system
[ 0] Loaded gadget: Tier Control <tiercontrol.lua>
[ 0] Loaded gadget: Transform Advance Base <transformadvancebase.lua>
[ 0] Loaded gadget: Transform Air Base <transformairbase.lua>
[ 0] Loaded gadget: Transform Heavy Trooper <transform_heavytrooper.lua>
[ 0] Loaded gadget: Transform Multi Truck <transformmultitruck.lua>
[ 0] Loaded gadget: UnBlock <unblock.lua>
[ 0] Loaded gadget: UnitGiven.lua <unitgiven.lua>
[ 0] Loaded gadget: group_select.lua <group_select.lua>
[ 0] Loaded gadget: trails <trails.lua>
[ 0] gf1 = LuaRules/Gadgets/ai_boost.lua
[ 0] gf1 = LuaRules/Gadgets/alternative_radar.lua
[ 0] gf1 = LuaRules/Gadgets/ancientartifacts.lua
[ 0] gf1 = LuaRules/Gadgets/anticheat.lua
[ 0] gf1 = LuaRules/Gadgets/artyvelocitycontrol.lua
[ 0] gf1 = LuaRules/Gadgets/autohack.lua
[ 0] gf1 = LuaRules/Gadgets/autoreclaim.lua
[ 0] gf1 = LuaRules/Gadgets/blockingmap.lua
[ 0] gf1 = LuaRules/Gadgets/buildings.lua
[ 0] gf1 = LuaRules/Gadgets/cob_gadgets.lua
[ 0] gf1 = LuaRules/Gadgets/cob_gadgets_map.lua
[ 0] gf1 = LuaRules/Gadgets/customcommands.lua
[ 0] gf1 = LuaRules/Gadgets/decloak_fx.lua
[ 0] gf1 = LuaRules/Gadgets/dropme.lua
[ 0] gf1 = LuaRules/Gadgets/dropmine.lua
[ 0] gf1 = LuaRules/Gadgets/freezeme.lua
[ 0] gf1 = LuaRules/Gadgets/giverandommoveorder.lua
[ 0] gf1 = LuaRules/Gadgets/glsl_lighting.lua
[ 0] gf1 = LuaRules/Gadgets/group_select.lua
[ 0] gf1 = LuaRules/Gadgets/infantrycapture.lua
[ 0] gf1 = LuaRules/Gadgets/ionlaserexplosion.lua
[ 0] gf1 = LuaRules/Gadgets/knockover.lua
[ 0] gf1 = LuaRules/Gadgets/mapfixer.lua
[ 0] gf1 = LuaRules/Gadgets/maximartydeploy.lua
[ 0] gf1 = LuaRules/Gadgets/mbt_speedmod.lua
[ 0] gf1 = LuaRules/Gadgets/neutralizer.lua
[ 0] gf1 = LuaRules/Gadgets/prone.lua
[ 0] gf1 = LuaRules/Gadgets/reclaim_fx.lua
[ 0] gf1 = LuaRules/Gadgets/resourcefeaturesneutral.lua
[ 0] gf1 = LuaRules/Gadgets/resources.lua
[ 0] gf1 = LuaRules/Gadgets/simplegui.lua
[ 0] gf1 = LuaRules/Gadgets/teamdamage.lua
[ 0] gf1 = LuaRules/Gadgets/tiercontrol.lua
[ 0] gf1 = LuaRules/Gadgets/trails.lua
[ 0] gf1 = LuaRules/Gadgets/transform_heavytrooper.lua
[ 0] gf1 = LuaRules/Gadgets/transformadvancebase.lua
[ 0] gf1 = LuaRules/Gadgets/transformairbase.lua
[ 0] gf1 = LuaRules/Gadgets/transformmultitruck.lua
[ 0] gf1 = LuaRules/Gadgets/unblock.lua
[ 0] gf1 = LuaRules/Gadgets/unitgiven.lua
[ 0] gf2 = LuaRules/Gadgets/ai_boost.lua
[ 0] gf2 = LuaRules/Gadgets/alternative_radar.lua
[ 0] gf2 = LuaRules/Gadgets/ancientartifacts.lua
[ 0] gf2 = LuaRules/Gadgets/anticheat.lua
[ 0] gf2 = LuaRules/Gadgets/artyvelocitycontrol.lua
[ 0] gf2 = LuaRules/Gadgets/autohack.lua
[ 0] gf2 = LuaRules/Gadgets/autoreclaim.lua
[ 0] gf2 = LuaRules/Gadgets/blockingmap.lua
[ 0] gf2 = LuaRules/Gadgets/buildings.lua
[ 0] gf2 = LuaRules/Gadgets/cob_gadgets.lua
[ 0] gf2 = LuaRules/Gadgets/cob_gadgets_map.lua
[ 0] gf2 = LuaRules/Gadgets/customcommands.lua
[ 0] gf2 = LuaRules/Gadgets/decloak_fx.lua
[ 0] gf2 = LuaRules/Gadgets/dropme.lua
[ 0] gf2 = LuaRules/Gadgets/dropmine.lua
[ 0] gf2 = LuaRules/Gadgets/freezeme.lua
[ 0] gf2 = LuaRules/Gadgets/giverandommoveorder.lua
[ 0] gf2 = LuaRules/Gadgets/glsl_lighting.lua
[ 0] gf2 = LuaRules/Gadgets/group_select.lua
[ 0] gf2 = LuaRules/Gadgets/infantrycapture.lua
[ 0] gf2 = LuaRules/Gadgets/ionlaserexplosion.lua
[ 0] gf2 = LuaRules/Gadgets/knockover.lua
[ 0] gf2 = LuaRules/Gadgets/mapfixer.lua
[ 0] gf2 = LuaRules/Gadgets/maximartydeploy.lua
[ 0] gf2 = LuaRules/Gadgets/mbt_speedmod.lua
[ 0] gf2 = LuaRules/Gadgets/neutralizer.lua
[ 0] gf2 = LuaRules/Gadgets/prone.lua
[ 0] gf2 = LuaRules/Gadgets/reclaim_fx.lua
[ 0] gf2 = LuaRules/Gadgets/resourcefeaturesneutral.lua
[ 0] gf2 = LuaRules/Gadgets/resources.lua
[ 0] gf2 = LuaRules/Gadgets/simplegui.lua
[ 0] gf2 = LuaRules/Gadgets/teamdamage.lua
[ 0] gf2 = LuaRules/Gadgets/tiercontrol.lua
[ 0] gf2 = LuaRules/Gadgets/trails.lua
[ 0] gf2 = LuaRules/Gadgets/transform_heavytrooper.lua
[ 0] gf2 = LuaRules/Gadgets/transformadvancebase.lua
[ 0] gf2 = LuaRules/Gadgets/transformairbase.lua
[ 0] gf2 = LuaRules/Gadgets/transformmultitruck.lua
[ 0] gf2 = LuaRules/Gadgets/unblock.lua
[ 0] gf2 = LuaRules/Gadgets/unitgiven.lua
[ 0] Loaded gadget: AI Booster <ai_boost.lua>
[ 0] GLSL Light Shader Succeeded
[ 0] Loaded gadget: GLSL Lighting <glsl_lighting.lua>
[ 0] Loaded gadget: Simple GUI <simplegui.lua>
[ 0] Loaded gadget: TeamDamage <teamdamage.lua>
[ 0] Loaded gadget: Ancient Artifacts <ancientartifacts.lua>
[ 0] Loaded gadget: AntiCheat <anticheat.lua>
[ 0] Loaded gadget: Artillery Velocity Control <artyvelocitycontrol.lua>
[ 0] Loaded gadget: AutoHack <autohack.lua>
[ 0] Loaded gadget: AutoReclaim <autoreclaim.lua>
[ 0] Loaded gadget: BlockingMap.lua <blockingmap.lua>
[ 0] Loaded gadget: Buildings <buildings.lua>
[ 0] Loaded gadget: COB_Gadgets.lua <cob_gadgets.lua>
[ 0] Loaded gadget: COB_Gadgets_MAP.lua <cob_gadgets_map.lua>
[ 0] Loaded gadget: Cloak FX <decloak_fx.lua>
[ 0] Loaded gadget: CustomCommands.lua <customcommands.lua>
[ 0] Loaded gadget: Drop Mine <dropmine.lua>
[ 0] Loaded gadget: DropMe <dropme.lua>
[ 0] Loaded gadget: FreezeMe <freezeme.lua>
[ 0] Loaded gadget: Infantry Capture <infantrycapture.lua>
[ 0] Loaded gadget: IonLaserExplosion <ionlaserexplosion.lua>
[ 0] Loaded gadget: KnockOver <knockover.lua>
[ 0] Loaded gadget: MBT SpeedMod <mbt_speedmod.lua>
[ 0] Loaded gadget: Map Fixer <mapfixer.lua>
[ 0] Loaded gadget: Maxim Artillery Deploy Gadget <maximartydeploy.lua>
[ 0] Loaded gadget: Neutralizer <neutralizer.lua>
[ 0] Loaded gadget: Prone <prone.lua>
[ 0] Loaded gadget: Random Move Order <giverandommoveorder.lua>
[ 0] Loaded gadget: Reclaim FX <reclaim_fx.lua>
[ 0] Loaded gadget: ResourceFeaturesNeutral <resourcefeaturesneutral.lua>
[ 0] Loaded gadget: Resources <resources.lua>
[ 0] Loaded gadget: Tier Control <tiercontrol.lua>
[ 0] Loaded gadget: Transform Advance Base <transformadvancebase.lua>
[ 0] Loaded gadget: Transform Air Base <transformairbase.lua>
[ 0] Loaded gadget: Transform Heavy Trooper <transform_heavytrooper.lua>
[ 0] Loaded gadget: Transform Multi Truck <transformmultitruck.lua>
[ 0] Loaded gadget: UnBlock <unblock.lua>
[ 0] Loaded gadget: UnitGiven.lua <unitgiven.lua>
[ 0] Loaded gadget: group_select.lua <group_select.lua>
[ 0] Loaded gadget: trails <trails.lua>
[ 0] Loading LuaGaia
[ 0] gf1 = LuaGaia/Gadgets/00001world_builder.lua
[ 0] gf2 = LuaGaia/Gadgets/00001world_builder.lua
[ 0] Loaded gadget: World Builder (Automated) <00001world_builder.lua>
[ 0] gf1 = LuaGaia/Gadgets/00001world_builder.lua
[ 0] gf2 = LuaGaia/Gadgets/00001world_builder.lua
[ 0] Loaded gadget: World Builder (Automated) <00001world_builder.lua>
[ 0] Loading LuaUI
[ 0] This mod has locked LuaUI access
[ 0] Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
[ 0] LuaUI: bound F11 to the widget selector
[ 0] LuaUI: bound CTRL+F11 to tweak mode
[ 0] Loaded widget: Streetlamps <streetlamps.lua>
[ 0] Reloaded cmdcolors with: newfile.tmp
[ 0] Loaded widget: P.U.R.E. Team Display (ALL) <pure_teamcirclesall.lua>
[ 0] Loaded widget: Dynamic Blob Shadows <dynamic_blob_shadows.lua>
[ 0] Loaded widget: Mine Widget <mine_widget.lua>
[ 0] Loaded widget: Tooltip Fixes <tooltip_fixes.lua>
[ 0] Loaded widget: Range Widget <range_widget.lua>
[ 0] Loaded widget: Select at Start <selectatstart.lua>
[ 0] Loaded widget: XX Start Point Remover XX <init_start_point_remover.lua>
[ 0] Reloaded ctrlpanel with: pure_panel.txt
[ 0] Loaded widget: UI Support <resbardisable.lua>
[ 0] Loaded widget: XX Attack AoE XX <gui_attack_aoe.lua>
[ 0] Loaded widget: P.U.R.E. Unit Status Display <pure_statusdisplay.lua>
[ 0] Loaded widget: XX Custom Formations XX <unit_customformations.lua>
[ 0] LuaUI v0.2
[ 0] Finalizing...
[ 0] Spring 0.78.2.0 (0.78.2-0-g716ba18{@}-s)
[ 0] Build date/time: Jan 17 2009 22:08:13
[ 0] Player [PURE]Argh connected with number 1 (client version 0.78.2.0 (0.78.2-0-g716ba18{@}-s))
[ 0] Player Eman finished loading and is now ingame
[ 0] Player ]NM[Cetrius[Anti_BA] finished loading and is now ingame
[ 0] Player [PURE]Argh finished loading and is now ingame
[ 0] GameID: c813b6494ae514870e6ed9decf5a1f07
[ 30] Number of water squares found: 0
[ 33] Removing Neutralizer Gadget
[ 34] Removing P.U.R.E. Neutralizer Gadget
[ 99] Metal Created = 18
[ 99] Power Created = 9
[ 99] Metal Ratio Set = 5.5555553436279
[ 99] Power Ratio Set = 11.111110687256
[ 100] Removing P.U.R.E. Gameplay Gadget
[ 294] <]NM[Cetrius[Anti_BA]> o.O compressed didnt help
[ 295] Speed set to 0.8 [Eman]
[ 298] Speed set to 0.6 [Eman]
[ 462] Buildings set to face West
[ 732] <]NM[Cetrius[Anti_BA]> just made them brighter
[ 869] <[PURE]Argh> sigh
[ 1220] <[PURE]Argh> there's a Registry setting, "atihacks"
[ 1284] <[PURE]Argh> might work
[ 1342] <]NM[Cetrius[Anti_BA]> kk
[ 5189] Mine is being attacked
[ 5238] This building cannot hold any more infantry.
[ 5304] Ancient Metal Facility is being attacked
[ 5413] This building cannot hold any more infantry.
[ 5452] This building cannot hold any more infantry.
[ 5514] This building cannot hold any more infantry.
[ 5796] Ancient Metal Facility is being attacked
[ 5972] Ancient Metal Facility is being attacked
[ 6084] Mine is being attacked
[ 6174] MegaConstructor is being attacked
[ 6276] MegaConstructor is being attacked
[ 6388] Engineering Team is being attacked
[ 6388] MegaConstructor is being attacked
[ 6491] Engineering Team is being attacked
[ 6596] Ancient Reactor is being attacked
[ 6708] Ancient Reactor is being attacked
[ 6820] Ancient Reactor is being attacked
[ 6896] This building cannot hold any more infantry.
[ 6929] Ancient Metal Facility is being attacked
[ 7019] This building cannot hold any more infantry.
[ 7396] Ancient Metal Facility is being attacked
[ 7432] This building cannot hold any more infantry.
[ 7691] Small house. is being attacked
[ 8047] This building cannot hold any more infantry.
[ 8436] Skyscraper is being attacked
[ 8511] This building cannot hold any more infantry.
[ 8705] This building cannot hold any more infantry.
[ 10220] This building cannot hold any more infantry.
[ 10519] This building cannot hold any more infantry.
[ 10571] This building cannot hold any more infantry.
[ 10636] Resistance Rocketeer is being attacked
[ 10900] Skyscraper is being attacked
[ 10936] Spring 0.78.2.0 (0.78.2-0-g716ba18{@}-s) has crashed.
[ 10936] Exception: Access violation (0xc0000005)
[ 10936] Exception Address: 0x0049a899
[ 10936] DLL information:
[ 10936] 0x00400000 spring
[ 10936] 0x77390000 ntdll
[ 10936] 0x76f70000 kernel32
[ 10936] 0x76850000 ADVAPI32
[ 10936] 0x774c0000 RPCRT4
[ 10936] 0x6da50000 dsound
[ 10936] 0x767a0000 msvcrt
[ 10936] 0x77050000 USER32
[ 10936] 0x76c20000 GDI32
[ 10936] 0x76d50000 ole32
[ 10936] 0x73450000 WINMM
[ 10936] 0x76920000 OLEAUT32
[ 10936] 0x73920000 OLEACC
[ 10936] 0x74e10000 POWRPROF
[ 10936] 0x6a8f0000 GLU32
[ 10936] 0x6a820000 OPENGL32
[ 10936] 0x6c0d0000 DDRAW
[ 10936] 0x70930000 DCIMAN32
[ 10936] 0x77200000 SETUPAPI
[ 10936] 0x73440000 dwmapi
[ 10936] 0x76ac0000 IMAGEHLP
[ 10936] 0x6fbc0000 mingwm10
[ 10936] 0x75c90000 SHELL32
[ 10936] 0x76c70000 SHLWAPI
[ 10936] 0x731b0000 WSOCK32
[ 10936] 0x771d0000 WS2_32
[ 10936] 0x76ab0000 NSI
[ 10936] 0x6ed80000 glew32
[ 10936] 0x10000000 SDL
[ 10936] 0x7c340000 MSVCR71
[ 10936] 0x00240000 DevIL
[ 10936] 0x66fc0000 freetype6
[ 10936] 0x61b80000 zlib1
[ 10936] 0x003d0000 ILU
[ 10936] 0x769b0000 IMM32
[ 10936] 0x76ea0000 MSCTF
[ 10936] 0x77590000 LPK
[ 10936] 0x75c10000 USP10
[ 10936] 0x75a70000 NTMARTA
[ 10936] 0x775a0000 WLDAP32
[ 10936] 0x75c00000 PSAPI
[ 10936] 0x75a50000 SAMLIB
[ 10936] 0x74c10000 comctl32
[ 10936] 0x75ac0000 USERENV
[ 10936] 0x75aa0000 Secur32
[ 10936] 0x74600000 uxtheme
[ 10936] 0x76a20000 CLBCatQ
[ 10936] 0x71ca0000 msiltcfg
[ 10936] 0x74e00000 VERSION
[ 10936] 0x71720000 msi
[ 10936] 0x71b80000 SFC
[ 10936] 0x71c90000 sfc_os
[ 10936] 0x69500000 nvoglv32
[ 10936] 0x75230000 mswsock
[ 10936] 0x74920000 wshtcpip
[ 10936] 0x745a0000 MMDevApi
[ 10936] 0x748f0000 WINTRUST
[ 10936] 0x75510000 CRYPT32
[ 10936] 0x75670000 MSASN1
[ 10936] 0x732d0000 AUDIOSES
[ 10936] 0x73260000 audioeng
[ 10936] 0x748e0000 AVRT
[ 10936] 0x728a0000 dbghelp
[ 10936] Stacktrace:
[ 10936] (0) C:\Users\David\Desktop\taspring\spring.exe [0x0049A899]
[ 10936] (1) C:\Users\David\Desktop\taspring\spring.exe [0x0049686D]
[ 10936] (2) C:\Users\David\Desktop\taspring\spring.exe [0x004907DC]
[ 10936] (3) C:\Users\David\Desktop\taspring\spring.exe [0x0083037C]
[ 10936] (4) C:\Users\David\Desktop\taspring\spring.exe [0x0083EFDB]
[ 10936] (5) C:\Users\David\Desktop\taspring\spring.exe [0x00844477]
[ 10936] (6) C:\Users\David\Desktop\taspring\spring.exe [0x005E20AB]
[ 10936] (7) C:\Users\David\Desktop\taspring\spring.exe [0x005ED3B6]
[ 10936] (8) C:\Users\David\Desktop\taspring\spring.exe [0x005E0ED1]
[ 10936] (9) C:\Users\David\Desktop\taspring\spring.exe [0x005E10D9]
[ 10936] (10) C:\Users\David\Desktop\taspring\spring.exe [0x00A57211]
[ 10936] (11) C:\Users\David\Desktop\taspring\spring.exe [0x004010A7]
[ 10936] (12) C:\Users\David\Desktop\taspring\spring.exe [0x00401123]
[ 10936] (13) C:\Windows\system32\kernel32.dll(BaseThreadInitThunk+0x12) [0x76FB4911]
[ 10936] (14) C:\Windows\system32\ntdll.dll(RtlInitializeExceptionChain+0x63) [0x773CE4B6]
[ 10936] (15) C:\Windows\system32\ntdll.dll(RtlInitializeExceptionChain+0x36) [0x773CE489]
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Very Odd Crashing Bug

Post by Argh »

I think I may have found it. It's a float error. The GetUnitsInSphere, I adjusted it to use 5.5. I'll try 6, see if the bug disappears.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Very Odd Crashing Bug

Post by AF »

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Very Odd Crashing Bug

Post by Argh »

Meh. I thought it was cured, but maybe not. I'm seeing a mysterious crash with the Chicken Defense. No warning, either, I've cured the minor Lua bugeroos of the first alpha, so it's something serious (and hopefully something I can just repair on my end).

Now that I've finally determined that I'm supposed to be doing stracktrace online (that needs to be documented better, imo, I had to do searches of the forum threads to find that out) lemme see exactly what I get...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Very Odd Crashing Bug

Post by Argh »

Hmm, the bug seems to have something to do with sound. I switched back to the old play-sound stuff, and it almost looks like it's not returning properly before the UnitID is terminated, or something like that.

See here for stacktrace translation.

If that's the case, using a newer build of Spring, with the new soundcode, may make this problem go away.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Very Odd Crashing Bug

Post by imbaczek »

Code: Select all

void CCobInstance::PlayUnitSound(int snr, int attr)
{
  int sid = script.sounds[snr];
  //logOutput.Print("Playing %d %d %d", snr, attr, sid);
  sound->PlaySample(sid, unit->pos, attr);
}
therefore there are three places it could crash in this line:
1. snr is wrong, ie. there's no such sound. (this should be checked if it isn't already, engine bug.)
2. unit doesn't exist. impossible.
3. sound doesn't exist. ain't happening.

don't have any other idea.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Very Odd Crashing Bug

Post by Argh »

1. snr is wrong, ie. there's no such sound. (this should be checked if it isn't already, engine bug.)
Gotta be that. I'll double check, and make absolutely sure, but I am 99.9% sure that there is no possibility of a missing sound being the cause. Moreover, a missing sound should only cause an error, not cause Spring to terminate suddenly ;)
Post Reply

Return to “Engine”