Bug list

For discussion of the BB stats code.
User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Bug list

Postby Piers » Sat Sep 15, 2007 10:38 pm

There's an error in the pid list code - if you add a new player to your stats feed, you'd better hope they have a higher pid than any current memebers or it will fail on the next update. My care factor in fixing it was low because a) we only ever added new players who were new to the game and b) we only did it once or twice.

FF to fix it.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Postby Mort » Sun Sep 16, 2007 10:52 am

I've got a full copy of the entire server that I'm using for testing stuff on now, so I'll have a look at it.

Which code is the error actually in, and what happens that I should be looking for?

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Postby Piers » Tue Sep 25, 2007 9:41 pm

It's where you're gathering the last seven days of data, the query sorts the players by EA id number, so if you add a new clan member with a lower id than any exsiting one, all the records shift one, due to MS's bone-headed SQL implementation.

It's in bigdata3.asp (or whichever one I'm currently using).

A simple fix would be to add a "date-added" field to the playerid table and sort by that.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Postby Mort » Tue Sep 25, 2007 9:53 pm

Not sure I see what the problem is that would cause, or why it's an MSSQL specific issue (aren't we the ones requesting the sort?). I'll do some testing though and see what's what.
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Postby Piers » Sat Sep 29, 2007 4:26 pm

The problem is the order of the records returned from the db for each date - you'll get a correct record for the most recent day's data, but any previous day that doesn't have the same list of active players will have fewer records for a given date - and if the missing player(s) is/are in the middle of the list, the records get shifted to a different player.

Believe me, I know what happens - I saw it when we added billox, but that was an easy fix because his pid was higher than anyone else's (I had previously sorted by nick, and the data was stuffed, with lots oof players being reported as having scored -30000 (for example) in the previous night.

The proper fix would be to have bigdata3.asp put it into a hash ... err, Dictionary Object... but as I'd reduced processing time for retrieving records enormously I didn't want to undo the good work.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Postby Mort » Mon Oct 01, 2007 12:54 pm

I understand now... well, if I have any brainstorms and coe up with an answer then I'll try it out, otherwise... not sure I care that much either :)
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Postby Piers » Mon Oct 01, 2007 10:48 pm

Huh? I've given you the two obvious solutions:

1) new date-added-top-clan field in player database - instead of the existing ORDER BY CONVERT(INT, pid.
- Dead simple and easy to implement.

or

2) change the data retrieval to use a Dictionary Object - except that I'd have to rewrite the whole of tables2142.asp to use a Dictionary Object like

playerHash.Item(a).Item("wkdr-1")

instead of the

bigdata(n)(m)

we're currently using.

It would be conceivalbe to make a DO that we then convert back into a multi-dimensional array, but that'd be bollocks.

- A shit load of work and not worth it.

Want to do (1)? If we do that and make the php script read in pids from the db, it'd definitely be a non-beta product.
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Re: Bug list

Postby Piers » Thu Nov 22, 2007 10:00 pm

Here's another show-stopper bug, for both the tables and stats page (Mort, this is what happened last week).

If you have active players (GetStatus = 1 in PID2142 table) but their datafeed fails, the bigdata3.asp code obviously won't return any data for that pid and that date, but the tables (and the summary at the top of stats) page expects there to be as many records as there are active nicks (from the getNicks() fuction). So the tables code in both pages generates a line of nulls, which the table displays as 0s.

The side effect of this is the stats page dies completely as it tries to build a hash for a null pid.

I'll see what I can do, stats is going to be easier than tables.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: Bug list

Postby Mort » Fri Nov 23, 2007 9:09 am

At the moment I can't afford the distraction of doing any stats coding. While I'd love to bury myself in it, I already have more than enough stuff I need to skill up on for my real job :( If I even start fiddling with stats code chances are I'll get so absorbed I'll forget what I really should be doing.

If you have time to sort out new stuff, I'm more than happy to implement, but one of the reasons I wanted to open the code up to the world was in the hope that many other people might do all the hard work for us :D
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Re: Bug list

Postby Piers » Mon Dec 03, 2007 9:15 am

The tables have been updated to use a hash so the new player and missing data bugs can be considered closed.
The stats page code has been edited to close the missing data bug there as well.
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: Bug list

Postby Mort » Mon Dec 03, 2007 10:01 am

So what files have been updated/added? I'll need to add them to the stats package on the next update.
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Re: Bug list

Postby Piers » Mon Dec 03, 2007 12:20 pm

Mort wrote:So what files have been updated/added? I'll need to add them to the stats package on the next update.



stats2142.asp, tables2142.asp, bigDO.asp & 2142FuncsDO.asp

I think this means bigdata3.asp & 2142Funcs.asp are no longer in use, but I'd check that first...
Image

User avatar
Mort
Alpha-Forum Whore
Alpha-Forum Whore
Posts: 4232
Joined: Thu Dec 01, 2005 10:40 pm

Re: Bug list

Postby Mort » Mon Dec 03, 2007 1:13 pm

I might be using one of them for PIDeditor, but I'll fix that up if I am and update the download.
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Re: Bug list

Postby Piers » Thu Dec 06, 2007 7:15 pm

Oops, left some of my debug code in (you might have noticed the tables saying "r1 : 40" after the date.

It's updated, so regrab tables2142.asp
Image

User avatar
Piers
Comfortable with my sexuality
Comfortable with my sexuality
Posts: 1408
Joined: Fri Dec 02, 2005 7:57 am
Location: Horse country

Re: Bug list

Postby Piers » Sat Jan 12, 2008 2:19 pm

Just found and fixed a bug in the stats page stats2142.asp.

If your data has a null value for awards or levels, the awards div fails to populate because of an attempted split() of the null value, and the unlocks are never seen.

Found it because dQx's awards, first, when & levels have been wiped in our db - Mort, can you check the field lengths?

I've inserted before line 586:
if (playerhash(a)("award")<>"") then

and changed
i = i + 1

to
end if
i = i + 1
Image


Return to “The Buddabudda Stats system”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests