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.
We could not reproduce your issue with above screenshot, please share your code or provide us mini complete code sample.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 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?
Could you try to re-install the app and test again.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.) - This is in a client's machine. I don't have a way to test with that. But they already uninstalled the Store app yesterday and checked with remote debugging. Then it didn't crash for the Debug mode. Then they installed the Store version and it crashed again. Then they remote debugged with Release mode and it crashed for that also. That's the info I have.
@Nico Zhu (Shanghai Wicresoft Co,.Ltd.) In the above thread some one has added a work around by disabling the Nvdia graphic card and I asked the client to do the same and then it seems to fix it. If he disable the nvidia and use the integrated then it seems to work. But the client doesn't like that work around as it disables the Nvdia graphic card in that machine. So what would be the best way to solve this without disabling the graphic card?
if the issue is related with nvidia drive , please try to update drive to latest version.
Have you solved your issue? Does @Nicolai Pedersen 's comment make sense?
@Roy Li - 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.
Well, please let us know once you got the result. And if you have any other questions, feel free to contact us.
Sign in to comment