Editor error when importing legacy maps

It worked once, but now refuses?

Discussion about the game and its default mods.
Post Reply
User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Editor error when importing legacy maps

Post by BaronOfStuff »

Hi there.

First, I'd just like to say how much I am enjoying this project; ever since I first started playing C&C/RA back in the mid-90's and then turned my atention to modding the .ini files, I always wanted to find some way of expanding or modifying each game beyond their limits (in particular, adding actual extra content as opposed to replacing existing entities), and now thanks to OpenRA this is very possible. Top marks to the devs for making such things a reality, and all in one neat and tidy engine.

Now, on topic; I recently started messing with the editor, and after a bit of screwing around figuring out how things work I saw the 'Import' option. I imported SCU02EA.ini without a problem, and went about modifying it into a small 1v1 skirmish map (I'll post that result soon enough). But when I tried importing another original map, I'm greeted with this error:

"Unhandled exception has occured in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

The directory is not empty."

I have no idea what this means. Viewing the 'Details' gives me this:

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: The directory is not empty.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
   at OpenRA.FileFormats.Folder..ctor(String path, Int32 priority, Dictionary`2 contents)
   at OpenRA.FileFormats.FileSystem.CreatePackage(String filename, Int32 order, Dictionary`2 content)
   at OpenRA.Map.Save(String toPath)
   at OpenRA.Editor.Form1.ImportLegacyMapClicked(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
OpenRA.Editor
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/OpenRA/OpenRA.Editor.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
OpenRA.Game
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/OpenRA/OpenRA.Game.EXE
----------------------------------------
OpenRA.FileFormats
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/OpenRA/OpenRA.FileFormats.DLL
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
OpenRA.Mods.RA
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/OpenRA/mods/ra/OpenRA.Mods.RA.dll
----------------------------------------
ICSharpCode.SharpZipLib
    Assembly Version: 0.86.0.518
    Win32 Version: 0.86.0.518
    CodeBase: file:///C:/OpenRA/ICSharpCode.SharpZipLib.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
This happens no matter what .ini or .map I try to import. If I click continue, the editor resumes as though I'd just started it. Any ideas on what I've undoubtedly exploded at some point?

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

Hi BaronOfStuff, sorry for the delay in responding to you.

It looks like you've hit an obscure bug in our map importer.
Take a look in your system temporary directory for a folder called OpenRA.Import, and delete it. It should work again after this.

I have filed bug #1012 on this issue, and it will be fixed in the next release.

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post by BaronOfStuff »

Ah, it's working again. Thanks! :D

EDIT: Aw, hell!
Some of the imports form The Aftermath are causing the game to crash; they are seemingly fine in the editor though. I can set up a game and select the map, but once I hit 'Start Game' I'm left with the loading screen. I've tried 'cleaning' the maps of any triggers/teamtypes by opening the .mpr in the standard RA Terrain Editor and saving as a new file, but to no avail.

In fact I seem to make things worse when doing that, because now it's giving me this message when I try to import those 'clean' Aftermath maps into the editor:

"(Unhandled exception, blah blah blah).
The given key was not present in the dictionary."

Code: Select all

See the end of this message for details on invoking 
just-in-time &#40;JIT&#41; debugging instead of this dialog box.

************** Exception Text **************
System.Collections.Generic.KeyNotFoundException&#58; The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException&#40;&#41;
   at System.Collections.Generic.Dictionary`2.get_Item&#40;TKey key&#41;
   at OpenRA.Map.SaveBinaryData&#40;&#41;
   at OpenRA.Map.Save&#40;String toPath&#41;
   at OpenRA.Editor.Form1.ImportLegacyMapClicked&#40;Object sender, EventArgs e&#41;
   at System.Windows.Forms.ToolStripItem.RaiseEvent&#40;Object key, EventArgs e&#41;
   at System.Windows.Forms.ToolStripMenuItem.OnClick&#40;EventArgs e&#41;
   at System.Windows.Forms.ToolStripItem.HandleClick&#40;EventArgs e&#41;
   at System.Windows.Forms.ToolStripItem.HandleMouseUp&#40;MouseEventArgs e&#41;
   at System.Windows.Forms.ToolStripItem.FireEventInteractive&#40;EventArgs e, ToolStripItemEventType met&#41;
   at System.Windows.Forms.ToolStripItem.FireEvent&#40;EventArgs e, ToolStripItemEventType met&#41;
   at System.Windows.Forms.ToolStrip.OnMouseUp&#40;MouseEventArgs mea&#41;
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp&#40;MouseEventArgs mea&#41;
   at System.Windows.Forms.Control.WmMouseUp&#40;Message& m, MouseButtons button, Int32 clicks&#41;
   at System.Windows.Forms.Control.WndProc&#40;Message& m&#41;
   at System.Windows.Forms.ScrollableControl.WndProc&#40;Message& m&#41;
   at System.Windows.Forms.ToolStrip.WndProc&#40;Message& m&#41;
   at System.Windows.Forms.ToolStripDropDown.WndProc&#40;Message& m&#41;
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage&#40;Message& m&#41;
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc&#40;Message& m&#41;
   at System.Windows.Forms.NativeWindow.Callback&#40;IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam&#41;


************** Loaded Assemblies **************
mscorlib
    Assembly Version&#58; 2.0.0.0
    Win32 Version&#58; 2.0.50727.4016 &#40;NetFxQFE.050727-4000&#41;
    CodeBase&#58; file&#58;///C&#58;/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
OpenRA.Editor
    Assembly Version&#58; 1.0.0.0
    Win32 Version&#58; 1.0.0.0
    CodeBase&#58; file&#58;///C&#58;/OpenRA/OpenRA.Editor.exe
----------------------------------------
System.Windows.Forms
    Assembly Version&#58; 2.0.0.0
    Win32 Version&#58; 2.0.50727.4016 &#40;NetFxQFE.050727-4000&#41;
    CodeBase&#58; file&#58;///C&#58;/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version&#58; 2.0.0.0
    Win32 Version&#58; 2.0.50727.4016 &#40;NetFxQFE.050727-4000&#41;
    CodeBase&#58; file&#58;///C&#58;/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version&#58; 2.0.0.0
    Win32 Version&#58; 2.0.50727.4016 &#40;NetFxQFE.050727-4000&#41;
    CodeBase&#58; file&#58;///C&#58;/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
OpenRA.Game
    Assembly Version&#58; 1.0.0.0
    Win32 Version&#58; 1.0.0.0
    CodeBase&#58; file&#58;///C&#58;/OpenRA/OpenRA.Game.EXE
----------------------------------------
OpenRA.FileFormats
    Assembly Version&#58; 1.0.0.0
    Win32 Version&#58; 1.0.0.0
    CodeBase&#58; file&#58;///C&#58;/OpenRA/OpenRA.FileFormats.DLL
----------------------------------------
System.Core
    Assembly Version&#58; 3.5.0.0
    Win32 Version&#58; 3.5.30729.1 built by&#58; SP
    CodeBase&#58; file&#58;///C&#58;/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
OpenRA.Mods.RA
    Assembly Version&#58; 1.0.0.0
    Win32 Version&#58; 1.0.0.0
    CodeBase&#58; file&#58;///C&#58;/OpenRA/mods/ra/OpenRA.Mods.RA.dll
----------------------------------------
ICSharpCode.SharpZipLib
    Assembly Version&#58; 0.86.0.518
    Win32 Version&#58; 0.86.0.518
    CodeBase&#58; file&#58;///C&#58;/OpenRA/ICSharpCode.SharpZipLib.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time &#40;JIT&#41; debugging, the .config file for this
application or computer &#40;machine.config&#41; must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example&#58;

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
What have I borked this time? D:

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

IIRC some aftermath maps had a custom tile with a crashed spaceship that we probably don't define in OpenRA. That would cause an error like the one you're seeing. Can you post the names of the maps that cause problems?

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post by BaronOfStuff »

I always thought the crashed spaceship was a tile in Tiberian Dawn, and not present in any RA map?

Anyway, the maps I've tried so far were:
Booby Traps (scmk2ea.ini)
The Berg (scmm6ea.ini)
Hamburger Hill (scml2ea.ini)
Super Bridgehead (scmm3ea.ini)
Destruction Derby (scmk9ea.ini)
Random Violence (scmm0ea.ini)
Death Valley (scmk7ea.ini)
The Hills Have Eyes* (scmm7ea.ini)

They're all 126x126 (Mega Map) sized, if that's any good.

I've included them in the attached zip, in their original .ini formats (no modifications of any sort to any aspect). There are more than likely others that will invoke this problem, so I'll post those as I find them too (if necessary).

*This one also spits out 'unknown actors' regarding the various civilian types the map uses, but this in itself doesn't result in any exceptions for the editor; it ignores these and then gets hit by the 'missing key' like the rest.
Attachments
CrashMaps.zip
(85.34 KiB) Downloaded 369 times

Post Reply