EDN Admin
Well-known member
<span style="font-family:Verdana,sans-serif; font-size:9pt Hi Team,<o></o>
<span style="font-family:Verdana,sans-serif; font-size:9pt Hope you all are well. <o></o>
<span style="font-family:Verdana,sans-serif; font-size:9pt I have got a very peculiar problem. I have developed this application which runs without<br/>
any issue on my development machine.<o></o>
<span style="font-family:Verdana,sans-serif; font-size:9pt However, when I deploy to other machines. Everything runs fine, apart from when I try to<br/>
export a csv file from a table adapter data it works fine (Access database backend). However immediately after when I try to import the same data, my application crashes. I didnt know what was the problem as it wasnt displaying any error message just a dialog
box saying "Microsoft will try to find the solution online". Immediately after when I run the application again and<br/>
try to import the same, it works fine. Bizarre !!!<o></o>
<span style="font-family:Verdana,sans-serif; font-size:9pt Upon scrutiny in the Event viewer I found two errors - I copied the first error below, which I think is the root cause of the crash. It seemed having completed my export and then trying to import,
the table or table adapter or something is still in use and wont let me do the import.
<span style="line-height:115%; font-family:Verdana,sans-serif; font-size:9pt I may be completely wrong. Please do guide me as to what could be the reason for it and how shall I overcome it.
<span style="text-decoration:underline Error Message from event viewer:
Log Name:<span> Application
Source:<span> .NET Runtime
Date:<span> 10/10/2012 12:11:26
Event ID:<span> 1026
Task Category: None
Level:<span> Error
Keywords:<span> Classic
User:<span> N/A
Computer:<span> User-PC
Description:
Application: MyProgram.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
<span> at System.Windows.Forms.FileDialogNative+IFileDialog.Show(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialog(IntPtr)
<span> at System.Windows.Forms.CommonDialog.ShowDialog(System.Windows.Forms.IWin32Window)
<span> at System.Windows.Forms.CommonDialog.ShowDialog()
<span> at MyProgram.frmImport.btnImport_Click(System.Object, System.EventArgs)
<span> at System.Windows.Forms.Control.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
<span> at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
<span> at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
<span> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
<span> at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
<span> at MyProgram.My.MyApplication.Main(System.String[])
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event
<span> <System>
<span> <Provider Name=".NET Runtime" />
<span> <EventID Qualifiers="0 1026</EventID>
<span> <Level>2</Level>
<span> <Task>0</Task>
<span> <Keywords>0x80000000000000</Keywords>
<span> <TimeCreated SystemTime="2012-10-10T11:11:26.000000000Z" />
<span> <EventRecordID>1501</EventRecordID>
<span> <Channel>Application</Channel>
<span> <Computer>User-PC</Computer>
<span> <Security />
<span> </System>
<span> <EventData>
<span> <Data>Application: MyProgram.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
<span> at System.Windows.Forms.FileDialogNative+IFileDialog.Show(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialog(IntPtr)
<span> at System.Windows.Forms.CommonDialog.ShowDialog(System.Windows.Forms.IWin32Window)
<span> at System.Windows.Forms.CommonDialog.ShowDialog()
<span> at MyProgram.frmImport.btnImport_Click(System.Object, System.EventArgs)
<span> at System.Windows.Forms.Control.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
<span> at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
<span> at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
<span> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
<span> at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
<span> at MyProgram.My.MyApplication.Main(System.String[])
</Data>
<span> </EventData>
</Event>
View the full article
<span style="font-family:Verdana,sans-serif; font-size:9pt Hope you all are well. <o></o>
<span style="font-family:Verdana,sans-serif; font-size:9pt I have got a very peculiar problem. I have developed this application which runs without<br/>
any issue on my development machine.<o></o>
<span style="font-family:Verdana,sans-serif; font-size:9pt However, when I deploy to other machines. Everything runs fine, apart from when I try to<br/>
export a csv file from a table adapter data it works fine (Access database backend). However immediately after when I try to import the same data, my application crashes. I didnt know what was the problem as it wasnt displaying any error message just a dialog
box saying "Microsoft will try to find the solution online". Immediately after when I run the application again and<br/>
try to import the same, it works fine. Bizarre !!!<o></o>
<span style="font-family:Verdana,sans-serif; font-size:9pt Upon scrutiny in the Event viewer I found two errors - I copied the first error below, which I think is the root cause of the crash. It seemed having completed my export and then trying to import,
the table or table adapter or something is still in use and wont let me do the import.
<span style="line-height:115%; font-family:Verdana,sans-serif; font-size:9pt I may be completely wrong. Please do guide me as to what could be the reason for it and how shall I overcome it.
<span style="text-decoration:underline Error Message from event viewer:
Log Name:<span> Application
Source:<span> .NET Runtime
Date:<span> 10/10/2012 12:11:26
Event ID:<span> 1026
Task Category: None
Level:<span> Error
Keywords:<span> Classic
User:<span> N/A
Computer:<span> User-PC
Description:
Application: MyProgram.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
<span> at System.Windows.Forms.FileDialogNative+IFileDialog.Show(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialog(IntPtr)
<span> at System.Windows.Forms.CommonDialog.ShowDialog(System.Windows.Forms.IWin32Window)
<span> at System.Windows.Forms.CommonDialog.ShowDialog()
<span> at MyProgram.frmImport.btnImport_Click(System.Object, System.EventArgs)
<span> at System.Windows.Forms.Control.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
<span> at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
<span> at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
<span> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
<span> at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
<span> at MyProgram.My.MyApplication.Main(System.String[])
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event
<span> <System>
<span> <Provider Name=".NET Runtime" />
<span> <EventID Qualifiers="0 1026</EventID>
<span> <Level>2</Level>
<span> <Task>0</Task>
<span> <Keywords>0x80000000000000</Keywords>
<span> <TimeCreated SystemTime="2012-10-10T11:11:26.000000000Z" />
<span> <EventRecordID>1501</EventRecordID>
<span> <Channel>Application</Channel>
<span> <Computer>User-PC</Computer>
<span> <Security />
<span> </System>
<span> <EventData>
<span> <Data>Application: MyProgram.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
<span> at System.Windows.Forms.FileDialogNative+IFileDialog.Show(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr)
<span> at System.Windows.Forms.FileDialog.RunDialog(IntPtr)
<span> at System.Windows.Forms.CommonDialog.ShowDialog(System.Windows.Forms.IWin32Window)
<span> at System.Windows.Forms.CommonDialog.ShowDialog()
<span> at MyProgram.frmImport.btnImport_Click(System.Object, System.EventArgs)
<span> at System.Windows.Forms.Control.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnClick(System.EventArgs)
<span> at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
<span> at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
<span> at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
<span> at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
<span> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
<span> at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
<span> at System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
<span> at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
<span> at MyProgram.My.MyApplication.Main(System.String[])
</Data>
<span> </EventData>
</Event>
View the full article