PDA

View Full Version : Multiple cars not counting.


leonen
2010.01.04, 08:33 AM
Last week we had an endurance race. 4 hours.

To time it we used FS software, but sadly, we discovered a bug that in short races, we hadn't perceived.

When two or more cars crossed over the antenna in a very very short period (this would be, 1 or 2 seconds apart), only the first one is recognized by the software, skipping the lap for the rest.

I guess it must have to do with how the soft pulls data from the CORE system.- We were using the latest version.

pinwc4
2010.01.04, 09:46 AM
Last week we had an endurance race. 4 hours.

To time it we used FS software, but sadly, we discovered a bug that in short races, we hadn't perceived.

When two or more cars crossed over the antenna in a very very short period (this would be, 1 or 2 seconds apart), only the first one is recognized by the software, skipping the lap for the rest.

I guess it must have to do with how the soft pulls data from the CORE system.- We were using the latest version.

That is bad, but also not normal. The software is polling the Core reader every 1/100th of a second so cars that are a second apart should be easily picked up. In our races we commonly have people crossing the lap counter within hundredths of a second and they get picked up with no problems.

While I have not ran a race that long we regularly run 1 hour races and have not encountered this. Did this problem only occur late into your endurance race?

The most common thing I have seen cause the software to miss laps like you saw is if some other program or service is running on the computer that ends up taking up most of the CPU time (Windows Update and Virus Scanners doing full scans being big culprits). Though it is really odd that it would just be missing a car following another car.

Is this something you can reproduce in a short race or did it only show up in a long race. If you can easily reproduce it can you check Task Manager (assuming you are using Windows) and see what processes are using a lot of CPU time?

Are you using the latest stable release .33 or are you using a test version of .34?

How many racers did you have on the track and how many laps were people getting by the end of the race? What speed is your computer and how much RAM does it have?

Any insight you can provide is appreciated.

leonen
2010.01.05, 09:27 AM
Hi Jeremy.

The problem begun early in the Race. We had only 6 cars running simultaneously in the race, and it happened all the way through till the end. The winner had 970 laps (the avg time was 13~14 seconds per lap)

The PC was not running anything else than FS software. We have version .34 and it's a P3 with 1 GB Mem.

I said 1 or 2 seconds apart, but surely was less time. I mean, cars running no more than a meter apart from each other.

We'll test this next saturday to see if the same happens in a short race.

pinwc4
2010.01.05, 07:21 PM
Hi Jeremy.

The problem begun early in the Race. We had only 6 cars running simultaneously in the race, and it happened all the way through till the end. The winner had 970 laps (the avg time was 13~14 seconds per lap)

The PC was not running anything else than FS software. We have version .34 and it's a P3 with 1 GB Mem.

I said 1 or 2 seconds apart, but surely was less time. I mean, cars running no more than a meter apart from each other.

We'll test this next saturday to see if the same happens in a short race.


Thanks for the info. I still suspect some sort of CPU bottleneck, maybe in the software itself. When a new lap is detected for a racer quite a few operations have to occur, some of which take longer as more laps happen. The fact that it is occurring only for a racer following closely behind another is what leads me to believe that the CPU must be getting bogged down for some reason causing it to fall behind sending inventory requests for RFID's.

One thing to try is if you can duplicate the problem and if you see the CPU spiking for quite a bit around a lap detection is to turn off live graphing. The app will have to do quite a bit less work if the live graphing is not running.

Just speculation at this point. Thanks for the additional info I am going to test running some races with 8 racers and ~1000 laps to see how that impacts CPU/memory usage.

pinwc4
2010.01.08, 09:51 PM
We'll test this next saturday to see if the same happens in a short race.

I have a new build of the software that you can run this Saturday if you want.

I spent some time optimizing the graphing routine, it is around 40% faster now. I also changed it so if you are not looking at the graphs they are not updating at all and will just refresh if you are on that page. Plus you can now disable live graphing altogether if you have a machine that it slows down too much.

From my testing I think the graphing of that many laps was causing performance issues. Previously even if you were not looking at graphs if a racer got a lap it would update the graphs for everyone. During a race this is the only code that will get slower and slower as you get more laps so hopefully this update will help.

I also added some logic to clear out data from the buffer. If the lap counter sent bad information at some point it would just get stuck in the buffer. In theory over time this could build up and could cause the software to slow down with each lap detection. I had not seen this with the Core hardware, only the Kyosho hardware but I added the logic for the Core hardware now just in case.

But a major disclaimer, I have not tested this version at all. I will not have an other race night until next Saturday. This version also has some unrelated bugs that were fixed.

You can grab it from here:
http://www.flipsideracing.org/downloads/fsraceWin-455.zip

leonen
2010.01.11, 08:59 AM
Okay, this weekend we did some tests with some short races (10 to 30 minutes), and verified that the problem was not occurring anymore.

It seems perhaps that in such a long race as the enduro we had, we need a faster PC.

Thanks!

leonen
2010.01.11, 09:44 AM
I missed your post with the new version. I'll download it and test it this next Wednesday night. Thanks again!!!

pinwc4
2010.01.11, 11:13 AM
I missed your post with the new version. I'll download it and test it this next Wednesday night. Thanks again!!!

Bummer, I was hoping you would notice it before your weekend races.

My best guess is a CPU limit because of the graphing. I spent some time optimizing things for that new build but it also give the ability to disable live graphing in case the optimization is not enough.

Let us know how it goes.