Last Updated: 29 May 2023 08:38 by ADMIN
Release R2 2023
Martin Ivanov
Created on: 19 May 2023 09:13
Category: FileDialogs
Type: Bug Report
FileDialogs: ArithmeticException is thrown when the device model profile of the OS is set to sRGB virtual device model profile.

ArithmeticException is thrown on RadSaveFileDialog's ShowDialog call, when the device model profile of the OS (from the Color Management menu) is set to sRGB virtual device model profile.

The profile should be set through the Change system defaults menu. This setting is accessed by opening the Color Management menu in the OS, then select the Advanced tab, then click on Change system defaults... In the newly opened dialog click Advanced again and change the Device profile to sRGB virtual device model profile.

This is actually a bug in the WPF framework that is reported here.

The important part of the exception stacktrace is the following:

System.ArithmeticException: Overflow or underflow in the arithmetic operation.
--- End of inner exception stack trace ---
at System.Windows.Media.Imaging.ColorConvertedBitmap.FinalizeCreation()
at System.Windows.Media.Imaging.ColorConvertedBitmap..ctor(BitmapSource source, ColorContext sourceColorContext, ColorContext destinationColorContext, PixelFormat format)
at System.Windows.Media.Imaging.BitmapSource.CreateCachedBitmap(BitmapFrame frame, BitmapSourceSafeMILHandle wicSource, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, BitmapPalette palette)
at System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()
at System.Windows.Media.Imaging.BitmapFrameDecode..ctor(Int32 frameNumber, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, BitmapDecoder decoder)
at System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(BitmapDecoder decoder, ReadOnlyCollection`1 frames)
at System.Windows.Media.Imaging.BitmapDecoder.get_Frames()
at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)
at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.Windows.Baml2006.TypeConverterMarkupExtension.ProvideValue(IServiceProvider serviceProvider)