The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2013-07-28 10:15:56

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Alt-Tab Crash

Hello, I'm new to the game and have been having a lot of fun but I have one bug that has become an issue.

Whenever I press alt-tab to go to a different window than the game the game crashes. Also, any other activity which shifts the screen to the desktop does the same thing. This was not too much of an issue until I was doing quite well (compared to previous games) and suddenly my laptop gave me a warning that my batteries were low crashing the game whilst I was in the middle of a robbery. This of course led the server to kill me off for exiting the game whilst robbing.

I am running Windows 8 and when it crashes I get the following report from windows:

Problem Event Name:    APPCRASH
  Application Name:    CastleDoctrine.exe
  Application Version:    0.0.0.0
  Application Timestamp:    51eebdce
  Fault Module Name:    ig7icd32.dll
  Fault Module Version:    9.17.10.2817
  Fault Module Timestamp:    5009cc64
  Exception Code:    c0000005
  Exception Offset:    000189e8
  OS Version:    6.2.9200.2.0.0.768.101
  Locale ID:    3081
  Additional Information 1:    5861
  Additional Information 2:    5861822e1919d7c014bbb064c64908b2
  Additional Information 3:    f3d5
  Additional Information 4:    f3d5be0cad2787556264647dc02181c3

Has anyone else come upon a similar problem?

Offline

#2 2013-07-28 10:42:03

Cent
Member
Registered: 2013-07-25
Posts: 41

Re: Alt-Tab Crash

Actually, I find that alt tabbing can sometimes lock you out of the game, because it puts you into the escape pause menu, but the alt-modifier is still being held (and cannot be cancelled), so pressing escape again does nothing, and you're forced to quit. If you're in robbery mode, that's GG.

Offline

#3 2013-07-28 10:55:58

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Alt-Tab Crash

I haven't had this myself. You can change "fullscreen.ini" to 0 in the settings folder and then set the width and height to your monitor resolution if you want a temporary workaround until Jason solves this.

Offline

#4 2013-07-28 13:02:23

Ludicrosity
Member
From: US
Registered: 2013-06-22
Posts: 144

Re: Alt-Tab Crash

Yeah, I've had issues with alt tabbing a couple times as well. It caused a crash once for me too. Usually it work all right though.

Offline

#5 2013-07-28 15:39:57

bey bey
Member
Registered: 2013-04-20
Posts: 386

Re: Alt-Tab Crash

I had the same issue and lost a very expensive house to it. I found that running window mode OR using my secondary graphics card for the game fixed it. Seems like the default windows 8 graphics driver interferes with the game in fullscreen.


In fact you can be batman.
(if he robbed houses and murdered families.)
- Dalleck

Offline

#6 2013-07-29 23:38:10

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Alt-Tab Crash

Thanks guys, I'm just running it in windowed mode for now and haven't had anymore issues. Deaths are purely my own fault now tongue.

Offline

#7 2013-08-11 15:04:54

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,231

Re: Alt-Tab Crash

Yeah, sorry about this!

I think it's some kind of Windows 8 issue, though I haven't figured out what is causing it, exactly.

Unfortunately, I don't have access to Windows8.... I've thought about setting someone who is experiencing this problem up with a debugger to catch the problem in the act.

If you're up for trying this, please email me:  jasonrohrer@fastmail.fm

Offline

#8 2013-08-11 22:23:00

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Alt-Tab Crash

I'd be up for this, I'll send you an email.

Offline

#9 2013-08-12 00:11:02

Noshire
Member
Registered: 2013-07-23
Posts: 13

Re: Alt-Tab Crash

It doesn't crash for me when alt-tabbing, but if I do, my windows explorer tends to crash - I have to completely kill and restart it to get my taskbar working again after playing Castle Doctrine. I'm on Win7 64bit.

Offline

#10 2013-08-12 00:30:05

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Alt-Tab Crash

Cent: Since playing the game in windows mode I've noticed that alt-tabbing now causes the alt key to be held, this can be an issues when creating a map as holding 'alt' activates eye-dropper mode, the same as ctrl. I've found this easy to fix, though, as just pressing the 'alt' key once resets it.

Offline

#11 2013-08-12 01:33:06

Cent
Member
Registered: 2013-07-25
Posts: 41

Re: Alt-Tab Crash

Yea sometimes pressing Alt again clears it. In windowed mode, it seems to clear it every time. If you were fullscreen though, sometimes it won't and it'll be permanently stuck. I've since stopped playing in fullscreen.

Offline

#12 2013-08-12 21:36:36

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,231

Re: Alt-Tab Crash

Yeah, the stuck alt key is a strange one.... it's like the key-up event never gets sent.  But if that's the case (a simple problem), then hitting ALT again later should clear it up (which would send down and then up events).  There may be a bug in SDL here...

Offline

#13 2013-08-13 02:18:02

dalleck
Member
Registered: 2013-04-13
Posts: 250

Re: Alt-Tab Crash

Isn't there a 'is down' function you can call instead?


The rich aren't safe. Nobody is safe. -jere                   ...but the smell wafts out from the pit, obviously. - Jason Rohrer

And the more dickish they are, the more I feel like beating a house to destruction after finally figuring it out. -bey bey

Offline

#14 2013-08-13 06:47:03

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,231

Re: Alt-Tab Crash

Yeah, actually, for the eyedropper, the game is already doing it that way.  I call  SDL_GetModState()  to check if the ALT key is held down.

Thus, I'm pretty sure is an SDL bug:

http://forums.libsdl.org/viewtopic.php? … a70cbba1c1


Also, Josh just did the debugging work on his end, and the Alt-Tab crash was found to be in part of Windows.  Also, this is a known issue for other games:

http://forums.steampowered.com/forums/s … ?t=1517550


Which means, sadly, that I don't really have power to fix these things...

Offline

#15 2013-08-13 09:40:38

largestherb
Member
From: england
Registered: 2013-05-27
Posts: 381

Re: Alt-Tab Crash

defaulting the settings to windowed mode might help!
maybe it is just me, but i really don't know anyone who plays any game in true fullscreen.. unless they are on a laptop with a tiny resolution and sad 3 year old integrated graphics..

but anyway, i think the castle doctrine looks quite good in a 1024x768 window!

Offline

#16 2013-08-13 09:56:30

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,231

Re: Alt-Tab Crash

Thoughts on this?  Should the game ship in Windowed mode by default?  How many people play in fullscreen all the time?

The problem, of course, is what window size?  Maybe it should auto-pick a size based on the current screen size.... one size less than the current screen size.  So, it would be 640x480 on an 800x600 screen, and 800x600 on a 1024x768 screen, and so on.

Offline

#17 2013-08-13 10:59:37

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Alt-Tab Crash

I've always changed it to window mode in the settings; being able to click out of it is a lot easier and faster than alt-tabbing out for me.

Offline

#18 2013-08-13 13:04:15

ukuko
Member
Registered: 2013-04-06
Posts: 333

Re: Alt-Tab Crash

I play at 640x480 windowed on a variety of screen sizes — 13" to 27".

Offline

#19 2013-08-14 02:01:28

Cent
Member
Registered: 2013-07-25
Posts: 41

Re: Alt-Tab Crash

It's a slower paced game, it should default to windowed, since you're not too worried about accidentally clicking outside of the window, but leave an obvious fullscreen option in the options...
Also, since the viewing window is squarish, so it makes sense to just play it windowed on widescreen displays.

Offline

#20 2013-08-14 09:21:59

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,231

Re: Alt-Tab Crash

Yep, makes sense!  Will do it.

Offline

Board footer

Powered by FluxBB 1.5.8