System.ArgumentException (PixelFormat) throwing randomly after moving to Windows 10

-1

We're working on a desktop winforms app that makes use of webbrowser control (if that changes anything). After moving from windows 7 to windows 10, it started throwing exceptions like the one below. The problem is, these exceptions are occurring randomly (or we cannot find any pattern). Exception can occur after 5 minutes or 3 hours of app usage. Hence, asking for help. Any suggestion would be very much appreciated.

Log Name:      Application
Source:        .NET Runtime
Date:          03/05/2019 10:57:59
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Description:
Application: Test.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
   at System.Drawing.Bitmap..ctor(Int32, Int32, System.Drawing.Imaging.PixelFormat)
   at System.Drawing.Bitmap..ctor(Int32, Int32)
   at System.Drawing.Icon.BmpFrame()
   at System.Drawing.Icon.ToBitmap()
   at System.Windows.Forms.ThreadExceptionDialog..ctor(System.Exception)
   at System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception)
   at System.Windows.Forms.Control.WndProcException(System.Exception)
   at System.Windows.Forms.Control+ControlNativeWindow.OnThreadException(System.Exception)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)

Log Name:      Application
Source:        Application Error
Date:          03/05/2019 10:58:00
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxx
Description:
Faulting application name: 
Faulting module name: KERNELBASE.dll, version: 10.0.16299.1004, time stamp: 0x690aa820
Exception code: 0xe0434352
Fault offset: 0x00104622
Faulting process id: 0xa48
Faulting application start time: 0x01d501926a6eea35
Faulting application path:
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: f722f1dd-ce76-4968-8bef-4edceccabcb7
Faulting package full name: 
Faulting package-relative application ID: 
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-05-03T09:58:00.231417400Z" />
    <EventRecordID>4268</EventRecordID>
    <Channel>Application</Channel>
    <Computer>xxxxx</Computer>
    <Security />
  </System>
  <EventData>
    <Data>2.1.0.19</Data>
    <Data>5c486459</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>10.0.16299.1004</Data>
    <Data>690aa820</Data>
    <Data>e0434352</Data>
    <Data>00104622</Data>
    <Data>a48</Data>
    <Data>01d501926a6eea35</Data>       
    <Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
    <Data>f722f1dd-ce76-4968-8bef-4edceccabcb7</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>
c#
windows
vb.net
winforms
exception
asked on Stack Overflow Feb 19, 2021 by Patryk

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0