shekharpro / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Icarus crash on startup due to corrupt project file. #453

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This happens on both .Net 2.0 and .Net 4.0.

Interestingly it loaded my old default project file the first time then it
blew it away and replaced it with an empty file.  I think we should try to
include a spiffy error reporting dialog to use in cases where any kind of
operation fails with an exception.  It can show a message about the
operation it was trying to perform and a details link to get the exception
(in a text field so it can be subjected to copy-paste).

Doesn't Windows Forms have some kind of unhandled exception handler you can
hook into to capture errors that bubble up to the top of the UI thread?  We
could hook that too.

I'm not sure how the empty project file came to be.  I've just tried
reproducing the issue several times with both .Net 2.0 and .Net 4.0 and
can't cause it to happen.

Original issue reported on code.google.com by jeff.br...@gmail.com on 20 May 2009 at 10:34

Attachments:

GoogleCodeExporter commented 8 years ago
Actually a good place for the error handling might be in the nifty TaskManager 
and
command stuff.

Original comment by jeff.br...@gmail.com on 20 May 2009 at 10:42

GoogleCodeExporter commented 8 years ago
Another transient problem that pops up sometimes.

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

************** Exception Text **************
System.ArgumentException: Child list for field HostSetup cannot be created.
   at System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String
dataMember)
   at System.Windows.Forms.BindingContext.UpdateBinding(BindingContext
newBindingContext, Binding binding)
   at System.Windows.Forms.Control.UpdateBindings()
   at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
   at System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
   at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
   at System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
   at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
   at System.Windows.Forms.ContainerControl.OnCreateControl()
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(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.WmShowWindow(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)

Original comment by jeff.br...@gmail.com on 20 May 2009 at 10:45

GoogleCodeExporter commented 8 years ago
I think there is a race error in the Icarus initialization.  This may also 
explain
Issue 452.

When I run Icarus from the debugger, then I get the mangled UI but when I run 
it from
the command-line I get complaints about HostSetup.

Somewhere in between the two I get an empty project file stored on disk.  Sorry 
I
can't be much more specific than that.

Originally I thought the HostSetup problem was related to adding a new plugin
directory to Icarus (either via the UI or by passing in the /pd: option I just 
added
today) but that seems not to be the case.

Original comment by jeff.br...@gmail.com on 20 May 2009 at 10:50

GoogleCodeExporter commented 8 years ago
Further reinforcement of the idea of it being a timing issue is that the 
mangled UI
seems to happen when running under the debugger with .Net 4.0 but does not when
running from the command-line also with .Net 4.0.  It does not happen at all 
under
.Net 2.0.

However the HostSetup issue appears on the command-line in .Net 2.0 and .Net 
4.0 but
not in the debugger for either.

Bizarre.

Might be worth looking at any early background initialization in the UI.  My 
guess
would be that something gets forked off to the TaskManager on start up and 
depending
on exactly when it runs different kinds of bad things happen.  :-)

(How's that for vague?)

Original comment by jeff.br...@gmail.com on 20 May 2009 at 10:55

GoogleCodeExporter commented 8 years ago
Issue 452 has been merged into this issue.

Original comment by jeff.br...@gmail.com on 20 May 2009 at 11:06

GoogleCodeExporter commented 8 years ago
It's a stupid bug that I've reintroduced at least 3 times :( (I've taken drastic
action to ensure I won't do so again though!). The project file actually gets 
trashed
at shutdown, as the app closes while the "save project" is still running. I've 
added
some extra error handling for future use as well (including a "black box" log). 
I'll
see if I can get anywhere with your other errors.

Original comment by grahamr...@gmail.com on 22 May 2009 at 4:57

GoogleCodeExporter commented 8 years ago

Original comment by jeff.br...@gmail.com on 29 Jun 2009 at 8:33

GoogleCodeExporter commented 8 years ago
Any further ideas or should we just close the issue?

Original comment by jeff.br...@gmail.com on 31 Jul 2009 at 5:41

GoogleCodeExporter commented 8 years ago
Closing the issue.

Original comment by jeff.br...@gmail.com on 14 Aug 2009 at 11:30