-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BitmapImage crashes when loading a PNG with embedded colour profile and using a display virtual colour profile #3884
Comments
This exception reproduces also in the ImageSourceConverter used with the TypeConverter of the ImageSource class. In other words, the error is thrown if you use a string path for the image source in XAML.
In that case the stacktrace originates from the TypeConverterMarkupExtension class:
|
This no longer reproduces in 8.0.100-preview.3.23178.7 (OS 25357.1). @martinivanoff if you have a new repro please post it, otherwise this can be closed as fixed (or external) |
This submission has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 14 days. It will be closed if no further activity occurs within 7 days of this comment. |
Problem description:
After customers have updated their OS to 20H1 or 20H2 some have had their System Default display colour profile changed to "sRGB virtual device model profile". When loading a PNG with the
iCCP
ancillary chunk as aSystem.Windows.Media.Imaging.BitmapImage
from a stream, it will now crash. If the customer changes the colour profile back to "sRGB IEC61966-2.1" the crash no longer occurs (or if we load a PNG without theiCCP
chunk, that won't crash either).Actual behavior:
Stack trace from our app:
Expected behavior:
Doesn't crash.
Minimal repro:
Ensure that your System Default colour profile is "sRGB virtual device model profile" (setting it for the user won't generate the crash, it has to be the System Default).
I've attached a complete repo, including a PNG with embedded colour profile, but this is the source:
ColourProfileCrash.zip
Exception message (
OverflowException
):Inner exception message (
ArithmeticException
):Or solution has been to catch the exception, and try the load again, but ignoring the colour profile.
Some customer reports of the issue:
https://forum.affinity.serif.com/index.php?/topic/121111-affinity-photo-and-designer-wont-launch-anymore/&do=findComment&comment=662948
https://forum.affinity.serif.com/index.php?/topic/127975-win10-install-shows-in-system-tray-then-disappears/&do=findComment&comment=702680
https://forum.affinity.serif.com/index.php?/topic/121274-the-colors-are-totally-wrong-in-affinity/&do=findComment&comment=661865
https://forum.affinity.serif.com/index.php?/topic/126311-designer-publisher-and-photo-did-not-start-after-win10-update-to-20h2/
https://forum.affinity.serif.com/index.php?/topic/124081-cant-reinstall-after-no-start-problem/&do=findComment&comment=682029
https://forum.affinity.serif.com/index.php?/topic/118653-photo-crash-on-startup-even-installer-windows/&do=findComment&comment=645262
The text was updated successfully, but these errors were encountered: