Boo
  1. Boo
  2. BOO-465

Unhandled exception in Boo Explorer when opening new Interactive Console

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Labels:
      None
    • Environment:
      Windows XP SP2/.NET 1.1 SP1
      Windows 2000 SP4/.NET 1.1 SP1
    • Number of attachments :
      1

      Description

      If you close the Interactive Console ("Prompt") and then try to open it again, Boo Explorer (Boox) generates an unhandled exception:

      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 named "InteractiveConsole".
                                  Object name: "InteractiveConsole".
                                  at System.Windows.Forms.Control.CreateHandle()
                                  at System.Windows.Forms.Form.CreateHandle()
                                  at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
                                  at System.Windows.Forms.Control.CreateControl()
                                  at System.Windows.Forms.ControlCollection.Add(Control value)
                                  at System.Windows.Forms.Control.set_ParentInternal(Control value)
                                  at System.Windows.Forms.Form.set_ParentInternal(Control value)
                                  at System.Windows.Forms.Control.set_Parent(Control value)
                                  at WeifenLuo.WinFormsUI.DockContent.SetParent(Control value)
                                  at WeifenLuo.WinFormsUI.DockContent.SetDockState(Boolean isHidden, DockState visibleState, DockPane oldPane)
                                  at WeifenLuo.WinFormsUI.DockContent.ResumeSetDockState(Boolean isHidden, DockState visibleState, DockPane oldPane)
                                  at WeifenLuo.WinFormsUI.DockContent.set_Pane(DockPane value)
                                  at WeifenLuo.WinFormsUI.DockContent.Show(DockPanel dockPanel, DockState dockState)
                                  at WeifenLuo.WinFormsUI.DockContent.Show(DockPanel dockPanel)
                                  at BooExplorer.MainForm.ShowContent(DockContent content)
                                  at BooExplorer.MainForm.ShowPrompt()
                                  at ___adaptor1.Invoke(Object sender, EventArgs args)
                                  at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
                                  at System.Windows.Forms.MenuItemData.Execute()
                                  at System.Windows.Forms.Command.Invoke()
                                  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.ControlNativeWindow.OnMessage(Message& m)
                                  at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
                                  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
                                • JIT Debugging **************
                                  To enable just in time (JIT) debugging, the config file for this
                                  application or machine (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 machine
      rather than being handled by this dialog.
      -----------------------------------
      The fix is a simple change to MainForm.boo:

      Modify ShowPrompt to:

      def ShowPrompt():
      if _interactiveConsole.IsDisposed:
      _interactiveConsole = BooExplorer.InteractiveConsole(self)
      ShowContent(_interactiveConsole)

      Sorry again for not having a proper diff... I'll get Subversion installed one of these days

        Activity

        Hide
        Joshua W. Biagio added a comment -

        Here is the diff file of my changes. I also added Dispose() calls to the dialogs, because it is recommended that WinForms dialogs be disposed.

        Show
        Joshua W. Biagio added a comment - Here is the diff file of my changes. I also added Dispose() calls to the dialogs, because it is recommended that WinForms dialogs be disposed.
        Hide
        Rodrigo B. de Oliveira added a comment -

        patch applied. Thanks!

        Show
        Rodrigo B. de Oliveira added a comment - patch applied. Thanks!

          People

          • Assignee:
            Unassigned
            Reporter:
            Joshua W. Biagio
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: