question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WinForms Designer Hangs on a form with a large number of controls as of VS 17.5

See original GitHub issue

Environment

VS 17.5.1

.NET version

.NET 6

Did this work in a previous version of Visual Studio and/or previous .NET release?

The problem does not exist in VS 17.4

Issue description

When opening a form with 2700+ Telerik controls and simply trying to save the form, VS hangs. The CPU varies but goes to 90%+ and the memory used climbs to use all available (64 GB), The form never saves (tried up to 8 hours). This did not happen under VS 17.4.

Steps to reproduce

create a form with 2700+ Telerik controls and open in the designer then try to save the form

Diagnostics

unable due to the hang.

Issue Analytics

  • State:open
  • Created 6 months ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
elachlancommented, Mar 9, 2023

Is it even possible to have a form with 3200 controls? Winforms has a handle per control, you will run into handle starvation and receive OOM errors if you add much more controls. Moving your app to lazy load controls would massively reduce your memory/handle usage.

.net framework had the same issue, I moved to lazy loading because the designer was painfully slow for some of the larger forms with 10+ tabs.

That being said, it would be nice if the designer could handle it. What is the minimum number of controls that causes the issue?

0reactions
Philip-Wang01commented, Mar 14, 2023

Changed the status of the feedback to under investigation and verified this in a different environment. In VS 17.4.5, opening the MainForm about 90 seconds and then saving the Form after resizing it takes about 30 seconds. In VS 17.5.1, opening the MainForm about 90 seconds and then saving the Form after resizing it, VS is not responding. In VS 17.5.1 + vsix, opening the MainForm about 90 seconds and then saving the Form after resizing it takes about 300 seconds.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Winforms designer crashing when loading form with user ...
I have a Winforms form that has 2 user controls. The controls are dynamic, i.e., they use table layout panels quite a bit...
Read more >
WinForms Designer Hangs on a form with a large number ...
Windows Forms is a .NET UI framework for building Windows desktop applications. - WinForms Designer Hangs on a form with a large number...
Read more >
Visual Studio 2019 .NET Core hangs in forms designer
Anytime I access the forms designer in Visual Studio 2019, the application stops responding until I kill and restart it. This only happens...
Read more >
Web Froms - Visual Studio 2022 v17.5.2 hangs when ...
Web Froms - Visual Studio 2022 v17.5.2 hangs when clicking any control ... Open Tools > Options > Web Forms Designer, select the...
Read more >
Visual Studio 2022 WinForms designer hang on "Loading ...
Create a new project using the template "Windows Forms App (. ... but with a complex forms setup (many controls/many nested levels of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found