WPF: CroppedBitmap crashes with AccessViolationException
See original GitHub issueThis issue has been moved from a ticket on Developer Community.
[severity:I’m unable to use this version] I’m trying to save a screenshot of a diagram I generated in my .NET 5 software.
The diagram in the WPF window consists of thousands of WPF elements and has a width of approx. 300,000*2500 pixels.
I’m using RenderTargetBitmap
to create a bitmap from my WPF window content.
When doing so, …
PngBitmapEncoder
throws anArgumentException
, claiming it cannot convert such large image.- Splitting the image using
CroppedBitmap
in slices of 20,000*2500 pixels each results in anAccessViolationException
.
Please refer to the step recorder information for further details.
Original Comments
Feedback Bot on 8/18/2021, 00:57 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
WPF App causing System.AccessViolationException, how ...
This seems to happen fairly randomly, sometimes copying a grid, opening a context menu or moving a window. The crashing reason seems very ......
Read more >WPF application crash on start up (64 bit)
Hi,. We have a WPF application that crashes on startup for some of our users trying a sample 'hello world' WPF application also...
Read more >System.AccessViolationException in UI for WPF
As much as I understand, this kind of error can happen if some object was not allocated, and / or windows tries to...
Read more >Windows Presentation Foundation (WPF) forum - RSSing.com
Windows.Media.Imaging.BitmapFrame.Create(cbi)); // Throws access violation exception intermittently when zoomed on some images enc.Save(msOut);.
Read more >Untitled
GetLayoutSlot ( graph ); mondj valamit WPF: CroppedBitmap crashes with AccessViolationException #5125 - GitHub WebApr 22, 2010 · RenderTargetBitmap bitmap ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://docs.microsoft.com/en-us/dotnet/api/system.accessviolationexception?view=net-5.0#accessviolationexception-and-trycatch-blocks
Thanks for clarifying, @lindexi!