TheAssemblyArmada / Thyme

An open source re-implementation of Generals : Zero Hour written in C++.
GNU General Public License v2.0
578 stars 57 forks source link

[Original Bug] Serious error/crash after alt-tabbing twice while using unsupported resolution. #15

Open mrtnptrs opened 6 years ago

mrtnptrs commented 6 years ago

This also serves as a test of the new potential issue template.

Operating System: Windows 10

Commit/build: 08fd167

Original game source: Origin/TUC

Issue explanation

After Alt-tabbing in and out twice with an unusual resolution (probably with an unusual screen ratio), the game throws a serious error and you and crashes.

This issue also happens with the original game, even in combination with Gentool. This only occurs, of course, while in fullscreen mode. Windowed mode is not affected.

Steps to reproduce the problem

  1. Set a resolution like 2560x1440 (my monitors native resolution) in the options.ini file.
  2. Start Thyme.
  3. Alt-tab out of the game.
  4. Alt-tab back into the game.
  5. Alt-tab out of the game again.
  6. The game freezes and throws a serious error at you.

But it seems that 1920x1440 works just fine for me.

Log files

Both crash-logs were made during reproducing this issue: ReleaseCrashInfo.txt ReleaseCrashInfoPrev.txt

ThymeDebugLogFile.txt

mrtnptrs commented 6 years ago

Ok, I found out that Generals suggests all kind of variants of resolution of 4:3 aspect ratio. And none of these will ever let Generals crash while alt-tabbing out of the game. So, I thought that all other aspect ratios than 4:3 let Generals crash while doing the above reproducing steps. But this wasn't the case, as 1280x800 (16:10) and 1920x1200 (16:10) just work. Maybe some kind of overflow with a high enough pixelcount?

ElG7dod commented 4 years ago

i've got the solution, download this: http://www.mediafire.com/file/jnsslpz2wl7yjf8/RemoveBorders.rar/file open the program,in the down left corner you find an arrow in the taskbar pointing upwards,right?,click on it you will find the icon of this program double cllick on it,a window appears,start the game,return to the program window,click add,select the game process and press add,and that's it,the game wont crash as long as it is in borderless window mode πŸ‘πŸ˜€

mrtnptrs commented 4 years ago

i've got the solution, download this: http://www.mediafire.com/file/jnsslpz2wl7yjf8/RemoveBorders.rar/file open the program,in the down left corner you find an arrow in the taskbar pointing upwards,right?,click on it you will find the icon of this program double cllick on it,a window appears,start the game,return to the program window,click add,select the game process and press add,and that's it,the game wont crash as long as it is in borderless window mode πŸ‘πŸ˜€

I've done a lot more searching on this topic since I made this issue haha. Yeah, your workaround work and Gentool can do the same thing btw. But this isn't of course a real solution, it's a workaround. Also using d3d8to9 "solves" this, but that can also be seen as a workaround as it just converts old API-calls to newer ones. A real solution would be to find the underlying bug that causes this issue and fix it so real fullscreen-mode works without crashes :) But still nice that you wanted to think with me on this :)

ElG7dod commented 4 years ago

i've got the solution, download this: http://www.mediafire.com/file/jnsslpz2wl7yjf8/RemoveBorders.rar/file open the program,in the down left corner you find an arrow in the taskbar pointing upwards,right?,click on it you will find the icon of this program double cllick on it,a window appears,start the game,return to the program window,click add,select the game process and press add,and that's it,the game wont crash as long as it is in borderless window mode πŸ‘πŸ˜€

I've done a lot more searching on this topic since I made this issue haha. Yeah, your workaround work and Gentool can do the same thing btw. But this isn't of course a real solution, it's a workaround. Also using d3d8to9 "solves" this, but that can also be seen as a workaround as it just converts old API-calls to newer ones. A real solution would be to find the underlying bug that causes this issue and fix it so real fullscreen-mode works without crashes :) But still nice that you wanted to think with me on this :)

And There Is Another Solution,ThanksπŸ˜€πŸ™

OmniBlade commented 4 years ago

Thyme also already implements the possibility of starting in a border less window mode so none of these are needed for that workaround with Thyme.

ghost commented 4 years ago

Should verify a random exe before blindly using it.

ZIP: https://www.virustotal.com/gui/file/332e0991cd5f0157a91cf38e67e43708c7b425b76e4037aa4617acb5224760f4/detection

EXE: https://www.virustotal.com/gui/file/d6a8f438e507140ce75be6a5000c81ecd83179f03426e5ec43adfcdfca3e9f98/detection

Seems like it's been around for a long time.

ElG7dod commented 4 years ago

borderless-gaming is alot better than removeborders, link:https://github.com/Codeusa/Borderless-Gaming/releases/download/9.5.6/BorderlessGaming9.5.6_admin_setup.exe uses of borderless gaming on generals zero hour: d3d8to9.dll takes place of d3d8 of enb mod, so you'll have to sacrifice the enb mod to not crash the game, borderless gaming takes place of d3d8to9 so you can alt tab safely and use enb mod