multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.37k stars 423 forks source link

MTA won't open after alt-tabbing #1103

Open ekvatorx33 opened 4 years ago

ekvatorx33 commented 4 years ago

Describe the bug
the title says it all, after alt-tabbing from desktop to mta a few times, MTA simply won't open anymore and I'm forced to close it with the task manager.

I've tried reinstalling MTA, move it to a different direction, changed the resolution from fullscreen to windowed (which made it flicker and lag really hard), nothing would work.

I can't find any reason for this to happen, as no updates on both my windows and MTA were made the day this problem appeared. windows 10 1903 version

Video
https://www.youtube.com/watch?v=GFDSh7Fq2cs

Version
1.5.7

Haxardous commented 4 years ago

this issue looks like it only happens when you're using Windows 10 version "1903" happens on 1903 and after

Einheit-101 commented 4 years ago

I can confirm, i play MTA in windowed borderless mode now.

ekvatorx33 commented 4 years ago

I can confirm, i play MTA in windowed borderless mode now.

borderless mod bad brightness off

forget commented 4 years ago

i just changed from standard to bordered keep res or smth and it fixed

jhxp commented 4 years ago

I have noticed this too. You do not have to connect to any server - just keeping the game in the Main Menu and alt-tabbing to Desktop a few times then waiting for a while is sufficient - sometimes it will break as described in the original issue. The game does not seem to be frozen in such a state though - at least it's not indicated as such in the Task Manager.

MTA:SA Version: v1.5.7-release-20288 OS: Windows 10 19H1 / 1903 / 18362.387

Dutchman101 commented 4 years ago

I cannot reproduce this on Windows 10 1903 (18362.387) with an R9 290 GPU.. just to indicate not everyone is affected

Haxardous commented 4 years ago

after crashing, it’ll show a direct3d error & just reset the video settings

Haxardous commented 4 years ago

still crashing after the latest windows update.

MTA Version: v1.5.7-release-20348 OS: 1909 / (Build 18363.476)

AleksCore commented 4 years ago

