View Issue Details

IDProjectCategoryLast Update
0012534Bionic DuesBug - OtherSep 23, 2013 9:02 am
Reportermadcow Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version0.913 
Fixed in Version0.919 
Summary0012534: MAC: Game lags after awhile of play
DescriptionI suspect this is more related to running on mac than a save game. But after awhile in a mission
(somewhere around halfway through?) it begins to lag between turns. Once it affects me, moving my exo is very jerky even if there are no enemies around, shooting at an enemy results in you seeing one or two frames of the shot and a few frames of the explosion rather than a smooth animation.

I've attached a save anyways and was able to reproduce it after maybe 300-400 turns of backtracking to the lower left corner of the map. I fought some bots, swapped out current exos (between assault and science vessel), and hacked a terminal. I can't pinpoint one specific item as the cause, it just seems to be related to playing.

The lag persists between missions, and quitting the game completely to reload gets rid of the lag for at least a little while. I have seen this happen after starting two campaigns now. Both were on my mac, both were using Axis as the pilot, and both were on version 0.913. I have not noticed this in previous versions (though this is my first time using Axis as a pilot if that matters).
TagsNo tags attached.
Internal WeightFix ASAP

Activities

madcow

Sep 18, 2013 1:01 am

reporter  

913 lag save.save (105,432 bytes)

Chris_McElligottPark

Sep 18, 2013 1:12 pm

administrator   ~0033851

Can you let me know if you see this on .914 still? I am wondering if it had to do with the number of enemies alerted at once in a mission. Enemies being near you only matters somewhat; a lot of it is how many enemies there are after you in general.

If you exit out of the game when it is really laggy and then come back, I take it this problem is not there. And... yeah, since it's being laggy during shot playback, that would probably mean that it's not something related to enemy pathfinding or whatever.

I can't think what kind of memory leak this could possibly be, because if it was a memory leak you should be crashing, not getting slowdown. That said, if you have it happening again can you hit F3 and then take a screenshot of the debug info there?

As well as potentially looking at the second line and seeing where the Managed Memory count tops out. Is it in the 30-something MB range, or more in the hundreds? Etc.

Chris_McElligottPark

Sep 18, 2013 4:35 pm

administrator   ~0033859

Okay, now .915 is out with a new version of unity. Hopefully this no longer happens there; possibly this was related to the same thing that would cause slowdown after lava flats in AVWW1 for people on OSX, and hopefully whatever the under-the-hood thing was is fixed in unity 4.2.1 (we had been on 3.3).

Chris_McElligottPark

Sep 18, 2013 4:57 pm

administrator   ~0033860

Well, good news and bad news. Good news is that I can duplicate this even on the new version of unity. Bad news is this definitely seems to be OSX-specific and I have no idea why it's happening. I am downloading the latest editor for unity on OSX to see if I can do any profiling.

A few thoughts:

1. Turning off vsync does seem to help some, but not a ton.

2. I'm not sure if Steam is starting up downloading stuff in the background, it's hard to say.

3. Going back to the main menu, the FPS goes back up well. Going back into even a new game and it goes back down again. It also stays down when on the city map. This argues strongly against something hanging around in our code, but I guess you never know.

4. The managed memory was nice and super low, not having increased at all particularly. 30mb range for me. So it's definitely not a ram thing unless it's unmanaged memory.

madcow

Sep 18, 2013 8:47 pm

reporter   ~0033862

Yeah I was able to reproduce it on 915, though from an old save rather than starting a new game (which I'll test later). I seemed to notice the lag when walking around -after- clearing the level, so I would guess its not related to bot pathing (unless there was one I didn't notice that was activated)?

Additionally in earlier versions (I can't remember the exact version number, but it was around 910 or earlier) I didn't have any issues with lag and went through several missions at a time without any issues.

Is there more I can do to help with testing beyond playing around with settings to see if that helps things?

Chris_McElligottPark

Sep 19, 2013 8:20 am

administrator   ~0033868

I'm not really sure if there's any more that you can do at this point. It's frustrating that this suddenly showed up out of nowhere, just on one platform. I'm going to be trying to profile this in the unity editor on my mac today, so I'll keep you posted if I find anything (or don't). I hope I'm wrong, but I have a feeling it's going to be a long day.

Chris_McElligottPark

Sep 20, 2013 1:02 pm

administrator   ~0033919

Potentially good news!

I had a savegame that I could routinely make have this issue on my Mac -- it would put me down to 2-4fps for no apparent reason after just a few short steps of play. Additionally, it was strangely laggy in general.

As of .918, I can no longer duplicate this with my save, and in general my OSX framerate is a good 20fps higher than it had been in general.

Fingers crossed that this also solves the issue for you!

madcow

Sep 21, 2013 12:42 pm

reporter   ~0033963

Last edited: Sep 22, 2013 8:20 pm

I do still notice some slowdown in 0.919, there is some framerate drop (done two missions, the first was fine, the second was an explosion mission and noticed the drop in there) but its definitely improved.

I turned vsync off now and will keep testing the frame rate drops today/tomorrow and will post if I see some major issues again.

Yeah it is definitely still present and its still fairly bad (but I do think not quite -as- bad). What is strange is that the in-game FPS counter dropped to about 20-30 FPS, but it felt like it was far worse than that.

Edit: Second edit. I have played something like 10-15 more missions since my last edit and it hasn't happened once. I'll keep at it and see if it happens again or if there seem to be specific missions it happens in now.

Chris_McElligottPark

Sep 23, 2013 9:02 am

administrator   ~0033980

Awesome! Marking as fixed, then. :)

There's not really anything I can do if it's just intermittent and on OSX only, I suspect -- especially if it's that rare. It sounds like it is materially fixed unless you come up with a serious repro case, anyhow.

Issue History

Date Modified Username Field Change
Sep 18, 2013 1:01 am madcow New Issue
Sep 18, 2013 1:01 am madcow File Added: 913 lag save.save
Sep 18, 2013 1:09 pm Chris_McElligottPark Internal Weight => Fix ASAP
Sep 18, 2013 1:12 pm Chris_McElligottPark Note Added: 0033851
Sep 18, 2013 1:12 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Sep 18, 2013 1:12 pm Chris_McElligottPark Status new => feedback
Sep 18, 2013 4:35 pm Chris_McElligottPark Note Added: 0033859
Sep 18, 2013 4:57 pm Chris_McElligottPark Note Added: 0033860
Sep 18, 2013 8:47 pm madcow Note Added: 0033862
Sep 18, 2013 8:47 pm madcow Status feedback => assigned
Sep 19, 2013 8:20 am Chris_McElligottPark Note Added: 0033868
Sep 20, 2013 1:02 pm Chris_McElligottPark Note Added: 0033919
Sep 20, 2013 1:02 pm Chris_McElligottPark Status assigned => feedback
Sep 21, 2013 12:42 pm madcow Note Added: 0033963
Sep 21, 2013 12:42 pm madcow Status feedback => assigned
Sep 21, 2013 12:57 pm madcow Note Edited: 0033963
Sep 22, 2013 8:20 pm madcow Note Edited: 0033963
Sep 23, 2013 9:02 am Chris_McElligottPark Note Added: 0033980
Sep 23, 2013 9:02 am Chris_McElligottPark Status assigned => resolved
Sep 23, 2013 9:02 am Chris_McElligottPark Fixed in Version => 0.919
Sep 23, 2013 9:02 am Chris_McElligottPark Resolution open => fixed