Unhandled exception on possibly-protected map

3 views
Skip to first unread message

Marcel Dejean

unread,
Aug 29, 2009, 8:39:34 PM8/29/09
to Starforge
Got this exception when opening the attached map

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

************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at chk.Map.{ctor}(Map* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
   at Starforge.WndMap..ctor(String file)
   at Starforge.WndMain.MapOpen(String fileName)
   at Starforge.WndMain.mnuFileOpen_Click(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.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.3082 (QFE.050727-3000)
    CodeBase: file:///E:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Starforge
    Assembly Version: 1.0.3521.27526
    Win32 Version: 0.01.0.0
    CodeBase: file:///E:/Documents%20and%20Settings/Administrator/Desktop/sfu/Starforge.exe
----------------------------------------
msvcm90
    Assembly Version: 9.0.30729.1
    Win32 Version: 9.00.30729.1
    CodeBase: file:///E:/WINDOWS/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e/msvcm90.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/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.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/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.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
MagicLibrary
    Assembly Version: 1.7.4.0
    Win32 Version: 1.7.4.0
    CodeBase: file:///E:/Documents%20and%20Settings/Administrator/Desktop/sfu/MagicLibrary.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.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.

randomitemd.scx

Heinermann

unread,
Aug 30, 2009, 7:29:12 AM8/30/09
to Starforge
Doesn't open in SCMDraft or StarEdit, but it doesn't look protected
either.
>  randomitemd.scx
> 88KViewDownload

Heinermann

unread,
Aug 30, 2009, 8:11:04 AM8/30/09
to Starforge
Missing IVER
Bad MTXM size; possibly corrupted. (Fixing this section fixed the
exception, but produced a protected map error message)
Bad UNIT entry; all data is 0xFF. Possibly same corruption.
Bad TILE section. Same as MTXM.
Not sure about DD2 section.
Bad THG2 entry. Same as UNIT.
Extra MASK section.
Real MASK section has extra bytes.
There are only location number strings and nothing else. This isn't a
real map?
Extra MBRF section.

Fixing all of those fixed the issue with opening the map in SCMD but
not in SF:U

After finding out how Starforge can tell me what's wrong with a map, I
removed all the data in the DD2 section. Starforge then opens the map
and gives an exception you can just continue from.

On Aug 29, 8:39 pm, Marcel Dejean <doodle...@gmail.com> wrote:
>  randomitemd.scx
> 88KViewDownload

Heinermann

unread,
Aug 30, 2009, 8:13:53 AM8/30/09
to Starforge
Also, the item tree doesn't show after that exception. Might be bad
unit strings.

Clokr_

unread,
Aug 30, 2009, 10:45:44 AM8/30/09
to Starforge
The exception reporting window is a bit broken. The next release won't
allow the user to continue the execution of the program after
receiving an exception (it probably leaves SF in an inestable state
anyway).

@Marcel: The map is corrupted/protected. SF doesn't handle gracefully
corrupted/protected maps yet, so it probably overflows somewhere.
We'll eventually look into it but it's not high priority.

Heinermann

unread,
Aug 30, 2009, 1:06:21 PM8/30/09
to Starforge
Well the bad MTXM size caused the exception in SF. It wasn't even a
multiple of 2.
Reply all
Reply to author
Forward
0 new messages