New to Modding OpenRA - Crash becuase of new unit

crash when clicing on new building options

Information and discussion for custom maps and mods.
scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Post by scorp »

i've had this again.

again crash in the midst of a larger battle. What it had in commn with the last time it happened is the use of Missile Subs. I haven't made changes to those, though.

Phrohdoh
Posts: 28
Joined: Wed Apr 09, 2014 2:30 am
Location: Dallas, TX

Post by Phrohdoh »

We will need your "exception.log" (preferably at a site like pastebin.com) to help with this.
To find the file I'll refer you to the wiki: https://github.com/OpenRA/OpenRA/wiki/F ... st-crashed

scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Post by scorp »

Phrohdoh wrote: We will need your "exception.log" (preferably at a site like pastebin.com) to help with this.
To find the file I'll refer you to the wiki: https://github.com/OpenRA/OpenRA/wiki/F ... st-crashed
the Crash log can be found 4 posting further back. No, i don't have a time machine :lol:

scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Post by scorp »

so after a few releases have gone by, and with pretty much every release changing yaml logics and other mod-relevant things, i tried to recover some content from my older mods for the current release

Now a certain .shp i used in the old Version causes a Crash at Startup: It uses the same sequences that it did use in the old Version.

Runtime Version: .NET CLR 4.0.30319.34209
Exception of type `System.IndexOutOfRangeException`: Der Index war außerhalb des Arraybereichs.
bei OpenRA.FileFormats.Format80.DecodeInto(Byte[] src, Byte[] dest, Int32 srcOffset, Boolean reverse)
bei OpenRA.Mods.Common.SpriteLoaders.ShpTDSprite.Decompress(ImageHeader h)
bei OpenRA.Mods.Common.SpriteLoaders.ShpTDSprite..ctor(Stream stream)
bei OpenRA.Mods.Common.SpriteLoaders.ShpTDLoader.TryParseSprite(Stream s, ISpriteFrame[]& frames)
bei OpenRA.Graphics.SpriteLoader.GetFrames(String filename, ISpriteLoader[] loaders)
bei OpenRA.Graphics.SpriteLoader.GetSprites(String filename, ISpriteLoader[] loaders, SheetBuilder sheetBuilder)
bei OpenRA.Graphics.SpriteCache.<SpriteCache>c__AnonStorey0.<>m__0(String filename)
bei OpenRA.Exts.GetOrAdd[K,V](Dictionary`2 d, K k, Func`2 createFn)
bei OpenRA.Primitives.Cache`2.get_Item(T key)
bei OpenRA.Graphics.SpriteCache.get_Item(String filename)
bei OpenRA.Mods.Common.Graphics.DefaultSpriteSequence..ctor(ModData modData, TileSet tileSet, SpriteCache cache, ISpriteSequenceLoader loader, String sequence, String animation, MiniYaml info)
bei OpenRA.Mods.Common.Graphics.TilesetSpecificSpriteSequenceLoader.CreateSequence(ModData modData, TileSet tileSet, SpriteCache cache, String sequence, String animation, MiniYaml info)
bei OpenRA.Mods.Common.Graphics.DefaultSpriteSequenceLoader.ParseSequences(ModData modData, TileSet tileSet, SpriteCache cache, MiniYamlNode node)
bei OpenRA.Graphics.SequenceCache.<Load>c__AnonStorey1.<>m__0()
bei System.Lazy`1.CreateValue()
bei System.Lazy`1.LazyInitValue()
bei System.Lazy`1.get_Value()
bei OpenRA.Graphics.SequenceProvider.Preload()
bei OpenRA.ModData.PrepareMap(String uid)
bei OpenRA.Game.StartGame(String mapUID, WorldType type)
bei OpenRA.Game.LoadShellMap()
bei OpenRA.Mods.Common.LoadScreens.BlankLoadScreen.StartGame(Arguments args)
bei OpenRA.Game.InitializeMod(String mod, Arguments args)
bei OpenRA.Game.Initialize(Arguments args)
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)

apparently, the new Version can't load that SHP for some reason while the old Version could? I tried a variety of different rules/sequences Setups, but the Crash strangely persists.

Thanks for any pointers in case anyone has encountered this before

scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Post by scorp »

i Keep getting this for a lot of custom shp's.

has the code for shp rendering been altered recently? or does anybody know what Kind of issue may have caused this?

User avatar
Graion Dilach
Posts: 274
Joined: Fri May 15, 2015 5:57 pm

Post by Graion Dilach »

Well, I never had that issue but I also know that most custom SHPs around the internet are TS SHPs... but seriously without a crashing example I can only suggest adding ShpTS into mod.yaml>SpriteFormats: if that haven't been done before.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

abcdefg30
Posts: 373
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

That's weird... I had the same error with my .shp files. Changing them to SHP(TS) solved the crash though.

User avatar
Graion Dilach
Posts: 274
Joined: Fri May 15, 2015 5:57 pm

Post by Graion Dilach »

Most OS SHP Builder versions does not support pre-TS SHP saving and spits out bugged results. This got fixed in this April. Use the last beta version from http://svn.ppmsite.com/filedetails.php? ... uilder.exe .
Last edited by Graion Dilach on Sat Oct 17, 2015 8:36 pm, edited 1 time in total.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Post by scorp »

