View Issue Details

IDProjectCategoryView StatusLast Update
0000330Medieval EngineersBugpublic2022-05-11 20:27
Reportergwindalmir Assigned Togwindalmir  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
PlatformWindowsOS10OS Version10.0
Product Version0.7.3.33D4BB 
Target Version0.7.3.968CF8Fixed in Version0.7.3.968CF8 
Summary0000330: Definition Merge=Append causes infinite list duplication and then game hang if the modded list is empty
Description

If you try to create a definition in a mod that's set to append to an existing one, but the section of the definition that contains a list is omitted, the source list is duplicated infinitely, eventually causing an OutOfMemoryException.

Steps To Reproduce

Create a new PlanetMapDefinition, copying the data from the vanilla MapDefinition.sbc
Set Merge=Append in the definition
Omit either RegionView or KingdomView entirely
Load the mod

Additional Information

Additionally, the game will hang with a black background after you click the button to dismiss the error popup.

TagsMod API

Activities

gwindalmir

2022-05-11 01:08

administrator  

MapDefinition.sbc (2,459 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Definition xsi:type="MyObjectBuilder_PlanetMapDefinition" Merge="Append">
    <Id Type="MyObjectBuilder_PlanetMapDefinition" Subtype="Main" />

    <RegionView>
      <Layers>
        <Layer xsi:type="MyObjectBuilder_MapBackgroundLayer" />
        <Layer xsi:type="MyObjectBuilder_PlanetWonderLayer" />
        <Layer xsi:type="MyObjectBuilder_AreaDevelopmentLayer">
          <Threshold BlockCount="10" Sprite="Textures\GUI\Map\SmallGrid.png" />
          <Threshold BlockCount="30" Sprite="Textures\GUI\Map\MediumGrid.png" />
          <Threshold BlockCount="60" Sprite="Textures\GUI\Map\LargeGrid.png" />
        </Layer>
        <Layer xsi:type="MyObjectBuilder_RegionFastTravelLayer" Name="FastTravel" Visible="false">
          <UnreachableColor R="255" G="255" B="255" A="128" />
          <ReachableColor R="100" G="255" B="100" A="0" />
          <BlockedByTerrainColor R="0" G="0" B="0" A="224" />
          <BlockedByPlayerColor R="240" G="192" B="0" A="128" />
        </Layer>
        <Layer xsi:type="MyObjectBuilder_AreaOwnershipLayer">
          <!-- colors are in AARRGGBB format-->
          <AlliedBgColor Hex="#806464FF" />
          <PlayerBgColor Hex="#8064FF64" />
          <EnemyBgColor Hex="#80DC6415" />
        </Layer>
        <Layer xsi:type="MyObjectBuilder_AreaUpkeepLayer">
          <TaxIcon>Textures\GUI\Map\TaxIcon.png</TaxIcon>
        </Layer>
        <Layer xsi:type="MyObjectBuilder_PlanetMapPositionLayer">
          <LocalPlayerImage>Textures\GUI\Map\PlayerPosition.png</LocalPlayerImage>
          <OtherPlayersImage>Textures\GUI\Map\AllyPosition.png</OtherPlayersImage>
        </Layer>
        <Layer xsi:type="MyObjectBuilder_ActionTrackingLayer">
          <ActionImage>Textures\GUI\Map\Action.png</ActionImage>
        </Layer>
        <Layer xsi:type="MyObjectBuilder_CurrentMapSelectionLayer">
          <SelectionImage>Textures\GUI\Map\MapSelection.dds</SelectionImage>
        </Layer>
        <Layer xsi:type="MyObjectBuilder_PlanetMapGridLayer">
          <GridColor R="0" G="0" B="0" A="228" />
        </Layer>
        <!--
		<Layer xsi:type="MyObjectBuilder_AreaTreasureHintLayer">
			<Color Hex="#55FF0000" />
		</Layer>
		-->
      </Layers>
    </RegionView>
  </Definition>
</Definitions>
MapDefinition.sbc (2,459 bytes)   

Issue History

Date Modified Username Field Change
2022-05-11 01:08 gwindalmir New Issue
2022-05-11 01:08 gwindalmir Status new => assigned
2022-05-11 01:08 gwindalmir Assigned To => gwindalmir
2022-05-11 01:08 gwindalmir Tag Attached: Mod API
2022-05-11 01:08 gwindalmir File Added: MapDefinition.sbc
2022-05-11 01:14 gwindalmir Description Updated
2022-05-11 01:15 gwindalmir Status assigned => in progress
2022-05-11 01:27 gwindalmir Additional Information Updated
2022-05-11 01:49 gwindalmir Summary Definition Merge=Append causes infinite list duplication if the modded list is empty => Definition Merge=Append causes infinite list duplication and then game hang if the modded list is empty
2022-05-11 20:27 gwindalmir Status in progress => closed
2022-05-11 20:27 gwindalmir Fixed in Version => 0.7.3.968CF8