http://bugs.winehq.org/show_bug.cgi?id=57797
--- Comment #5 from Richard Yao richard@ryao.dev --- Created attachment 79479 --> http://bugs.winehq.org/attachment.cgi?id=79479 Program for changing the stack size of the main stack of an .exe
I tried patching wine to increase the stack size with no success until I decided to binary patch `.wine/drive_c/users/steamuser/AppData/Local/NVIDIA Corporation/GeForceNOW/CEF/GeForceNOW.exe`. Sometimes, it will self update, which undoes the change, but other times it does not and it is able to get a little further. The failures vary, but at an increase from a 16MB stack size, I saw the virtual_setup_exception() function report that the stack size had increased in one failure. With a 160MB stack size, I saw the following:
0024:fixme:ui:uisettings2_get_TextScaleFactor iface 000000007C0A7EB8, value 000000000898DC60 stub! 0024:fixme:ui:uisettings2_get_TextScaleFactor iface 000000007C0A7EB8, value 000000000898D550 stub! 0024:fixme:ui:uisettings2_get_TextScaleFactor iface 000000007C0A7EB8, value 000000000898CE40 stub! 0024:fixme:ui:uisettings2_get_TextScaleFactor iface 000000007C0A7EB8, value 000000000898C730 stub! 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:fixme:ui:uisettings2_get_TextScaleFactor iface 000000007C0A7EB8, value 000000000898C020 stub! 0024:err:gdi:alloc_gdi_handle out of GDI object handles, expect a crash 0024:fixme:resource:GetGuiResources (FFFFFFFFFFFFFFFF,1): stub wine: Unhandled exception 0x80000003 in thread 24 at address 00006FFFEF3BDC92 (thread 0024), starting debugger... 051c:fixme:dbghelp:elf_search_auxv can't find symbol in module 051c:fixme:dbghelp:elf_search_auxv can't find symbol in module 0x006fffef3bdc92 libcef+0x7b0dc92: int3
Note that there is a very long list of warnings about uisettings2_get_TextScaleFactor, but what is interesting is that it ran out of GDI object handles when given sufficient stack space. There is probably some sort of leak on the stack because of some way in which we are different than Windows.
My C program for modifying the stack size is attached. Compile it with `cc pe_modify_stack.c -o pe_modify_stack`.