UWP InkCanvas crash

Madhu 96 Reputation points
2020-02-11T17:08:10.777+00:00

Hi,

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.

2852-inkcanvaserr.png

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?
https://stackoverflow.com/questions/37433849/uwp-inkcanvas-crashing-unexpectedly-with-a-xaml-parse-exception

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

Thanks
Madhu

Universal Windows Platform (UWP)
{count} votes