Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#275 closed defect (released)

error in language switching

Reported by: Henri Owned by: ibboard
Priority: major Milestone: WarFoundry 0.1
Component: General/Unknown Version: Trunk
Keywords: Cc:
Blocked By: Blocking:

Description

I'm getting a error when switching around languages.
"Cannot access a disposed object.
Object name:"TreeView"

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

************** Exception Text **************
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'TreeView'.
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.TreeView.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.TreeNode.UpdateNode(Int32 mask)
   at IBBoard.WarFoundry.GUI.WinForms.FrmPreferences.TranslateForm()
   at IBBoard.MethodInvoker.Invoke()
   at IBBoard.Lang.Translation.LoadTranslation(String translationLanguage)
   at IBBoard.WarFoundry.GUI.WinForms.FrmPreferences.languageList_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WndProc(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.4200 (NetFxQFE.050727-4200)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
WarFoundry
    Assembly Version: 0.0.1.38237
    Win32 Version: 0.0.1.38237
    CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/WarFoundry.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
----------------------------------------
log4net
    Assembly Version: 1.2.10.0
    Win32 Version: 1.2.10.0
    CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/log4net.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4016 (NetFxQFE.050727-4000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
IBBoard
    Assembly Version: 1.0.3767.33709
    Win32 Version: 1.0.3767.33709
    CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/IBBoard.DLL
----------------------------------------
IBBoard.WarFoundry.API
    Assembly Version: 0.0.1.38212
    Win32 Version: 0.0.1.38212
    CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/IBBoard.WarFoundry.API.DLL
----------------------------------------
IBBoardWF
    Assembly Version: 1.0.0.33760
    Win32 Version: 1.0.0.33760
    CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/IBBoardWF.DLL
----------------------------------------
ICSharpCode.SharpZipLib
    Assembly Version: 0.85.5.452
    Win32 Version: 0.85.5.452
    CodeBase: file:///C:/Users/Henri/IBBoard.WarFoundry.GUI.WinForms/bin/Release/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.

Change History (7)

comment:1 Changed 10 years ago by ibboard

Owner: set to Henri
Status: newneedinfo_new

I can only get a crash when closing the Army Tree, which generates a different stack trace (now logged as #276). Can you give more detail about what you did and how to recreate it?

comment:2 Changed 10 years ago by Henri

The problem is erratic.
It seems to occur when changing language a second and subsequent time in a session.

comment:3 Changed 10 years ago by ibboard

Is that the second time without closing the preferences dialog, or the second time after closing it and re-opening it? I thought I'd tried both and not re-created it, but I'll have to check again. If you can manage to make a specific set of instructions that always crash it then it'd be useful.

comment:4 Changed 10 years ago by Henri

Starting the program, preferences -> change language, OK,[Do other stuff, or not do stuff - doesn't matter], preferences -> pick a new language from the list and... CRASH!

comment:5 Changed 10 years ago by ibboard

Owner: changed from Henri to ibboard
Status: needinfo_newaccepted

Managed to recreate it. Not sure how I missed it before.

comment:6 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(In r557) Fixes #275: error in language switching

  • Unsubscribe the event listener on dispose

comment:7 Changed 9 years ago by ibboard

Resolution: fixedreleased

Release as part of v0.1b9

Note: See TracTickets for help on using tickets.