View Issue Details

IDProjectCategoryView StatusLast Update
0003734The Dark ModDef / Setuppublic25.05.2014 15:09
ReporterSteveL Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityalways
Status closedResolutionfixed 
PlatformpcOSwindowsOS Version7.1
Product VersionTDM 2.01 
Target VersionTDM 2.02Fixed in VersionTDM 2.02 
Summary0003734: Giving player a slow match at map start causes TDM shop handling code to crash
DescriptionIf you try to load a map containing a slow match with spawnarg inv_map_start set to 1, TDM will crash on loading the map after you leave the shop page. This happens only if you use the menus to load the map, not when you launch the map from the console.

The problem is that the shop handling code is not finding the entity def for some reason. The unhandled exception comes from line 1636 in Player.cpp, when the code first tries to set a spawnarg on the newly spawned entity. In this case, the entity has been spawned using a default entity def, not the one from player_tools.def, and it doesn't work. I have no idea why it's not finding the entity def. Those have been loaded at some point previous to the crash.
Steps To ReproduceAdd a slow match to a map with inv_map_start --> 1 and try to load the map using the "New Mission" menu. Test map attached containing an empty room with a light and a slow match only.

The map will load ok using the console MAP command (and the player will get a slow match as expected). It'll load ok if you remove the inv_map_start spawnarg too.
TagsNo tags attached.

Activities

SteveL

SteveL

24.05.2014 12:06

reporter  

slowmatch.map (5,438 bytes)   
Version 2
// entity 0
{
"classname" "worldspawn"
"editor_drLastCameraPos" "258 59 64"
"editor_drLastCameraAngle" "0 90 0"
// primitive 0
{
brushDef3
{
( 0 0 1 -208 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 1 0 0 -320 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 -1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( -1 0 0 -64 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 0 -1 192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 1 0 -208 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 1 0 0 -320 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 0 -1 0 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( -1 0 0 -64 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 -1 0 192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 1 0 0 -336 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 0 -1 0 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 -1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( -1 0 0 320 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 1 0 0 -320 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 0 -1 -16 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 -1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( -1 0 0 -64 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 0 1 0 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 1 0 0 -320 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 0 -1 0 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 -1 0 -208 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( -1 0 0 -64 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 1 0 192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 0 1 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 0 -1 0 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 0 -1 0 -192 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( -1 0 0 -80 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
( 1 0 0 64 ) ( ( 0.01302083302289248 0 0 ) ( 0 0.01302083302289248 0 ) ) "textures/darkmod/stone/brick/blocks_brown" 0 0 0
}
}
}
// entity 1
{
"classname" "atdm:ambient_world"
"name" "ambient_world"
"_color" "0.22 0.22 0.22"
"light_center" "0 0 0"
"light_radius" "832 624 320"
"nodiffuse" "0"
"noshadows" "0"
"nospecular" "0"
"origin" "-32 0 160"
"parallel" "0"
"texture" "lights/ambientlightnfo"
}
// entity 2
{
"classname" "info_player_start"
"name" "info_player_start_1"
"angle" "90"
"origin" "258 59 0"
}
// entity 3
{
"classname" "atdm:playertools_slow_match"
"name" "atdm_playertools_slow_match_2"
"origin" "180 44 36"
"inv_map_start" "1"
}
slowmatch.map (5,438 bytes)   
SteveL

SteveL

24.05.2014 12:11

reporter   ~0006621

NB This turned out to be the reason why that dynamic moonlight demo I did in March could only be launched from the console. grayman confirmed it too: crash from menu, ok from console.
grayman

grayman

25.05.2014 00:51

viewer   ~0006630

It also works if there's no shop. "In the North" gives the player a slowmatch, but there's no shop to mess things up.
grayman

grayman

25.05.2014 00:52

viewer   ~0006631

This is important enough to fix in 2.02.

Please bring it up on the 2.02 beta test thread and see if others agree.
grayman

grayman

25.05.2014 13:29

viewer   ~0006636

Shop items require an entry in tdm_shopitems.def.

For the slow match, this entry existed, but included this line:

"itemClassname" "slow_match" //MUST BE SAME AS MAP ENTITY DEF NAME

Note the comment. Since "slow_match" is NOT the entityDef name (which is "atdm:playertools_slow_match"), the code crashed.

Corrected the line to be:

"itemClassname" "atdm:playertools_slow_match" //MUST BE SAME AS MAP ENTITY DEF NAME

SteveL

SteveL

25.05.2014 15:09

reporter   ~0006637

Confirmed fix works this end after picking up your new .def

Issue History

Date Modified Username Field Change
24.05.2014 12:06 SteveL New Issue
24.05.2014 12:06 SteveL File Added: slowmatch.map
24.05.2014 12:11 SteveL Note Added: 0006621
25.05.2014 00:51 grayman Note Added: 0006630
25.05.2014 00:52 grayman Note Added: 0006631
25.05.2014 12:49 grayman Assigned To => grayman
25.05.2014 12:49 grayman Status new => assigned
25.05.2014 13:29 grayman Note Added: 0006636
25.05.2014 13:29 grayman Status assigned => resolved
25.05.2014 13:29 grayman Resolution open => fixed
25.05.2014 13:29 grayman Fixed in Version => TDM 2.02
25.05.2014 13:29 grayman Target Version => TDM 2.02
25.05.2014 15:09 SteveL Note Added: 0006637
25.05.2014 15:09 SteveL Status resolved => closed