Graion Dilach wrote: Well, I never had that issue but I also know that most custom SHPs around the internet are TS SHPs... but seriously without a crashing example I can only suggest adding ShpTS into mod.yaml>SpriteFormats: if that haven't been done before.
hmm i use a copy of the red alert mod.yaml (with alterations only where i have custom content) so my mod.yaml looks as follows:

SpriteFormats: ShpTD, TmpRA, TmpTD, ShpTS

okay i guess i'll need to change one of the shp files in question to SHP(TS) as well to test abcdefg30's workaround. What is the easiest way to do this?

(Please note: i get a blank site when opening the link posted before http://svn.ppmsite.com/filedetails.php? ... uilder.exe. )

I'll try the conversion in OS shp builder and report back.

Thank you guys for your help, hope that works :)

abcdefg30
Posts: 373
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

I just opened the .shp with OS Ship Builder again and re-saved it as SHP(TS).

scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Post by scorp »

abcdefg30 wrote: I just opened the .shp with OS Ship Builder again and re-saved it as SHP(TS).
yeah i did that as well and it works.

Thanks a lot really. It would be a gamble otherwiese every time i try to use custom shp's.

User avatar
Graion Dilach
Posts: 274
Joined: Fri May 15, 2015 5:57 pm

Post by Graion Dilach »

scorp wrote: (Please note: i get a blank site when opening the link posted before http://svn.ppmsite.com/filedetails.php? ... uilder.exe
Darn. Remove the dot from the end of the link. I didn't noticed it slapped one to the end.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

scorp
Posts: 96
Joined: Sat Mar 08, 2014 9:35 pm

Post by scorp »

So I tried updating my mod to the new playtest. Since my mod inhereits almost all its content from ra, this should have been easy, no?

no, it isn't. after resolving a number of issues related to what appears to be a redesign of mod.yaml, the mod still can't load and the game crashes with the following exception:

Scorp's Red Alert Mod at Version release-20150919, V. 01
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 4.0.30319.34209
Exception of type `System.InvalidOperationException`: Cannot locate type: RenderSimpleInfo
bei OpenRA.ObjectCreator.<MissingTypeAction>m__5(String s)
bei OpenRA.ObjectCreator.CreateObject[T](String className, Dictionary`2 args)
bei OpenRA.ObjectCreator.CreateObject[T](String className)
bei OpenRA.Game.CreateObject[T](String name)
bei OpenRA.ActorInfo.LoadTraitInfo(String traitName, MiniYaml my)
bei OpenRA.ActorInfo..ctor(String name, MiniYaml node, Dictionary`2 allUnits)
bei OpenRA.RulesetCache.<Load>m__0(MiniYamlNode k, Dictionary`2 y)
bei OpenRA.RulesetCache.<LoadYamlRules>c__AnonStorey1`1.<>m__0(MiniYamlNode wkv, Dictionary`2 wyy)
bei OpenRA.RulesetCache.<LoadYamlRules>c__AnonStorey1`1.<>m__1(MiniYamlNode kv)
bei OpenRA.Exts.ToDictionaryWithConflictLog[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, String debugName, Func`2 logKey, Func`2 logValue)
bei OpenRA.RulesetCache.LoadYamlRules[T](Dictionary`2 itemCache, String[] files, List`1 nodes, Func`3 f)
bei OpenRA.RulesetCache.Load(Map map)
bei OpenRA.ModData.<ModData>m__2()
bei System.Lazy`1.CreateValue()
bei System.Lazy`1.LazyInitValue()
bei System.Lazy`1.get_Value()
bei OpenRA.ModData.get_DefaultRules()
bei OpenRA.Map.<PostInit>c__AnonStorey2.<>m__0()
bei System.Lazy`1.CreateValue()
bei System.Lazy`1.LazyInitValue()
bei System.Lazy`1.get_Value()
bei OpenRA.Map.PreloadRules()
bei OpenRA.ModData.PrepareMap(String uid)
bei OpenRA.Game.StartGame(String mapUID, WorldType type)
bei OpenRA.Game.LoadShellMap()
bei OpenRA.Mods.Common.LoadScreens.BlankLoadScreen.StartGame(Arguments args)
bei OpenRA.Game.InitializeMod(String mod, Arguments args)
bei OpenRA.Game.Initialize(Arguments args)
bei OpenRA.Program.Run(String[] args)
bei OpenRA.Program.Main(String[] args)

I understand that there's an issue with RenderSimpleInfo, but i have no clue where to locate the issue, e.g. which file or which file type. If anybody has a clue, please kindly let me know.

As much as i like frequent updates, they are certainly a challenge when i want to use a small bit of custom Content :oops:

User avatar
Graion Dilach
Posts: 274
Joined: Fri May 15, 2015 5:57 pm

Post by Graion Dilach »

The RenderSimple trait is gone. You're using that on one of your actors.

All older Render* traits got surpassed with RenderSprites/RenderVoxels + WithSpriteBody/WithVoxelBody and variations - thereby resolving many of the older limits of them.

https://github.com/OpenRA/OpenRA/wiki/T ... laytest%29 is your friend.
Image
Image
Image
AS Discord server: https://discord.gg/7aM7Hm2

abcdefg30
Posts: 373
Joined: Mon Aug 18, 2014 6:00 pm

Post by abcdefg30 »

Also running the utility should help (by auto-updating the traits).

Post Reply