2-3 frames freeze every 60 frames (empty project)

I know these kind of topics are always super vague, but I couldn’t find anything useful on this.

Exactly every second my game stops for 2-3 frames (I noticed it was in sync with my ticking clock :p). I tried to capture footage but it’s impossible to pick up.
Seems to be a timestep issue, because I’m just drawing a single sprite.(loading the texture a single time beforehand)

Note: It isn’t “lag” - the sprite don’t jump forward, it’s more like a “stall”. The entire game just stops executing for a few frames and then continues.

I did log the gameTime.ElapsedGameTime, but that seems to be consistent, every frame is 00:00:00.0166667

I get some DLL not found exceptions, but I’m guessing that’s just part of monogame trying to select the apprioriate dll’s for the current platform, because the game does run.

C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll’. Cannot find or open the PDB file.
‘Test.vshost.exe’ (CLR v4.0.30319: Test.vshost.exe): Loaded ‘C:\Data\projects\MonoGame\Test\Test\bin\DesktopGL\x86\Debug\OpenTK.dll’. Module was built without symbols.
Exception thrown: ‘System.DllNotFoundException’ in OpenTK.dll
Exception thrown: ‘System.DllNotFoundException’ in OpenTK.dll
‘Test.vshost.exe’ (CLR v4.0.30319: Test.vshost.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll’. Cannot find or open the PDB file.
Exception thrown: ‘System.IO.FileNotFoundException’ in mscorlib.dll
Exception thrown: ‘Microsoft.Xna.Framework.Content.ContentLoadException’ in MonoGame.Framework.dll

It happens in every single monogame application, debug/release.Windows project/GL project
I tried messing with the fixedtimestep variable, but no change.

I’m running a surface pro 3 with intel hd 4400 integrated chip. I’m guessing it’s unique to my setup, but it’s a real dealbreaker right now :frowning:

Anyone has any clue?

Profile your memory consumption/garbage colllection. Maybe you create a lot of unnecessary stuff that has to be cleared (although it doesn’t sound like your program is large)

I did and that’s not the problem. It really seems like a timestep issue since it happens every 60 frames.
All samples I compiled had the same problem. I couldn’t find any precompiled samples to test those.

If other samples are causing the same issue (especially release .exes) I guess its your laptop :frowning:

edit: tablet with HD graphics wouldn’t be expected to run too much anyway.

Yeah I’m guessing it’s related to my set up.
I’ve made plenty of games in other frameworks/engines that run silky smooth, so it should not be an excuse though.

The best way to confirm would be if someone could compile a simple project with a single sprite that can be moved with the arrow keys.
I’ll see if I can run my own sample on a different machine.

Edit: I just ran it on a different laptop which has a video card, runs fine there as expected.

A whole year later I found out this is caused by f.lux. Using safe mode solves the issue!


“Tell f.lux what kind of lighting you have, and where you live. Then forget about it. f.lux will do the rest, automatically.”
:smile:

THIS f.lux ?

Well I did forgot about it I guess, which is why it took me a year to figure out the culprit :stuck_out_tongue: