Mystery "*appl* has encountered a problem and needs to close" problem

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I am encountering our old friend "<applname> has encountered a problem and needs to close. Were sorry
blah blah blah" error immediately after application startup. This app is targeted to .NET 3.5. The first thing in the main forms Load event handler is to start a background thread which logs messages to a .TXT file and then queue a message to it.
That message never reaches the file. Indeed, a MessageBox.Show() call inserted before all that never happens.
This program had been running on the system (a Panasonic Toughbook running XP Professional SP3 with .NET 4, 3.5, 3 and 2 installed) for several days and then one evening started coming up with this. Several other supposedly identical Toughbooks are
running this with no problems. The machine in question started doing this with no apparent provocation. Two other Toughbooks have done it since being returned from I.T. -- our IT department will change things, including security policies, on the fly and without
notice. They say theyve done nothing. Yeah, right.
I put in an UnhandledException event handler into the MyApplication class alongside my Shutdown and NetworkAvailabilityChanged handlers. It showed me the exception and its inner exception, as follows:
(Note that the application name is "UserMgrEMW" as shown in the stack traces)
Exception: <br/>
Type: System.InvalidOperationException<br/>
Message: "An error occurred creating the form. See Exception.InnerException for details. The error is: Not found"<br/>
Stack Trace:<br/>
at UserMgrEMW.My.MyProject.MyForms.Create__Instance__[T](T Instance)<br/>
at UserMgrEMW.My.MyProject.MyForms.get_frmButtonRack()<br/>
at UserMgrEMW.My.MyApplication.OnCreateMainForm()<br/>
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()<br/>
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
Inner Exception:<br/>
Type: System.Management.ManagementException<br/>
Message: "Not found"<br/>
Stack Trace: <br/>
at System.Management.ThreadDispatch.Start()<br/>
at System.Management.ManagementEventWatcher.Initialize()<br/>
at System.Management.ManagementEventWatcher.Start()<br/>
at UserMgrEMW.frmButtonRack..ctor()<br/>

Does anyone recognize anything familiar about any of this? Please, oh please say, "Yes," and respond! <hr class="sig John Beaver

View the full article
 
Back
Top