Visual Studio closes when editing forms

When successively editing a windows form with many visual components, visual studio 2019 closes unexpectedly, no message appears, only the errors below are recorded in the windows event log.
the third appears several, the first and second only 1x

  • 1000 0 2 100 0 0x80000000000000 2257013 Application ANDRE
  • devenv.exe 16.9.31112.23 604b7e18 KERNELBASE.dll 10.0.19041.804 b610d74d c06d007e 0012a8b2 1808 01d7262b0ce6b9b1 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe C:\WINDOWS\System32\KERNELBASE.dll 85bd687d-55c9-4ed5-9c5a-5e40d725f11d
  • 1026 0 2 0 0 0x80000000000000 2257012 Application ANDRE
  • Aplicativo: devenv.exe Versão do Framework: v4.0.30319 Descrição: O processo foi terminado devido a uma exceção sem tratamento. Informações da Exceção: System.Runtime.InteropServices.SEHException em System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr) em System.Windows.Forms.NativeWindow.DefWndProc(System.Windows.Forms.Message ByRef) em System.Windows.Forms.WebBrowserBase+WebBrowserBaseNativeWindow.WndProc(System.Windows.Forms.Message ByRef) em System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)
  • 1023 1 2 0 0 0x8000000000000000 2257011 Application ANDRE
  • C:\WINDOWS\system32\msscntrs.dll 8

Thanks, logged as bugs://85782

my collage of the windows event did not look as I wanted, but I realized that it was already registered as a bug, was it enough to identify?

Hello. I need more info on how to reproduce the issue. I take it you encountered the problem when editing a specific winform only. Do you have any specific steps on how to reproduce the issue? Which form do you edit?

in the project that was sent as an example the error occurred in the form uprogramacaocarga.

I cannot reproduce the steps. I was changing some gridview properties.
I think the simplest way to check would be to open the form and simulate actions on it, such as adding new events, changing location objects, etc. the errors occur randomly, but they always occur, sometimes the visual studio restarts, sometimes it just crashes indefinitely and I need to kill by the task manager.

Designer shows errors for me. Probably I need next dll to open it:
‘AxInterop.SHDocVw’, ‘Bematech’ , ‘Bematech.Fiscal’, ‘Bematech.Perifericos’, ‘Interop.MSScriptControl’, ‘Interop.SHDocVw’, ‘PacoteInterfaces’, ‘System.Json’, ‘Zen.Barcode.Core’

temp.rar (1.6 MB)

sometimes we get an out of memory error.

Do you know if you have a forecast for visual studio in 64 bits? so we can use more memory in his process.

I haven’t heard anything from Microsoft on this, so no idea if that is even planned, (and if sol, whether for 19.x or VS20, or even later)

Hello Claudio.
I tried to work in the uprogramacaocarga form for almost 20 minutes, and VS didn’t crash. Can we maybe arrange teamviewer on your machine? I need to attach one VS to another, and see what exception and callstack are thrown when VS crashes.
If it is possible, we can arrange any time on Monday or Tuesday that is suitable for you.
Best regards.

1 Like

I also cannot reproduce the errors that we are having at any time, but they occur at various times, editing forms, compiling, I used uprogramacaocarga as an example but this occurs everywhere.

We can do as you suggested and try to reproduce the problem in my environment.

My time zone is UTC-3, I don’t know what your time zone is, but you can Monday at 5 PM-UTC.

On Monday, put the connection ID before this time.

Best regards.

I am ready for the TV session. You can send me your TV data via private messages.
Best regards.

1 Like


Some complex screens to help with the analysis.


Some large classes (without form)

Steps to follow:
open a form, add a new button for example, type any code.

do this with several forms and leave them open

create new methods in large classes.

compile, 1, 2, 3 … times, at some point the problem occurs

1 Like

one more information.

the print messages below always appear.

the first talk about reducing the editor’s performance.

the second that was frozen for 42sec

Hello Claudio.
We made some changes to optimize work with winforms. But I still couldn’t reproduce the outofmemory exception and crashing VS here, so I can’t be sure we fixed the reason of your crashes.
The fixes will be available in today’s build. Please, try it and let me know if working with it is better for you.
Best regards.

Thank you very much, I will test and give you feedback.

New build is in your Personal Downloads. thanx!

something is wrong with the version, I can’t even open a form, the processing is always high and it doesn’t open, I waited more than 5 minutes and took the test more than once.

Sorry, I sent your the wring build (this has a different fix for someone else), but we’ll look at it anyways. It woudkl be good if you could retest your issue with todays official build later today.


I will test later

1 Like