Nous avons reçu des rapports d'erreurs difficiles à reproduire. Les utilisateurs obtiennent le "Une erreur s'est produite.L'application va maintenant quitter." boîte de message, puis l'application se termine.Erreur générique GDI + avec ThreadExceptionDialog dans la trace de la pile
Dans Main() Je vous écris à l'exception d'un fichier journal:
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
at System.Drawing.Icon.ToBitmap()
at System.Windows.Forms.ThreadExceptionDialog..ctor(Exception t)
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
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(Form mainForm)
at Wfm.AppMain.Main()
Ce qui me confond est que le ThreadExceptionDialog est dans la trace de la pile. Je suppose que c'est la boîte de dialogue qui montre le "Une erreur s'est produite, l'application va maintenant quitter." message.
Est-ce une erreur sans rapport ou la boîte de dialogue est-elle en train de renvoyer l'exception? Comment puis-je obtenir l'exception d'origine?
Comment puis-je obtenir l'application pour générer un fichier de vidage? Il ne plante pas. – laktak
Vous pouvez créer un cliché en utilisant ADPlus en mode d'accrochage une fois que vous voyez la fenêtre d'exception. –