Hallo,
ich habe einen Fehler in meinem Programm der sporadisch auftritt. Wenn ich einen SaveFileDialog schließe kann es passieren das sich das Programm beendet. Wenn das Problem auftritt wird keine Ausnahme ausgelöst und somit bekomme ich auch keine Fehlermeldung. Deshalb habe ich mir die Windows Ereignisanzeige zur Hilfe genommen. Anscheinend tritt die Ausnahme in der DUI70.dll auf ("Windows DirectUI Engine"). Nach Google soll das neu installieren von Windows helfen, weil mir das allerdings Zuviel Arbeit ist habe ich das Programm in einer VM, mit einer neuen Windows 10 Installation, laufen gelassen. Und auch hier tritt der Fehler auf. Was mich wundert ist das die Ausnahme durch alle try-catch Blöcke geht ohne das sie irgendwo gefangen wird.
Ich bin für jede Hilfe dankbar um diesen Fehler zu beheben.
Viele Grüße
Der Code wo das Problem auftritt: (Die Anweisung im if-Block wird nicht mehr ausgeführt)
Windows Ereignisanzeige Fehlermeldung 1:
Windows Ereignisanzeige Fehlermeldung 2:
ich habe einen Fehler in meinem Programm der sporadisch auftritt. Wenn ich einen SaveFileDialog schließe kann es passieren das sich das Programm beendet. Wenn das Problem auftritt wird keine Ausnahme ausgelöst und somit bekomme ich auch keine Fehlermeldung. Deshalb habe ich mir die Windows Ereignisanzeige zur Hilfe genommen. Anscheinend tritt die Ausnahme in der DUI70.dll auf ("Windows DirectUI Engine"). Nach Google soll das neu installieren von Windows helfen, weil mir das allerdings Zuviel Arbeit ist habe ich das Programm in einer VM, mit einer neuen Windows 10 Installation, laufen gelassen. Und auch hier tritt der Fehler auf. Was mich wundert ist das die Ausnahme durch alle try-catch Blöcke geht ohne das sie irgendwo gefangen wird.
Ich bin für jede Hilfe dankbar um diesen Fehler zu beheben.
Viele Grüße
Der Code wo das Problem auftritt: (Die Anweisung im if-Block wird nicht mehr ausgeführt)
C#-Quellcode
- private void tsbExcel_Click(object sender, EventArgs e)
- {
- try
- {
- using (SaveFileDialog saveDialog = new SaveFileDialog()
- {
- ValidateNames = true,
- CheckPathExists = true,
- CheckFileExists = false,
- Title = "Speicherort wählen",
- SupportMultiDottedExtensions = true,
- AddExtension = true,
- Filter = "Microsoft Excel (*.xlsx)|*.xlsx"
- })
- {
- if (saveDialog.ShowDialog() == DialogResult.OK)
- {
- new ExcelWriter(dgvRecords).Generate(saveDialog.FileName);
- }
- }
- }
- catch (Exception ex)
- {
- LogWriter.WriteError(ex, true);
- }
- }
Windows Ereignisanzeige Fehlermeldung 1:
Quellcode
- Name der fehlerhaften Anwendung: DGV.exe, Version: 1.0.6938.41736, Zeitstempel: 0x5c294281
- Name des fehlerhaften Moduls: DUI70.dll, Version: 10.0.17134.112, Zeitstempel: 0x5741755e
- Ausnahmecode: 0xc000041d
- Fehleroffset: 0x00059e5f
- ID des fehlerhaften Prozesses: 0x497c
- Startzeit der fehlerhaften Anwendung: 0x01d4a08c943eca75
- Pfad der fehlerhaften Anwendung: C:\repos\DGV\DGV\DGV\bin\Debug\DGV.exe
- Pfad des fehlerhaften Moduls: C:\Windows\system32\DUI70.dll
- Berichtskennung: f72a1d59-766c-4cab-bd91-4e7a2f29cc6a
- Vollständiger Name des fehlerhaften Pakets:
- Anwendungs-ID, die relativ zum fehlerhaften Paket ist:
Windows Ereignisanzeige Fehlermeldung 2:
Quellcode
- Anwendung: DGV.exe
- Frameworkversion: v4.0.30319
- Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
- Ausnahmeinformationen: Ausnahmecode c0000005, Ausnahmeadresse 652E9E5F
- Stapel:
- bei System.Windows.Forms.FileDialogNative+IFileDialog.Show(IntPtr)
- bei System.Windows.Forms.FileDialog.RunDialogVista(IntPtr)
- bei System.Windows.Forms.FileDialog.RunDialog(IntPtr)
- bei System.Windows.Forms.CommonDialog.ShowDialog(System.Windows.Forms.IWin32Window)
- bei System.Windows.Forms.CommonDialog.ShowDialog()
- bei DGV.Forms.Select.tsbExcel_Click(System.Object, System.EventArgs)
- bei System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)
- bei System.Windows.Forms.ToolStripButton.OnClick(System.EventArgs)
- bei System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)
- bei System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)
- bei System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
- bei System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
- bei System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)
- bei System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
- bei System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
- bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
- bei System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
- bei System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
- bei System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
- bei System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form)
- bei System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)
- bei System.Windows.Forms.Form.ShowDialog()
- bei DGV.Class.Table.LookUp.Show(DGV.Class.Struct.Adapter, System.Object[])
- bei DGV.Forms.Database.Materials.tsbSelect_Click(System.Object, System.EventArgs)
- bei System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)
- bei System.Windows.Forms.ToolStripButton.OnClick(System.EventArgs)
- bei System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)
- bei System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)
- bei System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
- bei System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
- bei System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)
- bei System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
- bei System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
- bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
- bei System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
- bei System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
- bei System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
- bei System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form)
- bei System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)
- bei System.Windows.Forms.Form.ShowDialog()
- bei DGV.Forms.Startup.Startup_Load(System.Object, System.EventArgs)
- bei System.Windows.Forms.Form.OnLoad(System.EventArgs)
- bei System.Windows.Forms.Form.OnCreateControl()
- bei System.Windows.Forms.Control.CreateControl(Boolean)
- bei System.Windows.Forms.Control.CreateControl()
- bei System.Windows.Forms.Control.WmShowWindow(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Form.WmShowWindow(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
- bei System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
- bei System.Windows.Forms.SafeNativeMethods.ShowWindow(System.Runtime.InteropServices.HandleRef, Int32)
- bei System.Windows.Forms.Control.SetVisibleCore(Boolean)
- bei System.Windows.Forms.Form.SetVisibleCore(Boolean)
- bei System.Windows.Forms.Control.set_Visible(Boolean)
- bei System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
- bei System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
- bei System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
- bei DGV.Program.Main()