Jump to content
  • Advertisement
Sign in to follow this  
Beren77

Unity SDL bug? My bug? Hardware bug?

This topic is 3733 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have already posted here and have received very useful answers. To briefly summarize: My game runs slower over time, and I have no idea, why. I checked for memory holes but didn't find any. I tried to simplify the problem, but didn't come to a result: _Sometimes_ the bug occured, sometimes it didn't. The only reliable observation I made is that the bug always occurs when I use the complete program. Or so I thought until today: I let my program run on my co-workers laptop (which happens to be the exact same laptop than I am working on). -- And the problem did not occur. The program run smoothly for hours! I started the program on my laptop, just to be sure, and there you go: 5 minutes and it got completely unplayable. It is a stupid little ludo application and I am thinking of putting the code out for you guys to analyze, but it's not too small anymore and you probably have better things to do :). But maybe you have another (theoretical) idea, what could be the cause of the problem?! I mean, my co-worker and I both start the application on a Windows Vista, Intel Centrino Core-Duo 2,0 GHz, 2GB RAM, NVidia Quadro 350M laptop and it runs fine on his computer and doesn't run on my computer. What's going on?? Thanks for any insights! I just decided to upload the code (unfinished of course :)), so if you want to take a look, you'll be able to download it "soon" (i.e. 5 minutes or so) from here. [Edit: Ok, it's up. Download size is ~ 3MB] [Edit: Link works now.] If you run the .exe, start a new game, enter a few names for the players ("Computer" or "c" won't work right now...) and click on the die-cup image a couple of times, the game will get slower and slower -- at least on my machine... (Note that I have currently disabled the frame-rate delimiter, so it will run as fast as possible). Thanks again! Philipp [Edited by - Beren77 on June 30, 2008 10:41:10 AM]

Share this post


Link to post
Share on other sites
Advertisement
Hi
I tested it and it worked well, don't slow down or anything.
One curious thing is that you said that you have disabled frame-rate limiter, still it gave around 80 fps and used only 20% of CPU. (one of my tests that didn't use vsync at a time took 100% of processor and did about 700fps)

But, anyhow, your game didn't slow at all.
Short system specs: Vista 32bit sp1, Intel dual core 2.4GHz, 2GB ram

Share this post


Link to post
Share on other sites
I'm not sure how long it took for your to slow down that much, but I just ran your game in wine and started a new game, let it sit there for 10 minutes, and it slowly dropped from 60FPS to about 58.34, and it was still going down, slowly, when I quit it. I have an AMD Quad Core processor and 3GB or ram.

Share this post


Link to post
Share on other sites
Check other memory usage, such as graphics and audio. You could be leaking resources (audio, textures, ...), that will likely show up on less performant system.

Share this post


Link to post
Share on other sites
Hi Guys,

thanks for testing...

Hmm. Ok, I'll check for other leaks. Maybe there's a collection (vector, or map or anything) that grows and grows.
I am pretty confident that I freed all SDL-Surfaces, though. Hmmm.. Well, I'll look again...

@Jaenis: I just double-checked and indeed: I have limited the frame rate to 100fps.

But none of you could reproduce a dramatic decrease of the framerate? I'm talking like letting it run for 5 minutes, hit "roll die" a couple of times (6 to 7 should do) and the fps dropping to 20-30?

The program shows the behavior on every computer I tested it on:
- Laptop running WinXP Prof SP 2 with 1 GB RAM (Pentium 4 3.2)
- Desktop running WinXP Prof SP 2 with 2 GB RAM and a Graphic Card that has no problems running Oblivion at maximum detail level (forgot the specs though ;)) Pentium 4
- and my said work laptop.

Straaange!! :)
Thanks.

Share this post


Link to post
Share on other sites
What you need is a profiler. That should be able to tell you what the extra work the system is doing after 5 minutes that it's not doing at the start.

First things first try NVIDIA PerfHUD to see if it's the GPU causing the slowdown.

Then you want to try a CPU profiler like CodeAnalyst.

Share this post


Link to post
Share on other sites
Just a thought. Your processor isn't entering a low power state and clocking itself down is it? Try removing the frame rate limit so it uses 100% of the processor.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!