P
pbishop
Hi,
I'm running VB 2005 express on Windows 2000, SP 4. I have added a
splash screen to my project, which was running error-free until then.
The first time I run it each time I open the IDE, the splash screen
shows, then the main form shows, just as intended. Each time after
that, I get an exception. If I compile it and run the exe, the first
time it runs as intended, and each time after it throws this exception.
System.Transactions Critical: 0 : <TraceRecord
xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"
Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled
exception</Description><AppDomain>SI TreeView
1.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object
reference not set to an instance of an object.</Message><StackTrace>
at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle
waitHandle)
at System.Windows.Forms.Control.MarshaledInvoke(Control caller,
Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[]
args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
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&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;
m)
at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)
at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
at System.Windows.Forms.Form.WndProc(Message&amp; m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;
m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
at SI_TreeView_1.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at
System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException:
Object reference not set to an instance of an object.
at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle
waitHandle)
at System.Windows.Forms.Control.MarshaledInvoke(Control caller,
Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[]
args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
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&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;
m)
at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)
at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
at System.Windows.Forms.Form.WndProc(Message&amp; m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;
m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
at SI_TreeView_1.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at
System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord>
I can't find the line of code that throws this error. I wonder if the
code that throws the error is generated on the fly, seeing that the
file in the text of the exception has a randomly-generated name:
"17d14f5c-a337-4978-8281-53493378c1071.vb:line 81". This is besides
the fact that I didn't write any code to use the splash screen or
customize it.
If I set the splash screen to "none" in the project properties, the
project runs without errors. If I set it back to use the splash screen,
I get the error.
In the project properties, I enabled the "Enable XP Visual Styles",
"Make Single Instance Application", "Save My.Settings on shutdown".
Authentication mode is "Windows", shutdown mode is "when startup form
closes", and SplashScreen is "Splashscreen1".
I have scoured the groups, msdn and the Web and haven't found anything
helpful. Sometimes folks will customize their splashscreen and get
this exception, but then there is no answer.
I really need to use a splash screen in this app because the main form
has some processing to do before it displays.
Any help is much appreciated!
Peggy
I'm running VB 2005 express on Windows 2000, SP 4. I have added a
splash screen to my project, which was running error-free until then.
The first time I run it each time I open the IDE, the splash screen
shows, then the main form shows, just as intended. Each time after
that, I get an exception. If I compile it and run the exe, the first
time it runs as intended, and each time after it throws this exception.
System.Transactions Critical: 0 : <TraceRecord
xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"
Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled
exception</Description><AppDomain>SI TreeView
1.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object
reference not set to an instance of an object.</Message><StackTrace>
at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle
waitHandle)
at System.Windows.Forms.Control.MarshaledInvoke(Control caller,
Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[]
args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
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&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;
m)
at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)
at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
at System.Windows.Forms.Form.WndProc(Message&amp; m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;
m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
at SI_TreeView_1.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at
System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException:
Object reference not set to an instance of an object.
at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle
waitHandle)
at System.Windows.Forms.Control.MarshaledInvoke(Control caller,
Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[]
args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object
sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
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&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;
m)
at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)
at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
at System.Windows.Forms.Form.WndProc(Message&amp; m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;
m)
at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
at SI_TreeView_1.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at
System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord>
I can't find the line of code that throws this error. I wonder if the
code that throws the error is generated on the fly, seeing that the
file in the text of the exception has a randomly-generated name:
"17d14f5c-a337-4978-8281-53493378c1071.vb:line 81". This is besides
the fact that I didn't write any code to use the splash screen or
customize it.
If I set the splash screen to "none" in the project properties, the
project runs without errors. If I set it back to use the splash screen,
I get the error.
In the project properties, I enabled the "Enable XP Visual Styles",
"Make Single Instance Application", "Save My.Settings on shutdown".
Authentication mode is "Windows", shutdown mode is "when startup form
closes", and SplashScreen is "Splashscreen1".
I have scoured the groups, msdn and the Web and haven't found anything
helpful. Sometimes folks will customize their splashscreen and get
this exception, but then there is no answer.
I really need to use a splash screen in this app because the main form
has some processing to do before it displays.
Any help is much appreciated!
Peggy