Mooring10 Posted April 11, 2020 Share Posted April 11, 2020 When attempting to open an HEIC file, I get a popup with "! Acess was denied to the requested file (unauthorized access). The file resides on my OneDrive, but is local in the OneDrive folder. Paint.net version 4.2.10. Details: Application version: paint.net 4.2.10 System.UnauthorizedAccessException: D:\src\pdn\src\SystemLayer.Native\Imaging\WICBitmapSource.cpp (170) : hr = m_pBitmapSource->CopyPixels( pSrcRectWic, static_cast<UINT>(stride), bufferSize, reinterpret_cast<BYTE*>(buffer.ToPointer())); at PaintDotNet.Interop.InteropErrorInfo.ThrowIfError() in D:\src\pdn\src\Base\Interop\InteropErrorInfo.cs:line 98 at PaintDotNet.SystemLayer.Native.x64.NativeUtilities.ThrowOnErrorImpl(Int32 hr, SByte* szHr, IUnknown* pFxErrorInfo) at PaintDotNet.SystemLayer.Native.x64.Imaging.WICBitmapSource.CopyPixels(Nullable`1 srcRect, Int32 stride, UInt32 bufferSize, IntPtr buffer) at PaintDotNet.Imaging.Proxies.BitmapSourceProxy.CopyPixels(Nullable`1 srcRect, Int32 bufferStride, UInt32 bufferSize, IntPtr buffer) in D:\src\pdn\src\Base\Imaging\Generated\IBitmapSource.Generated.cs:line 79 at PaintDotNet.Data.WicFileTypeHelpers.Load(Stream input, Nullable`1 forcedContainerFormat, Nullable`1 preferredVendor, MetadataTranscoder metadataTranscoder) in D:\src\pdn\src\PaintDotNet\Data\WicFileTypeHelpers.cs:line 134 at PaintDotNet.Data.HeifFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\HeifFileType.cs:line 104 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 522 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158 Quote Link to comment Share on other sites More sharing options...
BoltBait Posted April 11, 2020 Share Posted April 11, 2020 If you copy the file from your OneDrive folder and put it in ANY OTHER FOLDER... does it open then? Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
jrkmtf Posted April 28, 2020 Share Posted April 28, 2020 I'm having the same problem. Originally the file was in my OneDrive, local on the computer, same as @Mooring10. I copied to my desktop and am getting the same error message. I have both the HEIF Image Extension and HEVC Video Extension installed on my machine from the Windows store. Should I try anything else to get this to work? Quote Link to comment Share on other sites More sharing options...
timlt Posted May 10, 2020 Share Posted May 10, 2020 On 4/28/2020 at 8:08 AM, jrkmtf said: I'm having the same problem. Originally the file was in my OneDrive, local on the computer, same as @Mooring10. I copied to my desktop and am getting the same error message. I have both the HEIF Image Extension and HEVC Video Extension installed on my machine from the Windows store. Should I try anything else to get this to work? Same issue. Heic file on Onedrive folder but stored on local drive repros the error. Any Heic file outside of Onedrive folders on local drive, same error. JPG or other formats work fine in any location. Application version: paint.net 4.2.11 (β 4.211.7433.39692) System.UnauthorizedAccessException: D:\src\pdn\src\SystemLayer.Native\Imaging\WICBitmapSource.cpp (170) : hr = m_pBitmapSource->CopyPixels( pSrcRectWic, static_cast<UINT>(stride), bufferSize, reinterpret_cast<BYTE*>(buffer.ToPointer())); at PaintDotNet.Interop.InteropErrorInfo.ThrowIfError() in D:\src\pdn\src\Base\Interop\InteropErrorInfo.cs:line 98 at PaintDotNet.SystemLayer.Native.x64.NativeUtilities.ThrowOnErrorImpl(Int32 hr, SByte* szHr, IUnknown* pFxErrorInfo) at PaintDotNet.SystemLayer.Native.x64.Imaging.WICBitmapSource.CopyPixels(Nullable`1 srcRect, Int32 stride, UInt32 bufferSize, IntPtr buffer) at PaintDotNet.Imaging.Proxies.BitmapSourceProxy.CopyPixels(Nullable`1 srcRect, Int32 bufferStride, UInt32 bufferSize, IntPtr buffer) in D:\src\pdn\src\Base\Imaging\Generated\IBitmapSource.Generated.cs:line 79 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 139 at PaintDotNet.Data.HeifFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\HeifFileType.cs:line 104 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 527 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 10, 2020 Share Posted May 10, 2020 Can you go into the file's Properties, and make sure the file permissions are normal? Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
timlt Posted May 10, 2020 Share Posted May 10, 2020 3 minutes ago, toe_head2001 said: Can you go into the file's Properties, and make sure the file permissions are normal? On Security tab of the file properties, I compared the permissions of Heic files in that folder with JPG files in that same folder. All files had the exact same perms set for: Authenticated Users, Admins, and Users. But the JPG files open fine, while HEIC throw the exception. I just tried another test: opened a regular TIF file in Paint.NET, then tried "Save As" to my desktop. Save As JPG works. Save As HEIC generates a similar exception: Application version: paint.net 4.2.11 (β 4.211.7433.39692) System.AggregateException: One or more errors occurred. ---> PaintDotNet.Data.WicEncodeException: location = FrameCommit ---> System.UnauthorizedAccessException: D:\src\pdn\src\SystemLayer.Native\Imaging\WICBitmapFrameEncode.cpp (273) : hr = m_pBitmapFrameEncode->Commit(); at PaintDotNet.Interop.InteropErrorInfo.ThrowIfError() in D:\src\pdn\src\Base\Interop\InteropErrorInfo.cs:line 98 at PaintDotNet.SystemLayer.Native.x64.NativeUtilities.ThrowOnErrorImpl(Int32 hr, SByte* szHr, IUnknown* pFxErrorInfo) at PaintDotNet.SystemLayer.Native.x64.Imaging.WICBitmapFrameEncode.Commit() at PaintDotNet.Data.WicEncoder.Try(WicEncodeLocation location, Action action) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 283 --- End of inner exception stack trace --- at PaintDotNet.Data.WicEncoder.Try(WicEncodeLocation location, Action action) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 287 at PaintDotNet.Data.WicEncoder.Encode(IBitmapSource source, Vector2Double dpi, IReadOnlyList`1 exifPropertyItems, XmpPacket xmpPacket, Stream output, ContainerFormat containerFormat, Nullable`1 preferredVendor, IEnumerable`1 encoderOptions, IMetadataTranscoder metadataTranscoder, WriteSourceMode writeSourceMode, ProgressEventHandler progressCallback, Object progressCallbackSender, Double progressPercentStart) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 267 at PaintDotNet.Data.WicEncoder.Encode(WicEncodeParameters parameters) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 137 at PaintDotNet.Data.WicEncoder.Encode() in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 57 --- End of inner exception stack trace --- at PaintDotNet.Data.WicEncoder.AddExceptionAndThrowAll(Exception ex) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 101 at PaintDotNet.Data.WicEncoder.Encode() in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 83 at PaintDotNet.Data.WicFileTypeHelpers.Save(Document document, Surface flattenedSurface, Stream output, ContainerFormat containerFormat, Nullable`1 preferredVendor, IMetadataTranscoder metadataTranscoder, IEnumerable`1 encoderOptions, SavableBitDepths bitDepth, Int32 ditherLevelForIndexed, ProgressEventHandler progressCallback, Object progressCallbackSender) in D:\src\pdn\src\PaintDotNet\Data\WicFileTypeHelpers.cs:line 355 at PaintDotNet.Data.HeifFileType.OnSaveT(Document input, Stream output, PropertyBasedSaveConfigToken token, Surface scratchSurface, ProgressEventHandler progressCallback) in D:\src\pdn\src\PaintDotNet\Data\HeifFileType.cs:line 144 at PaintDotNet.FileType.Save(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler callback, Boolean rememberToken) in D:\src\pdn\src\Data\FileType.cs:line 292 at PaintDotNet.Dialogs.SaveConfigDialog.<>c__DisplayClass49_0.<UpdatePreviewAsync>b__0() in D:\src\pdn\src\PaintDotNet\Dialogs\SaveConfigDialog.cs:line 614 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 ---> (Inner Exception #0) PaintDotNet.Data.WicEncodeException: location = FrameCommit ---> System.UnauthorizedAccessException: D:\src\pdn\src\SystemLayer.Native\Imaging\WICBitmapFrameEncode.cpp (273) : hr = m_pBitmapFrameEncode->Commit(); at PaintDotNet.Interop.InteropErrorInfo.ThrowIfError() in D:\src\pdn\src\Base\Interop\InteropErrorInfo.cs:line 98 at PaintDotNet.SystemLayer.Native.x64.NativeUtilities.ThrowOnErrorImpl(Int32 hr, SByte* szHr, IUnknown* pFxErrorInfo) at PaintDotNet.SystemLayer.Native.x64.Imaging.WICBitmapFrameEncode.Commit() at PaintDotNet.Data.WicEncoder.Try(WicEncodeLocation location, Action action) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 283 --- End of inner exception stack trace --- at PaintDotNet.Data.WicEncoder.Try(WicEncodeLocation location, Action action) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 287 at PaintDotNet.Data.WicEncoder.Encode(IBitmapSource source, Vector2Double dpi, IReadOnlyList`1 exifPropertyItems, XmpPacket xmpPacket, Stream output, ContainerFormat containerFormat, Nullable`1 preferredVendor, IEnumerable`1 encoderOptions, IMetadataTranscoder metadataTranscoder, WriteSourceMode writeSourceMode, ProgressEventHandler progressCallback, Object progressCallbackSender, Double progressPercentStart) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 267 at PaintDotNet.Data.WicEncoder.Encode(WicEncodeParameters parameters) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 137 at PaintDotNet.Data.WicEncoder.Encode() in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 57<--- ---> (Inner Exception #1) PaintDotNet.Data.WicEncodeException: location = UnhandledEncodeError ---> PaintDotNet.Data.WicEncodeException: location = FrameCommit ---> System.UnauthorizedAccessException: D:\src\pdn\src\SystemLayer.Native\Imaging\WICBitmapFrameEncode.cpp (273) : hr = m_pBitmapFrameEncode->Commit(); at PaintDotNet.Interop.InteropErrorInfo.ThrowIfError() in D:\src\pdn\src\Base\Interop\InteropErrorInfo.cs:line 98 at PaintDotNet.SystemLayer.Native.x64.NativeUtilities.ThrowOnErrorImpl(Int32 hr, SByte* szHr, IUnknown* pFxErrorInfo) at PaintDotNet.SystemLayer.Native.x64.Imaging.WICBitmapFrameEncode.Commit() at PaintDotNet.Data.WicEncoder.Try(WicEncodeLocation location, Action action) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 283 --- End of inner exception stack trace --- at PaintDotNet.Data.WicEncoder.Try(WicEncodeLocation location, Action action) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 287 at PaintDotNet.Data.WicEncoder.Encode(IBitmapSource source, Vector2Double dpi, IReadOnlyList`1 exifPropertyItems, XmpPacket xmpPacket, Stream output, ContainerFormat containerFormat, Nullable`1 preferredVendor, IEnumerable`1 encoderOptions, IMetadataTranscoder metadataTranscoder, WriteSourceMode writeSourceMode, ProgressEventHandler progressCallback, Object progressCallbackSender, Double progressPercentStart) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 267 at PaintDotNet.Data.WicEncoder.Encode(WicEncodeParameters parameters) in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 137 at PaintDotNet.Data.WicEncoder.Encode() in D:\src\pdn\src\PaintDotNet\Data\WicEncoder.cs:line 57 --- End of inner exception stack trace ---<--- 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.