Same problem here :( I will try older MTA/Windows versions to find out UPD: tried older MTA version (1.4.1) - still happens. Then problem not with MTA :(

qaisjp commented 4 years ago

UPD: tried older MTA version (1.4.1) - still happens. Then problem not with MTA :(

Thank you very much @AleksCore, this is very useful information :)

Haxardous commented 4 years ago

update: it's more likely related to Nvidia's GPUs only, AMD's GPUs aren't affected. check this message out.

qaisjp commented 4 years ago

Yeah I can't reproduce this issue, and I use an AMD GPU.

jhxp commented 4 years ago

Makes sense - I've had this issue on an NVIDIA GPU (GTX950 with newest drivers at that time).

forget commented 4 years ago

Honestly, this occurs in different games no matter what, same happened to me in CSGO various times. I believe this is a bug from NVIDIA itself and its drivers and not anything to do with MTA but all we can do is raise awareness and report it to them.

Haxardous commented 4 years ago

I can confirm that this is fixed on the latest Nvidia's GPU driver version. GeForce Game Ready Driver: 441.66 (R-D: 12/10/2019) Windows Version: Windows 10, Version 1909 (OS Build 18363.535) MTA Version: Multi Theft Auto v1.5.7-release-20358.1

HotCandy69 commented 4 years ago

I'm still having this issue, already reported it on MTA's Discord as well.

Nvidia released an update today (441.87) and I can still reproduce it, I've forwarded a bug report to Nvidia so hopefully they'll look into it eventually.

Edit: Windows version is 1909, OS Build 18363.535, I can reproduce it pretty much every time by spamming the alt tab for approximately 6-7 times.

ds1-e commented 4 years ago

Problem still exists. Windows 10, ver. 1803 (build: 17134.766) GTX 1660, drivers up-to-date. Multi Theft Auto v1.5.7-release-20422. unknown

ce2kettu commented 4 years ago

Happens to me as well, and on top of that one thing not mentioned here is that the gta_sa.exe process is unkillable. 'Access denied' is thrown from both the task manager and an elevated PowerShell window when trying to kill the process. I guess this is due to the process being stuck in a blocking system call (waiting for the kernel). Switching MTA fullscreen mode to 'borderless window' fixes the issue.

Configuration info: Windows 10 Pro, ver. 1909 (build: 18363.720) AMD RX 5700 XT, drivers up-to-date Multi Theft Auto v1.5.7-release-20358.5.001

batty098651 commented 4 years ago

it is possible to fix it as client?

Lpsd commented 4 years ago

There is no known fix currently - this issue has been created to identify and (hopefully) assist with diagnosing the problem. It may help if you provide your PC specs and MTA version like others have done above.

batty098651 commented 4 years ago

GPU Nvidia GeForce GTX 1050Ti RAM 8GB CPU Intel i5 4300U OS Windows 10 Home 1903, 18362.720, 64-bit GPU drivers always up to date MTA 1.5.7 latest version downloaded 07/04/2020

Haxardous commented 4 years ago

if anyone still suffering from this issue I think I found a proper fix without switching to fullscreen borderless windowed mode instead of standard.

Temporary fix:

(for Nvidia users, I think it should work with AMD's control panel as well)

  1. right-click MTA:SA's executable.
  2. click on Properties.
  3. go to the Compatibility tab.
  4. under Settings tick "Disable fullscreen optimizations" (as shown in this picture: https://imgur.com/oh7csJZ).
  5. click Apply and OK.
  6. open Nvidia's control panel by right-clicking Nvidia's icon in your taskbar or press the Windows key to display the search bar and type "NVIDIA Control Panel" and press enter.
  7. under Display click Adjust desktop size and position.
  8. go to the Scaling tab.
  9. under Perform scaling on: select GPUas shown in this picture: https://imgur.com/vwycFN3).
  10. open MTA and switch the fullscreen mode to Standard.

Note for AMD GPUs users: you should find the GPU scaling option within your GPU control panel.

Haxardous commented 4 years ago

Update: after installing the latest Nvidia drivers it seems like ticking "Disable fullscreen optimizations" (4th step within the former temporary fix post) will turn MTA's brightness to dark, you can say it looks like windowed mode brightness. Unfortunately I didn't find any other fix yet, so those who are still suffering from this issue will be forced (stuck) to use older Nvidia drivers (451.48 and less).

note: MTA turns dark after alt-tapping once.

Haxardous commented 4 years ago

Update: after installing the latest Nvidia drivers it seems like ticking "Disable fullscreen optimizations" (4th step within the former temporary fix post) will turn MTA's brightness to dark, you can say it looks like windowed mode brightness. Unfortunately I didn't find any other fix yet, so those who are still suffering from this issue will be forced (stuck) to use older Nvidia drivers (451.48 and less).

note: MTA turns dark after alt-tapping once.

Update your Nvidia to the latest version and it should be fixed.

ekvatorx33 commented 3 years ago

Update: after installing the latest Nvidia drivers it seems like ticking "Disable fullscreen optimizations" (4th step within the former temporary fix post) will turn MTA's brightness to dark, you can say it looks like windowed mode brightness. Unfortunately I didn't find any other fix yet, so those who are still suffering from this issue will be forced (stuck) to use older Nvidia drivers (451.48 and less). note: MTA turns dark after alt-tapping once.

Update your Nvidia to the latest version and it should be fixed.

https://www.youtube.com/watch?v=Rghkerfo2hw borderless windows mode + "Disable fullscreen optimizations"
Nvidia: https://imgur.com/a/uCB5Eir

despite 1 year has passed, there is still same problem , is it really hard to fix that

MTA Version:1.5.7 r20659 GTA:Steam GTA SA

seifhassine commented 3 years ago

Any fix yet? The problem is still there.

botder commented 3 years ago

No fix and there is most likely nobody working on this right now.

Einheit-101 commented 3 years ago

I cant even run MTA in fullscreen anymore, my PC simply freezes on the GTA SA Logo.

T-MaxWiese-T commented 3 years ago

If you press Tab + Alt and switch back and forth a few times then you can also go back into MTA without closing the process. The bug is very annoying.

I also have an NVIDIA graphics card and the latest update installed, though the updates don't seem to matter. I also have Windows 10 20H2 installed. I am curious if it might change when Windows 10 21H1 comes soon.

ghost commented 3 years ago

Thougt this issue was only with Windows 10 build 1909

turret001 commented 3 years ago

10EUR* to whoever fixes this, it's still happening.

30 April 2021: "I can't go back into the game after alt-tabbing out of the game, can't even use my mouse. happens only on MTA" image

*Will be paid in Steam Gift cards(the OG currency) since I can't use PayPal. >.<

Pirulax commented 3 years ago

Is this an issue with the vanilla game? Could someone please test it?

ekvatorx33 commented 3 years ago

if anyone still suffering from this issue I think I found a proper fix without switching to fullscreen borderless windowed mode instead of standard.

Temporary fix:

(for Nvidia users, I think it should work with AMD's control panel as well)

  1. right-click MTA:SA's executable.
  2. click on Properties.
  3. go to the Compatibility tab.
  4. under Settings tick "Disable fullscreen optimizations" (as shown in this picture: https://imgur.com/oh7csJZ).
  5. click Apply and OK.
  6. open Nvidia's control panel by right-clicking Nvidia's icon in your taskbar or press the Windows key to display the search bar and type "NVIDIA Control Panel" and press enter.
  7. under Display click Adjust desktop size and position.
  8. go to the Scaling tab.
  9. under Perform scaling on: select GPUas shown in this picture: https://imgur.com/vwycFN3).
  10. open MTA and switch the fullscreen mode to Standard.

Note for AMD GPUs users: you should find the GPU scaling option within your GPU control panel.

alt tab problem not caused by graphics card related to windows version

Lpsd commented 3 years ago

@ekvatorx33 would you mind elaborating on that?

How do you know it's not related to graphics card / drivers / etc? What tests have you made to conclude this?

turret001 commented 3 years ago

from Discord #tr-sohbet

"I've downgraded to Windows ver 1607 enterprise and it no longer happens" "after Windows ver 1909 it begins to happen again"

ekvatorx33 commented 3 years ago

Discord'dan # tr-sohbet

"Windows ver 1607 Enterprise sürümüne geçtim ve artık olmuyor" "Windows ver 1909'dan sonra tekrar olmaya başlıyor"

+1

Lpsd commented 3 years ago

Do we know if the issue has remained ever since version 1909 (in subsequent updates up until now) - or has it been patched by a later version already?

Does the issue happen with singleplayer SA?

Can anyone confirm this? I've never had this issue (and can't reproduce) so I can't say.

So far it does seem to be NVIDIA GPU's only that are affected by this, however not all NVIDIA users are affected (like me)

Windows 10 Home ver 2004

Lpsd commented 3 years ago

One of the first comments also mentions 1903 as being the update which introduced this, not 1909.

This needs to be clarified by someone who's experiencing the issue. Does 1903 not have the issue anymore?

ce2kettu commented 3 years ago

Do we know if the issue has remained ever since version 1909 (in subsequent updates up until now) - or has it been patched by a later version already?

Does the issue happen with singleplayer SA?

Can anyone confirm this? I've never had this issue (and can't reproduce) so I can't say.

So far it does seem to be NVIDIA GPU's only that are affected by this, however not all NVIDIA users are affected (like me)

Windows 10 Home ver 2004

It happens on AMD graphics cards as well (or at least mine). See my earlier post for more information.

Lpsd commented 3 years ago

@ce2kettu Do you use two (or more) monitors which are of different resolutions?

ce2kettu commented 3 years ago

At the time, I was using three monitors each having a different refresh rate but the same resolution. I have not opened MTA since my original report, so driver/Windows updates may have resolved it already.

Lpsd commented 3 years ago

At the time, I was using three monitors each having a different refresh rate but the same resolution

I have exactly the same setup right now. 60/144/280hz all at 1920x1080.... so I guess it's not that, since I can't reproduce it.

Lpsd commented 3 years ago

@ce2kettu Would you mind trying to launch MTA and reproduce the issue again?

ce2kettu commented 3 years ago

@Lpsd Unfortunately I do not have access to the same graphics card at the moment.

Einheit-101 commented 3 years ago

I cant even run MTA with fullscreen enabled anymore, i keep seeing the GTA splash screen and nothing happens.

Haxardous commented 3 years ago

Do we know if the issue has remained ever since version 1909 (in subsequent updates up until now) - or has it been patched by a later version already?

  • This issue was firstly seen in 1903. Does the issue happen with singleplayer SA?
  • No, singleplayer works completely fine. Can anyone confirm this? I've never had this issue (and can't reproduce) so I can't say.
  • Whenever I toggle the "temporary fix" I mentioned before, I can reproduce it. @Lpsd
Haxardous commented 3 years ago

I think we need to go further in this by making a survey to collect more info about this issue.

Pirulax commented 3 years ago

Does the issue happen with singleplayer SA?

  • No, singleplayer works completely fine. Which, presumably, means it's an issue on our side. Now we just have to add some way to debug the issue.
botder commented 3 years ago

This bug is also present in the GTA:SA singleplayer, but seems to happen less often.

The freeze happens in the nvd3dum.dll (NVIDIA WDDM D3D Driver) library in a while (1) loop and it usually unfreezes/exits after some minutes.

Dutchman101 commented 3 years ago

This bug is also present in the GTA:SA singleplayer, but seems to happen less often.

The freeze happens in the nvd3dum.dll (NVIDIA WDDM D3D Driver) library in a while (1) loop and it usually unfreezes/exits after some minutes.

Since i don't expect Nvidia will listen to a bug report and have it fixed, can we fix it in MTA? I mean like find a way to detect when the issue happens, hook nvd3dum.dll using MTA client and then skip that while (1) loop.

Because it has a pretty significant impact on usability, a bunch of Nvidia users may even stop playing MTA because they can't do anything else in the background.