FLWL / CPPGameLauncher

A game launcher/updater/patcher written in C++ for the Windows platform.
MIT License
99 stars 45 forks source link

"Erro! Failed to create window" #2

Open LeonanCarvalho opened 4 years ago

LeonanCarvalho commented 4 years ago

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).

MikhailTsvetkov commented 4 years ago

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 commented 4 years ago

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

thalysmarciobn commented 4 years ago

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

DemOnJR commented 4 years ago

same problem

mvccogo commented 4 years ago

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)

DemOnJR commented 4 years ago

That not solve the problem.

mvccogo commented 4 years ago

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);

DemOnJR commented 4 years ago

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

thalysmarciobn commented 4 years ago

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.

DemOnJR commented 4 years ago

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

thalysmarciobn commented 4 years ago

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"

LukasCCB commented 3 years ago

How I can fix it ? image

motz61 commented 3 years ago

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

LukasCCB commented 3 years ago

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

image

motz61 commented 3 years ago

@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

LukasCCB commented 3 years ago

@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

motz61 commented 3 years ago

@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 !

manoharyes commented 1 year ago

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?

brunobertapeli commented 5 months ago

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

LukasCCB commented 5 months ago

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.

brunobertapeli commented 3 weeks ago

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/