Skip to content

COMException: Unexpected HRESULT #2132

Description

@osir

System information

  • Windows OS version: Windows 10 IoT Enterprise LTSC 21H2 19044.5737
  • ImageGlass version: ImageGlass v9.3.0.514
  • ImageGlass release: Classic

To Reproduce

Steps to reproduce the behavior:

  1. (Installed using MSI)
  2. Open ImageGlass

Actual behavior

Getting the following exception window:

Version: ImageGlass v9.3.0.514
Release code: 1️⃣5️⃣🎂
Magick.NET: Magick.NET Q16-HDRI-OpenMP x64 net8.0 14.6.0
WebView2 Runtime: 136.0.3240.64
OS: Microsoft Windows NT 10.0.19044.0 64-bit

----------------------------------------------------
Error:

Unexpected HRESULT has been returned from a call to a COM component.
----------------------------------------------------

System.Runtime.InteropServices.COMException (0x80004005): Unexpected HRESULT has been returned from a call to a COM component.
   at Windows.Win32.UI.Shell.IWebBrowserApp.get_HWND()
   at D2Phap.EggShell.GetForegroundWindowView()
   at ImageGlass.Program.Main() in D:\_GITHUB\@d2phap\ImageGlass\Source\ImageGlass\Program.cs:line 136

Expected behavior

Screenshots / Video / Sample image file

Image

Additional context

Maybe similar to #1771?

System compatibility:
According to the system requirements section of the readme, my system should be compatible, I think:

  • Windows 10/11 64-bit, version 1809 (build 17763) or later
    • -> Looks like I should be compatible. (19044)
  • .NET Desktop Runtime 8 (64-bit)
    • -> Downloaded and installed
  • WebView2 Runtime 64-bit v119.0.2151 or later
    • Downloaded but was already installed

Event Viewer:

  • Info Source: MsiInstaller
Windows Installer installed the product. Product Name: ImageGlass. Product Version: 9.3.0.514. Product Language: 1033. Manufacturer: Duong Dieu Phap. Installation success or error status: 0.
  • Error Source: .NET Runtime
Application: ImageGlass.exe
CoreCLR Version: 9.0.325.11113
.NET Version: 9.0.3
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException (0x80004005): Unexpected HRESULT has been returned from a call to a COM component.
   at Windows.Win32.UI.Shell.IWebBrowserApp.get_HWND()
   at D2Phap.EggShell.GetForegroundWindowView()
   at ImageGlass.Program.Main() in D:\_GITHUB\@d2phap\ImageGlass\Source\ImageGlass\Program.cs:line 136
  • Error Source: Application Error
Faulting application name: ImageGlass.exe, version: 9.3.0.514, time stamp: 0x67ab0000
Faulting module name: KERNELBASE.dll, version: 10.0.19041.5678, time stamp: 0x024a42e4
Exception code: 0xe0434352
Fault offset: 0x000000000003b699
Faulting process id: 0x1824
Faulting application start time: 0x01dbc35748407535
Faulting application path: C:\Program Files\ImageGlass\ImageGlass.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: a99a9099-e2e3-4aea-ab99-d5274323ad06
Faulting package full name: 
Faulting package-relative application ID: 

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions