question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

when loading image and will raise COMException (0x88982F50)

See original GitHub issue
  • .NET Core Version: net6.0
  • Windows version: (winver) Windows 10 or Windows 7
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: No
  • Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc…)? If yes, please file the issue via the instructions here.
  • Security issues and bugs should be reported privately, learn more via our responsible disclosure guidelines.

Problem description: i developing an wpf app for my fans, and some fans report my app sometimes will crash when loading image, but mostly user no crash Warn 15:24:49.2341 | System.TypeInitializationException: The type initializer for ‘Acorisoft.FutureGL.MigaStudio.StaticImageSource’ threw an exception. System.TypeInitializationException: The type initializer for ‘Acorisoft.FutureGL.MigaStudio.StaticImageSource’ threw an exception. —> System.NotSupportedException: 未找到适用于完成此操作的图像处理组件。 —> System.Runtime.InteropServices.COMException (0x88982F50): 无法找不到组件。 (0x88982F50) — End of inner exception stack trace — at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle) at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache) at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation() at System.Windows.Media.Imaging.BitmapImage.EndInit() at System.Windows.Media.Imaging.BitmapImage… ctor(Uri uriSource, RequestCachePolicy uriCachePolicy) at System.Windows.Media.Imaging.BitmapImage… ctor(Uri uriSource) Actual behavior:

Expected behavior:

Minimal repro:

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Luoyingliangcommented, Nov 4, 2022
  • If you using a stream that you got from somewhere, make sure it’s position is 0 before giving to decoder
  • This would not help if for example the image is HEIC and some of the users don’t have a HEIC codec installed.

when the problem happen, i was using URI string to automatically load the image from assembly , like ‘pack://application:,/myassembly;imagepath’,this code working so well on my mostly customer and i.but there are still has a little part of customer happen this issues.

some customer use win7 os, some are use win10 , i can’t ensure whether has installed HEIC codec , the runtime enviroment is complexity. finally i try to load the image manually and problem resolved.

maybe decoder cannot recoginzed the image format in memory.

0reactions
miloushcommented, Nov 4, 2022

my app setting the image in assembly as resouce, so when wpf loading the manifest stream and copy the data to decoder, wic can’t recognize the image data.

  1. If you using a stream that you got from somewhere, make sure it’s position is 0 before giving to decoder
  2. This would not help if for example the image is HEIC and some of the users don’t have a HEIC codec installed.
Read more comments on GitHub >

github_iconTop Results From Across the Web

The component cannot be found. (Exception from HRESULT
Error code 0x88982f50 is WINCODEC_ERR_COMPONENTNOTFOUND, and it's the Windows Imaging Component's way of saying it can't decode an image file.
Read more >
Exceptions thrown by BitmapImage and BitmapFrame
Scott Hanselman blogged about an ArgumentException that can be thrown when loading an image with a corrupted colour profile.
Read more >
Unknown error 0x88982F50 when attempting to change ...
I am running Windows Vista Home Premium Service Pack1 and have been using Windows Photo Gallery to managemy photos.
Read more >
LB throwing Error on Arcade Games When Just Selecting
I have a few Arcade games that keeps throwing this error. I found it by working on "missing media". All I have to...
Read more >
CMS UI and SVGs | Optimizely Developer Community
Hi All,. Really enjoying the UI enhancement to display thumbnail images when used in the CMS. However, when using SVGs the thumbnail doesn't ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found