Madhu-8808 avatar image
0 Votes"
Madhu-8808 asked ·

UWP InkCanvas crash


In our UWP app we have used the InkCanvas in several pages. In one machine the app crashes giving the attached error message. Cannot create instance of type 'Windows.UI.Xaml.Controls.InkCanvas'
Noticed this crashing only in one machine so far and that also seems to happen only in Release mode.


In the xaml we have it defined like this

and we have a Paint bar which was show in several pages. So from each page we set the inkcanvas to the paint bar like this.
PaintBar.getPaintBar().setInkCanvas(inkCanvas); and inside that PaintBar class we use the inkcanvas to draw. So we can draw while in different pages.

For this user it seems to crash the first time they go to a page with the InkCanvas.
Could it be the same reason as this? If so how can we solve it?

Difficult to figure out what to do, since this doesn't happen in our computers.


inkcanvaserr.png (8.0 KiB)
· 9
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We could not reproduce your issue with above screenshot, please share your code or provide us mini complete code sample.

0 Votes 0 · ·

@NicoZhu-MSFT So far it happened only in that user's machine and no issue in any of the other machines we are using. So I assume it is more due to a machine configuration since it works fine in many other machines. I found this and wondering whether it could be the reason. Since it crash the very first time it goes to the page with the Inkcanvas.

Please see the machine's configurations. It says No pen or touch input. Could that be the reason based on the above post? If that's the reason what would be the work around for such machines?


0 Votes 0 · ·
userwindows.png (18.8 KiB)

Could you try to re-install the app and test again.

0 Votes 0 · ·
Show more comments

Have you solved your issue? Does @Nico's comment make sense?

0 Votes 0 · ·

@RoyLi-MSFT I have asked the client to check whether the Ink Canvas sample works in that machine to check whether it's a code issue or driver issue. Haven't heard back yet.

0 Votes 0 · ·

Well, please let us know once you got the result. And if you have any other questions, feel free to contact us.

0 Votes 0 · ·

0 Answers