Skip to content

🐛 Crashes on startup after Windows update #156

Description

@dawsonbooth

I have searched through the issues and didn't find my problem.

  • Confirm

Bug description

Nucleus Co-op v2.4.1 crashed on startup after Windows update.

Crashlog:
System.ComponentModel.Win32Exception: Error creating window handle
at System.Windows.Forms.NativeWindow.CreateHandle
at System.Windows.Forms.Form.CenterToScreen
at Nucleus.Coop.ProfileSettings..ctor()

WinDbg/SOS:
System.ComponentModel.Win32Exception nativeErrorCode = 1158
1158 = ERROR_NO_MORE_USER_HANDLES

Workaround:
Set HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota to 18000 and rebooted.
Nucleus opened afterward.

Debug Log

[6/6/2026 12:33:00 PM] System.ComponentModel.Win32Exception (0x80004005): Error creating window handle.
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Form.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.Form.CenterToScreen()
   at Nucleus.Coop.ProfileSettings..ctor()
   at Nucleus.Coop.MainForm..ctor(String[] args)
   at Nucleus.Coop.Program.RunApplication(String[] args)
   at Nucleus.Coop.Program.Main(String[] args)

Possible fixes or solutions

This likely means Nucleus’s ProfileSettings window is creating an unusually large number of USER/window handles. Raising the quota gives it more headroom, but the app may still be close to a bad design threshold.

Some ideas: lazy-load the profile settings form, reduce HWND-backed controls, or avoid creating that huge settings UI during startup.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working in the app. Be it crashing, scaling, errors, or something else

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions