Jump to content
  • Advertisement
Sign in to follow this  
keptblue

Program initializes very slowly on some computers

This topic is 3633 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

Hello, I'm working on a game in OpenGL and SDL, using enet and curl libraries for some networking. Unfortunately, the game takes upwards of 10 minutes to load up on some computers. These computers are seemingly indistinguishable from other computers that load it up fine.... I was wondering if anyone has had similar issues or could point me in the right direction? Please help!

Share this post


Link to post
Share on other sites
Advertisement
My first guess would be some blocking function that has to wait for a timeout before proceeding. Networking stuff tends to be the culprit for timeout issues, but could be other things.

Share this post


Link to post
Share on other sites
Is the operating system on the computers that take longer for it to load up different from the ones that load up fine? Some games I played that were made in XP ran much, much slower in Vista.

Share this post


Link to post
Share on other sites
interesting -

well, the program only loads the linker and #include network libraries at startup. i dont actually initialize any network objects until the game startup is well over. could that still be an issue?


i have xp and vista at home, they both run the game fine.

arg. this problem is so frustrating.. :(

Share this post


Link to post
Share on other sites
Quote:
Original post by keptblue
the program only loads the linker and #include network libraries at startup

um....what? You are linking and compiling on the fly?

Share this post


Link to post
Share on other sites
sorry, no..

i just mean that the network code is not used until later in the program. everything is compiled before attempting to run the program.

Share this post


Link to post
Share on other sites
Strange problem. Maybe you should try creating a log of your initialization operations including the time that the operation completed. Something like this:

void log_init(const std::string& operation)
{
log_file << "Completed " << operation << " " << SDL_GetTicks( ) / 1000
<< " seconds after program started\n";
}


Then call it after every major thing you do to initialize the program. This should help you find the culprit.

Share this post


Link to post
Share on other sites
that was a great suggestion simian,

however, i have cout<<"HAY!"; at the top of int main() and it doesnt even print it out until 10 minutes in when the rest of the program loads up............


furthermore, the program is running at 95% in the task manager, it is simply not showing up.

Share this post


Link to post
Share on other sites
Quote:
Original post by keptblue
that was a great suggestion simian,

however, i have cout<<"HAY!"; at the top of int main() and it doesnt even print it out until 10 minutes in when the rest of the program loads up............


Do you have any globals in your program? Do many of them have complicated constructors?

Share this post


Link to post
Share on other sites
i do actually have a lot of global variables/pointers..

none of them have any complicated constructors, besides stuff like int a=4;


do you think that could be a problem? how would i fix that besides getting rid of globals?


edit: i also have global structs..

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!