question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WPF: CroppedBitmap crashes with AccessViolationException

See original GitHub issue

This 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, …

  1. PngBitmapEncoder throws an ArgumentException, claiming it cannot convert such large image.
  2. Splitting the image using CroppedBitmap in slices of 20,000*2500 pixels each results in an AccessViolationException.

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:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found