Zzap Posted August 5, 2020 Share Posted August 5, 2020 Steps-to-reproduce: Start paint.net Choose File / Save Choose type HEIC (*.heic) Click Save Observe the "Save Configuration" window with - a split second later - a "paint.net 4.2.13" error dialog box containing the following exception details Application version: paint.net 4.2.13 System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at PaintDotNet.SystemLayer.Native.x64.Imaging.WICImagingFactory.CreateDecoderFromStream(Stream stream, BitmapDecodeOptions metadataOptions, Nullable`1 containerFormat, Nullable`1 preferredVendor) at PaintDotNet.Data.WicFileTypeHelpers.Load(Stream input, Nullable`1 forcedContainerFormat, Nullable`1 preferredVendor, IMetadataTranscoder metadataTranscoder) in D:\src\pdn\src\PaintDotNet\Data\WicFileTypeHelpers.cs:line 62 at PaintDotNet.Data.HeifFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\HeifFileType.cs:line 90 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 513 at PaintDotNet.Dialogs.SaveConfigDialog.<>c__DisplayClass49_0.<UpdatePreviewAsync>b__0() in D:\src\pdn\src\PaintDotNet\Dialogs\SaveConfigDialog.cs:line 623 at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PaintDotNet.Dialogs.SaveConfigDialog.<UpdatePreviewAsync>d__49.MoveNext() in D:\src\pdn\src\PaintDotNet\Dialogs\SaveConfigDialog.cs:line 633 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 5, 2020 Share Posted August 5, 2020 Can you share out the image that you're trying to save? (save it as a PDN or PNG though) Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Zzap Posted August 26, 2020 Author Share Posted August 26, 2020 I didn't get an email when you replied, but have asked for notification of replies to this post. Anyway, my process is exactly as described, there is no image involved except the "default one" presented when paint.net is started (start paint.net, save, restart app) I updated to the new alpha so I could provide the list of DLLs too. An .heic file is actually saved by the new alpha when I click OK twice (once for error dialog and once for save window). I don't remember the previous version did that, but I could have clicked "Cancel" to the save dialog then. Quote Application version: paint.net 4.2.14 (α 4.214.7542.39038) System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at PaintDotNet.SystemLayer.Native.x64.Imaging.WICImagingFactory.CreateDecoderFromStream(Stream stream, BitmapDecodeOptions metadataOptions, Nullable`1 containerFormat, Nullable`1 preferredVendor) at PaintDotNet.Data.WicFileTypeHelpers.Load(Stream input, Nullable`1 forcedContainerFormat, Nullable`1 preferredVendor, IMetadataTranscoder metadataTranscoder) in D:\src\pdn\src\PaintDotNet\Data\WicFileTypeHelpers.cs:line 62 at PaintDotNet.Data.HeifFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\HeifFileType.cs:line 89 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 513 at PaintDotNet.Dialogs.SaveConfigDialog.<>c__DisplayClass49_0.<UpdatePreviewAsync>b__0() in D:\src\pdn\src\PaintDotNet\Dialogs\SaveConfigDialog.cs:line 623 at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PaintDotNet.Dialogs.SaveConfigDialog.<UpdatePreviewAsync>d__49.MoveNext() in D:\src\pdn\src\PaintDotNet\Dialogs\SaveConfigDialog.cs:line 633 paint.net - 116868 unable to save heic files.zip 1 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 26, 2020 Share Posted August 26, 2020 Okay so the PDN saves fine for me as an HEIC, so I'm guessing it's something specific to your system. From the diagnostics text you included -- and btw it's fantastic you have 4.2.14 installed because it has some new information in it that helps with this -- it looks like you have something called "CopyTransHEICforWindows" installed. Try removing/disabling that, and I bet this will work now. C:\Program Files\CopyTrans HEIC for Windows\CopyTransHEICforWindows.dll, version=1.0.0.4 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Zzap Posted August 26, 2020 Author Share Posted August 26, 2020 Thanks Rick, this solved the problem! The "CopyTrans HEIC for Windows" was a plugin for Windows in order to support .heic files before Microsoft supported them. I kept it because it included an easy way to convert single/bulk .heic to .jpg directly in Explorer. There was a newer version (1007 vs my 1004) on the site (www.copytrans.net/copytransheic), but I will see if I can "live" without it for now. Thanks again (on a different note, should the "copy to clipboard" in the exception popup include the diagnostic text as well? might be easier for you to get everything at once) Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 26, 2020 Share Posted August 26, 2020 2 hours ago, Zzap said: (on a different note, should the "copy to clipboard" in the exception popup include the diagnostic text as well? might be easier for you to get everything at once) Good idea ... I can do that pretty easily. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 26, 2020 Share Posted August 26, 2020 Also, you can try out @null54's HEIC FileType Plus plugin, which replaces the built-in HEIC support: Unfortunately I can't bundle this plugin with Paint.NET because of the licensing restrictions that HEVC has. I'd have to pay a lot of money for a commercial use license. Also, some of the libraries that are used (and the plugin itself) are GPL, which also prevents me from bundling. 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
null54 Posted August 28, 2020 Share Posted August 28, 2020 On 8/26/2020 at 2:13 PM, Rick Brewster said: Also, some of the libraries that are used (and the plugin itself) are GPL, which also prevents me from bundling. The plugin is only GPL because that is the license used by the x265 encoder, both libheif and the libde265 decoder are LGPL. It would be nice if there was a free / non-GPL HEVC encoder available, but the requirement for HEVC patent royalties makes that unlikely. 2 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Zzap Posted August 30, 2020 Author Share Posted August 30, 2020 Thanks, I may try that! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.