Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemoryException when repeatedly initializing InkCanvas in UWP #10063

Open
VishalOmprasad opened this issue Oct 14, 2024 · 0 comments
Open
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners

Comments

@VishalOmprasad
Copy link

Describe the bug

In UWP, initializing a new instance of InkCanvas more than 127 times results in an OutOfMemoryException with the message: "Insufficient memory to continue the execution of the program."
Link to public repository (that contains issue reproducible sample): https://github.com/VishalOmprasad/InkCanvas-Issue-UWP.

Steps to reproduce the bug

  1. Create a new UWP project.
  2. Add a Button control.
  3. In the Button.Click event handler, include a for loop to repeatedly initialize new instances of InkCanvas.
  4. Run the app and observe that it crashes with an OutOfMemoryException after initializing InkCanvas more than 127 times.

Expected behavior

The app should not crash with OutOfMemoryException.

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

@VishalOmprasad VishalOmprasad added the bug Something isn't working label Oct 14, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Oct 14, 2024
@VishalOmprasad VishalOmprasad changed the title OutOfMemoryException when repeatedly initializing InkCanvas OutOfMemoryException when repeatedly initializing InkCanvas in UWP Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

1 participant