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:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
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.