# Tab out crash. Assistance needed

**URL:** <https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056>\
**Category:** The Garage\
**Created:** [May 13, 2019, 7:46pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056 "2019-05-13T19:46:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hof1993](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/hof1993/32/6251_2.png) [@Hof1993](https://discourse.cataclysmdda.org/u/Hof1993)\
**Post date:** [May 13, 2019, 7:46pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/1 "2019-05-13T19:46:46Z")

</div>

my previous computer anytime I hit the Windows key I could Tab out of game to do other things. Now whenever I tab out the game automatically crashes. Is there another key combination I can use to Tab out a game without it crashing?

---

<div class="post-metadata">

**Author:** ![crazykiddeath](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/crazykiddeath/32/5709_2.png) [@crazykiddeath](https://discourse.cataclysmdda.org/u/crazykiddeath)\
**Post date:** [May 13, 2019, 8:32pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/2 "2019-05-13T20:32:56Z")

</div>

Does alt + tab work?

---

<div class="post-metadata">

**Author:** ![Hof1993](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/hof1993/32/6251_2.png) [@Hof1993](https://discourse.cataclysmdda.org/u/Hof1993)\
**Post date:** [May 13, 2019, 8:57pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/3 "2019-05-13T20:57:59Z")

</div>

Not at the current time

---

<div class="post-metadata">

**Author:** ![neitsa](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/neitsa/32/4943_2.png) [@neitsa](https://discourse.cataclysmdda.org/u/neitsa)\
**Post date:** [May 13, 2019, 9:38pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/4 "2019-05-13T21:38:25Z")

</div>

What’s your current setting? borderless window or full screen? Tabing out from full screen doesn’t work on Cdda with Directx.

---

<div class="post-metadata">

**Author:** ![Hof1993](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/hof1993/32/6251_2.png) [@Hof1993](https://discourse.cataclysmdda.org/u/Hof1993)\
**Post date:** [May 13, 2019, 9:50pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/5 "2019-05-13T21:50:54Z")

</div>

I’ll check as soon as I get home.

---

<div class="post-metadata">

**Author:** ![Hof1993](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/hof1993/32/6251_2.png) [@Hof1993](https://discourse.cataclysmdda.org/u/Hof1993)\
**Post date:** [May 14, 2019, 12:26am UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/6 "2019-05-14T00:26:13Z")

</div>

That fixed it. Thank you Nietsa 😃 😃

---

<div class="post-metadata">

**Author:** ![neitsa](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/neitsa/32/4943_2.png) [@neitsa](https://discourse.cataclysmdda.org/u/neitsa)\
**Post date:** [May 14, 2019, 8:47am UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/7 "2019-05-14T08:47:02Z")

</div>

Glad I could help!  
  
For those wondering what they should do if they encounter this problem, if you are on Windows, using the tiles version of the game **and** the DirectX renderer you should use a borderless windows with a width and height that match your screen resolution (sometime you won’t be able able to exactly match your screen resolution, but an approximation will do). You can then alt-tab (or use the Windows home key) without any problems.

This is a [known issue in the game](https://github.com/CleverRaven/Cataclysm-DDA/issues/24528). I debugged it up to the directx layer and there’s definitely something wrong because the renderer is reset when the windows is minimized during the alt-tab operation, but I couldn’t understand why. I hope to be able to provide a patch for this bug in the near future.

# How-to

- Go to `Settings > Options > Graphics` and set the `Fullscreen` option to `windowed borderless`

 ![image](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/9/95993da5f9ca28a13bf19d752b6f188436e0bfd7.png)

- Set `Terminal Width` and `Terminal Height` to match your screen resolution:

(Note: look at the comment below the `Options` at the top of the window, it will tell you how much pixels your window will be)

![image](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/2X/6/67cb32a5206e2a2e9cd13041a0d17730ab593655.png)

---

<div class="post-metadata">

**Author:** ![TheZoneWizard](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/thezonewizard/32/1397_2.png) [@TheZoneWizard](https://discourse.cataclysmdda.org/u/TheZoneWizard)\
**Post date:** [May 22, 2019, 11:55pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/8 "2019-05-22T23:55:19Z")

</div>

/.

Is there a translation error happening between the game and the renderer of directx

---

<div class="post-metadata">

**Author:** ![neitsa](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/neitsa/32/4943_2.png) [@neitsa](https://discourse.cataclysmdda.org/u/neitsa)\
**Post date:** [May 23, 2019, 12:05am UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/9 "2019-05-23T00:05:46Z")

</div>

Technically the problem is a bit hard to understand. I posted a [detailed technical analysis](https://github.com/CleverRaven/Cataclysm-DDA/issues/24528#issuecomment-495002021) of the problem.  
Basically, the DirectX renderer is invalidated when the window is transitioning from fullscreen to minimized. This seems to be a normal behavior to some extent (and as far I can understand it) but I don’t really know if SDL should reinstate a new renderer once it has been invalidated or if it’s the job of the game. I couldn’t find any details about this in the SDL documentation.

So there’s really something fishy here, but it’s not clear what the game should do at that point (when the renderer has been invalidated). Moreover the game don’t receive any feedback from SDL and I believe SDL is completely oblivious of the fact the renderer has been invalidated since it continue to call some APIs on the renderer…

---

<div class="post-metadata">

**Author:** ![TheZoneWizard](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/thezonewizard/32/1397_2.png) [@TheZoneWizard](https://discourse.cataclysmdda.org/u/TheZoneWizard)\
**Post date:** [May 23, 2019, 12:15am UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/10 "2019-05-23T00:15:17Z")

</div>

How about a work around the invalidated bit altogether by telling the game to match the screen as a default so it won’t crash. While allowing the user to adjust the screen scale as an option?

---

<div class="post-metadata">

**Author:** ![neitsa](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/neitsa/32/4943_2.png) [@neitsa](https://discourse.cataclysmdda.org/u/neitsa)\
**Post date:** [May 23, 2019, 12:53pm UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/11 "2019-05-23T12:53:09Z")

</div>

Yes it would be a good option; There are some [discussions in this issue](https://github.com/CleverRaven/Cataclysm-DDA/issues/30291) about the default screen size. One of those options could be “Windowed Bordeless with size adjusted to max screen size”.

---

<div class="post-metadata">

**Author:** ![TheZoneWizard](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/thezonewizard/32/1397_2.png) [@TheZoneWizard](https://discourse.cataclysmdda.org/u/TheZoneWizard)\
**Post date:** [May 24, 2019, 4:38am UTC](https://discourse.cataclysmdda.org/t/tab-out-crash-assistance-needed/20056/12 "2019-05-24T04:38:24Z")

</div>

If possible keep the option of full screen though. In case some people don’t need to tab out 😉
