Jump to content

Recommended Posts

Steps-to-reproduce:

  1. Start paint.net
  2. Choose File / Save
  3. Choose type HEIC (*.heic)
  4. Click Save
  5. 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

 

Link to post
Share on other sites
  • 3 weeks later...

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

  • Like 1
Link to post
Share on other sites

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

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to post
Share on other sites

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)

Link to post
Share on other sites
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.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to post
Share on other sites

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.

  • Like 1

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to post
Share on other sites
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.

  • Like 2

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint 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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...