MattFiler / OpenCAGE

A modding toolkit for Alien: Isolation that gives access to scripting, assets, configurations, and behaviour trees.
http://opencage.co.uk
MIT License
272 stars 13 forks source link

Unhandled exception when "graphics settings" option is clicked in new configuration editor #262

Closed ghramsey closed 1 year ago

ghramsey commented 1 year ago

This might be something that came and went but I'll report it anyway. First time I used the graphics setting it threw this error.
I checked the epic version and it was fine. On a hunch, I tried closing and restarting Steam and the error went away.

So this might be a bug or a one time event because Steam....

image

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

************** Exception Text **************
System.Xml.XmlException: '?' is an unexpected token. The expected token is '<!--' or '<[CDATA['. Line 104, position 6.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at AlienConfigEditor.GraphicsEditor..ctor()
   at AlienConfigEditor.ActiveTab..ctor(Tabs type)
   at AlienConfigEditor.ConfigEditor.ShowTab(Tabs tab)
   at AlienConfigEditor.ConfigEditor.treeView1_AfterSelect(Object sender, TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.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: 4.0.0.0
    Win32 Version: 4.8.9167.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AlienConfigEditor
    Assembly Version: 0.1.1.0
    Win32 Version: 0.1.1.0
    CodeBase: file:///D:/SteamLibrary/steamapps/common/Alien%20Isolation/DATA/MODTOOLS/REMOTE_ASSETS/configeditor/AlienConfigEditor.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9172.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9176.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9166.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 1.0.0.0
    Win32 Version: 0.1.1.0
    CodeBase: file:///D:/SteamLibrary/steamapps/common/Alien%20Isolation/DATA/MODTOOLS/REMOTE_ASSETS/configeditor/AlienConfigEditor.exe
----------------------------------------
WeifenLuo.WinFormsUI.Docking.ThemeVS2015
    Assembly Version: 1.0.0.0
    Win32 Version: 0.1.1.0
    CodeBase: file:///D:/SteamLibrary/steamapps/common/Alien%20Isolation/DATA/MODTOOLS/REMOTE_ASSETS/configeditor/AlienConfigEditor.exe
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.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.
MattFiler commented 1 year ago

should now be fixed on staging

ghramsey commented 1 year ago

I think this is same bug again but now even closing Steam has no effect image

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

************** Exception Text **************
System.Xml.XmlException: '?' is an unexpected token. The expected token is '<!--' or '<[CDATA['. Line 104, position 6.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at AlienConfigEditor.GraphicsEditor..ctor()
   at AlienConfigEditor.ActiveTab..ctor(Tabs type)
   at AlienConfigEditor.ConfigEditor.ShowTab(Tabs tab)
   at AlienConfigEditor.ConfigEditor.treeView1_AfterSelect(Object sender, TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.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: 4.0.0.0
    Win32 Version: 4.8.9167.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AlienConfigEditor
    Assembly Version: 0.2.0.0
    Win32 Version: 0.2.0.0
    CodeBase: file:///D:/SteamLibrary/steamapps/common/Alien%20Isolation/DATA/MODTOOLS/REMOTE_ASSETS/configeditor/AlienConfigEditor.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9172.0 built by: NET481REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9176.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9166.0 built by: NET481REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 1.0.0.0
    Win32 Version: 0.2.0.0
    CodeBase: file:///D:/SteamLibrary/steamapps/common/Alien%20Isolation/DATA/MODTOOLS/REMOTE_ASSETS/configeditor/AlienConfigEditor.exe
----------------------------------------
WeifenLuo.WinFormsUI.Docking.ThemeVS2015
    Assembly Version: 1.0.0.0
    Win32 Version: 0.2.0.0
    CodeBase: file:///D:/SteamLibrary/steamapps/common/Alien%20Isolation/DATA/MODTOOLS/REMOTE_ASSETS/configeditor/AlienConfigEditor.exe
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.9037.0 built by: NET481REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.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.
MattFiler commented 1 year ago

Please could you link me your ENGINE_SETTINGS.XML file?

MattFiler commented 1 year ago

I'm not gonna let this block the 0.11 release as I can't replicate it myself so think it must be some changes you've made to your ENGINE_SETTINGS.XML file. If you link me yours I'll try reproduce and fix on staging.

You can always reset your ENGINE_SETTINGS to default using the Backup Manager & re-add your custom configs 👍

ghramsey commented 1 year ago

This is the customized engine_settings.xml that psychohypnotic uses and had distrubuted on his discord. Extra lines regarding 4k textures and such. GitHub would not let me upload it as xml. I changed the extension to txt.

ENGINE_SETTINGS.XML.TXT

And yes. That is the source of the problem. I swapped to the stock engine_settings file and the problem went away. Curious why when I first experienced this it went away following a steam exit / restart?

ghramsey commented 1 year ago

I tried reverting to the stock engine_settings.xml and the game environment vanished to black only screen. I deleted the settings.bin and used the in-game video options to recreate it(oddly when it's missing the game does not auto regenerate it), but still had a black screen.

I restored the files I was using before and that problem stopped but I can't use the configuration editor here. I wonder what that engine_settings file is doing that makes the game graphics choke when I changed to stock?

The error / bug here does go away when I revert to the stock engine_settings file, but then the game is unplayable.
I wonder if I can directly copy the settings.bin from the epic store version. I'll try that.

MattFiler commented 1 year ago

Ah - yeah this is an issue with your XML file. The comment on line 104 is formatted incorrectly. I'm impressed that AI is able to read this file!

You need to change <!– resolution in pixels. –> to <!–- resolution in pixels. -–>

MattFiler commented 1 year ago

I guess if it's one distributed by Psycho then others will also be using it, so I've added a catch for this on staging anyways.

ghramsey commented 1 year ago

Thanks for all the work on this. I manually copied the line from the default engine_settings.xml to Psycho's edited file and saved. Seems to have worked. I don't normally use the config editor and psycho's edited version seems to fulfill any such needs thus far. Probably Julian uses the edited version or possibly ninthelement. Psycho uses it with a program called reshade which adds post-processing filters. Maybe drop him a note that that line is buggy too ?