CPPGameLauncher icon indicating copy to clipboard operation
CPPGameLauncher copied to clipboard

"Erro! Failed to create window"

Open LeonanCarvalho opened this issue 4 years ago • 21 comments

Hello, I`m trying to compile it, after solving all dependencies I'm receiving this error image

'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\CPPGameLauncher.exe'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.778_none_17b1aa466d9fc986\GdiPlus.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\zlibd1.dll'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\libcurl-d.dll'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'D:\DEV\CPPGameLauncher\x64\Debug\libcrypto-1_1-x64.dll'. Symbols loaded. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\Wldap32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\secur32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\sspicli.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\mswsock.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\WindowsCodecs.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\DWrite.dll'. Exception thrown at 0x00007FFD83EDA799 in CPPGameLauncher.exe: Microsoft C++ exception: std::logic_error at memory location 0x000000EF7D78F408. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. 'CPPGameLauncher.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll' 'CPPGameLauncher.exe' (Win32): Loaded 'C:\Windows\System32\iertutil.dll'. The thread 0x5a64 has exited with code 1 (0x1). The thread 0x628 has exited with code 0 (0x0). The thread 0x4658 has exited with code 0 (0x0). The thread 0x3664 has exited with code 0 (0x0). The thread 0x551c has exited with code 0 (0x0). The thread 0x6830 has exited with code 0 (0x0). The program '[5328] CPPGameLauncher.exe' has exited with code 0 (0x0).

LeonanCarvalho avatar Apr 28 '20 05:04 LeonanCarvalho

Hello. I have the same problem. This happens when building x64. When building x86, I get the error: Error LNK1104 cannot open the file "zlibstaticd.lib" I think it is necessary to collect for x86 for greater compatibility? Installed zlib libraries using vcpkg: x64-windows x64-windows-static x86-windows x86-windows-static The file zlibstaticd.lib is not in any directory. vc 2019

MikhailTsvetkov avatar Apr 28 '20 22:04 MikhailTsvetkov

It turned out to be assembled, but it starts every other time. A window creation error appears regularly.

MikhailTsvetkov avatar Apr 29 '20 00:04 MikhailTsvetkov

same problem here... can't create a window

thalysmarciobn avatar May 18 '20 05:05 thalysmarciobn

same problem

DemOnJR avatar May 25 '20 21:05 DemOnJR

This specific issue is fixed by initializing the window class with zeroes: WNDCLASSEXW wcex = {0}; However after doing that the window simply won't update (will show a black windows if you try to call it as well)

mvccogo avatar May 26 '20 22:05 mvccogo

That not solve the problem.

DemOnJR avatar May 26 '20 23:05 DemOnJR

It solved this specific issue for me. Are you still receiving the "Failed to create window"? Anyway, the launcher still wont open due to a read access violation in void Main::paint, more specifically in gCache->g->DrawCachedBitmap(gCache->backgroundCachedBitmap.get(), 0, 0);

mvccogo avatar May 27 '20 01:05 mvccogo

I spent all day searching the net for Updater, i think tomorrow I'll start learning c#

DemOnJR avatar May 27 '20 02:05 DemOnJR

It solved this specific issue for me. Are you still receiving the "Failed to create window"? Anyway, the launcher still wont open due to a read access violation in void Main::paint, more specifically in gCache->g->DrawCachedBitmap(gCache->backgroundCachedBitmap.get(), 0, 0);

not works... here.

thalysmarciobn avatar Jun 12 '20 19:06 thalysmarciobn

It solved this specific issue for me. Are you still receiving the "Failed to create window"? Anyway, the launcher still wont open due to a read access violation in void Main::paint, more specifically in gCache->g->DrawCachedBitmap(gCache->backgroundCachedBitmap.get(), 0, 0);

not works... here.

i know, use another one this is not working

DemOnJR avatar Jun 12 '20 21:06 DemOnJR

It solved this specific issue for me. Are you still receiving the "Failed to create window"? Anyway, the launcher still wont open due to a read access violation in void Main::paint, more specifically in gCache->g->DrawCachedBitmap(gCache->backgroundCachedBitmap.get(), 0, 0);

not works... here.

i know, use another one this is not working

every gCache->g not works... shows "access violation"

thalysmarciobn avatar Jun 13 '20 01:06 thalysmarciobn

How I can fix it ? image

LukasCCB avatar Oct 25 '20 18:10 LukasCCB

How I can fix it ? image https://github.com/FLWL/CPPGameLauncher/blob/5006d3900cd118b3cbe8406079055801c3833b9e/main.cpp#L36 WNDCLASSEXW wcex to WNDCLASSEXW wcex = {};

motz61 avatar Jan 11 '21 10:01 motz61

@motz61 Thanks. Nothing result. Invisible app. And auto close.

image

LukasCCB avatar Jan 11 '21 10:01 LukasCCB

@motz61 Thanks. Nothing result. Invisible app. And auto close.

image

https://i.imgur.com/13uD4pL.png https://diffy.org/diff/5xfsbfbnsyfckasto3sh9w9udi Works for me! https://i.imgur.com/CKYkhLL.png

motz61 avatar Jan 11 '21 11:01 motz61

@motz61 https://i.imgur.com/13uD4pL.png https://diffy.org/diff/5xfsbfbnsyfckasto3sh9w9udi Works for me! https://i.imgur.com/CKYkhLL.png

Already changes. same result of the problem above. image

LukasCCB avatar Jan 11 '21 11:01 LukasCCB

@motz61 https://i.imgur.com/13uD4pL.png https://diffy.org/diff/5xfsbfbnsyfckasto3sh9w9udi Works for me! https://i.imgur.com/CKYkhLL.png

Already changes. same result of the problem above. image

You can run on debug mode and see whats happen when the debugger is present? I didn't tested on x64 platform, sorry !

motz61 avatar Jan 11 '21 11:01 motz61

Hello,

We are also facing same reported issue.

Trying this with x64. But unable to get this working.

Is there any fix/workaround for this?

manoharyes avatar Dec 23 '22 07:12 manoharyes

Hey guys I am also in need for that. If someone got a fix and could share..

brunobertapeli avatar Mar 26 '24 22:03 brunobertapeli

Hey guys I am also in need for that. If someone got a fix and could share..

I recommend finding another alternative. Use the XSolla launcher or the HeliosLauncher launcher. made in Electron.

Is 2 open-source launchers, which really work and are very complete. literally. Well, this one has a lot of problems and you waste more time fixing it than using it.

Use these two that I mentioned, it will be very easy, you will see.

LukasCCB avatar Mar 28 '24 15:03 LukasCCB

Hey guys I am also in need for that. If someone got a fix and could share..

Well.. Since i didnt find nothing good. I did my own.

Available at: https://epicuo.com/launcher/

brunobertapeli avatar Aug 27 '24 01:08 brunobertapeli