Memory Leak --> Crash

Bugs that are fixed (or that we think are fixed) will be moved into this sub-forum for organizational purposes. If you find that one of these bugs is still active, please start a new thread in the main bug report forum and link to the older thread in this sub-forum. Thanks!

Memory Leak --> Crash

Postby LoveDQ » Mon Sep 03, 2012 4:43 pm

Hey I love this game, excellent job -- going to rebuy it on Steam once it comes out just to support you.

I have a reproducible crash that (I think) works on all levels, at least the numerous stages I've played on NG+ recently.

Save file uploaded, go ahead and test on Following Zelemir (the next level in this save that isn't 3 gold stars)

1) Start stage
2) Immediately pause and place units
3) Unpause... play for some time (1-5 minutes)
4) Go to options --> restart level
5) Repeat (pause, place units, play 1-2 minutes, restart level)

After 3-4 cycles the game freezes, exits fullscreen mode (goes to window mode) -- still frozen, and then will not unlock. Defender's Quest must be force-closed through the Windows OS at this time.

I'm playing on Win 7 SP1 with latest updates/fixes, Crossfire Radeon 4870, AMD Phenom II X4 965, 4GB ram.

The game is set to fullscreen, 1900x1200. I'm not playing with "scaled" enabled for the resolution.

Please let me know if you need more information... just trying to help the game get ready for wider release!

Great work, love the game!
Attachments
defenders_quest_save_slot_3.zip
(7.24 KiB) Downloaded 14 times
LoveDQ
 
Posts: 5
Joined: Mon Sep 03, 2012 4:30 pm

Re: Memory Leak --> Crash

Postby coyot » Mon Sep 03, 2012 5:11 pm

Crucial bit of info that's missing - the game version :).

This sounds very much like a bug that was fixed in 0.9.58.

Also, how many units you're placing? And will it crash even if you do it without playing, that is summon/boost/recall defenders X times?
coyot
 
Posts: 463
Joined: Mon Feb 20, 2012 4:48 am

Re: Memory Leak --> Crash

Postby larsiusprime » Thu Sep 06, 2012 12:32 pm

I believe this bug has already been fixed, though for good measure I tried the above steps and was unable to reproduce the symptoms.

There is a possible edge case I originally overlooked, however - since you were constantly restarting the battle without exiting to the overworld, the engine technically will never clear the graphics cache entirely, which could cause some problems. Even if battles have been fixed so that the worst memory leak is over, restarting battles over and over (in theory) could build up a big stack of memory that isn't freed until you hit the overworld. (The overworld constructor has a call to clearGraphicsCache() )

I stuck a clearGraphicsCache() call at the end of the State_Play() destructor (the class that corresponds to the battle engine itself), so whenever you restart a battle now, it will clear the graphics cache. If I clear the graphics cache at the wrong moment, this can cause weird bugs, so although I think I did it right this could potentially cause strange behavior or crashes if something is still being drawn to the screen when its underlying graphic data is cleared out.

So, hopefully this should fix it. Changes will be in 1.0.2
larsiusprime
 
Posts: 807
Joined: Mon Feb 13, 2012 10:13 am

Re: Memory Leak --> Crash

Postby LoveDQ » Thu Sep 06, 2012 9:58 pm

Thanks! Hoping that version 1.0.2 fixes the problem.

This was from the latest version, 1.0.1

Maybe it's some artifact of my system... I'm still able to re-create this bug continuously. I think it might be from something new, I didn't have any problems before the latest couple of updates.
LoveDQ
 
Posts: 5
Joined: Mon Sep 03, 2012 4:30 pm

Re: Memory Leak --> Crash

Postby larsiusprime » Fri Sep 07, 2012 7:49 am

I'm getting reports from others about a memory leak and crashing in 1.0.2, but it might have a different cause. The super-duper sheep level is apparently causing problems, and the current theory is the "delayed damage queue" might be the chief culprit.
larsiusprime
 
Posts: 807
Joined: Mon Feb 13, 2012 10:13 am

Re: Memory Leak --> Crash

Postby coyot » Fri Sep 07, 2012 9:23 am

that might explain why it hasn't happenned to me so far - I've recently spent several hours playing with one-char party, so I never created big damage queues on any creep, which 6 weakish archers could easily manage....
coyot
 
Posts: 463
Joined: Mon Feb 20, 2012 4:48 am

Re: Memory Leak --> Crash

Postby larsiusprime » Thu Sep 13, 2012 11:46 am

Closing this for now, assuming this was fixed with the damage queue. If it happens again I'm sure someone will post about it :)
larsiusprime
 
Posts: 807
Joined: Mon Feb 13, 2012 10:13 am

Re: Memory Leak --> Crash

Postby Miseryguten » Thu Sep 13, 2012 3:35 pm

I'm not 100% sure I would call this fixed.
Image

This was on the Endless Challenge 2, although I had played a few other maps before that. Crashed at level 57.

Edit: I can't even complete Endless Challenge 2 at all. I tapped out at level 98, pressed 'Cash Out' and the game wouldn't end the level. Again, memory usage had gone from ~270MB at launch to 1.4GB in the space of that one map...
This is on version 1.0.22.
Miseryguten
 
Posts: 2
Joined: Sun Mar 04, 2012 8:07 am

Re: Memory Leak --> Crash

Postby larsiusprime » Thu Sep 13, 2012 4:00 pm

Okey dokey then!
larsiusprime
 
Posts: 807
Joined: Mon Feb 13, 2012 10:13 am

Re: Memory Leak --> Crash

Postby cocoajam » Fri Sep 14, 2012 5:27 pm

I run windows 7 and i use version 1.0.22.
both times this has happened with the sheep at the gap and the screen shuts me out of fullscreen mode and locks up. I even let it sit to see if it just bogged down, but hours later it was still unresponsive.
DQ error.png
This has happened twice at the same spot, different character placement though
DQ error.png (374.04 KiB) Viewed 468 times
cocoajam
 
Posts: 1
Joined: Fri Sep 14, 2012 5:19 pm

Re: Memory Leak --> Crash

Postby larsiusprime » Sat Sep 15, 2012 9:56 am

Thanks for this info. I'll make this one of the bugs I try to get in the next patch. We might not be able to release the next patch on Monday because I've been touching to many things in the code to have it be stable and ready, so we'll shoot for later next week. Hopefully I can nail this one and get things stabilized before then.
larsiusprime
 
Posts: 807
Joined: Mon Feb 13, 2012 10:13 am

Re: Memory Leak --> Crash

Postby LoveDQ » Sun Sep 16, 2012 10:49 pm

I think this is an unrelated memory leak, the 1.0.22 patch fixed the one I referenced as far as I can tell. Thanks for all the hard work (and good luck with the new issue posted here!).
LoveDQ
 
Posts: 5
Joined: Mon Sep 03, 2012 4:30 pm

Re: Memory Leak --> Crash

Postby larsiusprime » Thu Sep 20, 2012 10:29 am

Fix for this bug is in version 1.0.27, and is hitting the test server today.
larsiusprime
 
Posts: 807
Joined: Mon Feb 13, 2012 10:13 am


Return to Fixed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests