WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

InfiniteCanvas Crashing

Open phandrieu opened this issue 2 years ago • 11 comments

Describe the bug

InfiniteCanvas is crashing after a few lines drawn, and the Event Observer captures the following error :

Seems like #3178

Nom de l’application défaillante UniversalWhiteboard.exe, version : 1.0.0.0, horodatage : 0x61628bc9 Nom du module défaillant : ntdll.dll, version : 10.0.22000.708, horodatage : 0x71bf5f26 Code d’exception : 0xc0000374 Décalage d’erreur : 0x000ea619 ID du processus défaillant : 0xd94 Heure de début de l’application défaillante : 0x01d8879a906ab568 Chemin d’accès de l’application défaillante : C:\Users\Paul-Henri\source\repos\UniversalWhiteboard\UniversalWhiteboard\bin\x86\Debug\AppX\UniversalWhiteboard.exe Chemin d’accès du module défaillant: C:\Windows\SYSTEM32\ntdll.dll ID de rapport : 34ba5d41-9c5f-4a40-881e-82b4cec0cbc9 Nom complet du package défaillant : e9863d32-e11e-4dfb-ace0-047da93a5c5f_1.0.4.0_x86__0feck2cac0zqp ID de l’application relative au package défaillant : App

Regression

No response

Reproducible in sample app?

  • [ ] This bug can be reproduced in the sample app.

Steps to reproduce

1. With an InfiniteCanvas implemented in the app
2. Write a few lines on the board
3. The app will crash while you're writing

Expected behavior

Everything works fine for a while, and then after some kinda random amount of lines written on the canvas, the app crashes.

Screenshots

No response

Windows Build Number

  • [ ] Windows 10 1809 (Build 17763)
  • [ ] Windows 10 1903 (Build 18362)
  • [ ] Windows 10 1909 (Build 18363)
  • [ ] Windows 10 2004 (Build 19041)
  • [ ] Windows 10 20H2 (Build 19042)
  • [ ] Windows 10 21H1 (Build 19043)
  • [X] Windows 11 21H2 (Build 22000)
  • [ ] Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • [X] Windows 10, version 1809 (Build 17763)
  • [ ] Windows 10, version 1903 (Build 18362)
  • [ ] Windows 10, version 1909 (Build 18363)
  • [X] Windows 10, version 2004 (Build 19041)
  • [ ] Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

VS 17.2.4

Device form factor

Desktop

Nuget packages

Microsoft.Toolkit.UWP 7.1.2 Microsoft.Toolkit.UWP.UI 7.1.2 Microsoft.Toolkit.UWP.UI.Controls 7.1.2 Microsoft.NETCore.UniversalWindowsPlatform 6.2.13

Additional context

No response

Help us help you

Yes, but only if others can assist.

phandrieu avatar Jun 24 '22 07:06 phandrieu

Hello phandrieu, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost avatar Jun 24 '22 07:06 ghost

Thanks @phandrieu were you able to reproduce on your machine with our sample app or in a file new project? That'd at least help us narrow down where the issue may be coming from and reproduce it to try and get under a debugger.

michael-hawker avatar Jul 07 '22 18:07 michael-hawker

Hi, Thanks for your awnser. I was not able to reproduce the issue in your sample app, nor in a file new project. Even though, my codebase is very small, and running it with a debugger doesn't give any further information as the debugger is not able to handle the error... Do you have any idea ? PS : I tried on another machine (a Surface Pro 2017 m3 4Gb running Windows 11 as well) and the same error occured, so at least my windows install isn't broken or something...

phandrieu avatar Jul 09 '22 19:07 phandrieu

Hmm, @phandrieu ntdll.dll is a system dll. Have you tried turning on mixed debugging (native and managed)? That usually tends to catch some of these native type exceptions and provide a better stack trace (as well as turning all exceptions on to catch the earliest exception).

Since we're an OSS project and source link should be enabled. You could try and browse through the source using F12 on the InfiniteCanvas and find the method related to text entry or whatever type of input you're providing for your repro steps (a video could help to visualize what you're seeing too).

Then you may be able to at least pinpoint what's being run in the toolkit code before you see the crash? That could be another way to help diagnose where the issue is in the component.

michael-hawker avatar Jul 11 '22 21:07 michael-hawker

@michael-hawker I've tried to enable mixed debugging, but havent't had any further relevant information. Though, I found out that the following "Information" was reported in the event observer of windows right after the app crashed :

Détecteur d'erreurs 1942354950714111180, type 5
Nom d’événement : FaultTolerantHeap
Réponse : Non disponible
ID de CAB : 0

Signature du problème : 
P1 : UniversalWhiteboard.exe
P2 : 1.0.0.0
P3 : 62EA8AC5
P4 : ffffbaad
P5 : 
P6 : 
P7 : 
P8 : 
P9 : 
P10 : 

It really starts to seem like it's the same problem as #3178, but my nuget packages are updated... Kinda strange 👀👀 In any case thanks for your help :)

phandrieu avatar Aug 03 '22 14:08 phandrieu

Update @michael-hawker I tried to create a new application, with only an InfiniteCanvas and I get the exact same problem :

Nom de l’application défaillante TestWB.exe, version : 1.0.0.0, horodatage : 0x61628bc9
Nom du module défaillant : ntdll.dll, version : 10.0.22000.778, horodatage : 0x09c67c09
Code d’exception : 0xc0000374
Décalage d’erreur : 0x000ea829
ID du processus défaillant : 0x2f9c
Heure de début de l’application défaillante : 0x01d8a74d08ca95cc
Chemin d’accès de l’application défaillante : C:\Users\Paul-Henri\source\repos\UniversalWhiteboard\TestWB\bin\x86\Debug\AppX\TestWB.exe
Chemin d’accès du module défaillant: C:\Windows\SYSTEM32\ntdll.dll
ID de rapport : 894d4127-a7ed-455e-be4b-9868755a87f5
Nom complet du package défaillant : 41e45cae-132b-4fac-9b91-f9ef99fef6f4_1.0.0.0_x86__4a9as015g09ne
ID de l’application relative au package défaillant : App

phandrieu avatar Aug 03 '22 15:08 phandrieu

@phandrieu thanks, can you share that minimal project with the bin/obj folders removed and attach here? Does it crash as soon as the app loads, do you interact with the canvas in a specific way?

michael-hawker avatar Aug 03 '22 17:08 michael-hawker

TestWB.zip @michael-hawker Here it is, it crashes randomly while I'm writing on the canvas, it may take from 10 seconds to 10 minutes of writing, depending on an unknown factor... Hope it'll help 🤞 Thanks :)

phandrieu avatar Aug 03 '22 20:08 phandrieu

Thanks @phandrieu, @Arlodotexe you want to see if you can reproduce on your machine?

michael-hawker avatar Aug 04 '22 22:08 michael-hawker

@michael-hawker Just in case I recorded a video of the small app crashing, but as I said in my previous posts, the number of lines needed to make the app crash is random from one time to the other... Also, I sent the AppX file to my gf and it also crashes on her Surface Pro, so it doesn't seems to be caused by my specific device.

Video link

phandrieu avatar Aug 05 '22 08:08 phandrieu

The Windows CommunityToolkit Sample App from the MicrosoftStore crashes too with the same heap corruption. Tested that as my projects crashed too and was unsure if this was due to my VS setup etc.

Just drawed something until it crashes. Attached is the content of Windows EventViewer Report.wer

Report.txt

minesworld avatar Jan 23 '23 22:01 minesworld