AHHH "To many timers"!!

AHHH "To many timers"!!

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

AHHH "To many timers"!!

Post by Buggi »

ARGH!!

Where does this error come from?

Me and a friend were playing on my LAN in just a regular game when suddenly... WHAM, we were both inundated with the error "to many timers"

Needless to say, it obliterated playability. Pathfinding seemed to go out the window, as did any unit's sense of purpose.

I just found the code where it prints out the line.

TimeProfiler.cpp

Code: Select all

void CTimeProfiler::StartTimer()
{
	if(startTimeNum==999){
		info->AddLine("To many timers");
		return;
	}
	LARGE_INTEGER starttime;
	QueryPerformanceCounter(&starttime);

	startTimes[startTimeNum++]=(starttime.QuadPart);
}
?!?!

Anyone else hitting this? Is there a fix? I know he had a lot of airplanes, I know this because they were in my base a short time later. O_O

-Buggi
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Thats probably caused by a "timer leak", that is calling start_time_profile somewhere without a end_time_profile. The biggest problem with this is that it screws up the main simtime counter which the game rely on to lower speed.

Have you made any custom modifications to your exe ?
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Aside from the patch I submitted, no. I don't change anything.

-Buggi
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

Sounds like someone needs to scan the code for start_time_profile commands, and find out where the missing end_time_profile command is.
Xon
Posts: 33
Joined: 07 May 2005, 17:07

Post by Xon »

Triaxx2 wrote:Sounds like someone needs to scan the code for start_time_profile commands, and find out where the missing end_time_profile command is.
Or have start_time_profile return an structure which has a destructor which calls end_time_profile(then a quick check to prevent end_time_profile from being called more than once) when it falls out of scope.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Please fix it.

I beg you.

Also, "to many unit categories"

??

I like variety :D
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

yeah that ones REALLY annoying! :evil:
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Its fixed
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

Rejoicing commence!
Post Reply

Return to “Engine”