18

Following comments to this question, the issue described below is probably a recent bug that might affect the badge count of all users on all sites. Thus, much of my original question is probably not related to the root cause of this particular bug. Or maybe it is, you never know.

Today, to my surprise, I was awarded the Taxonomist badge on Stack Overflow. That was unexpected because I don't usually create tags there (but when I do, they're renamed in the next fifteen minutes).

To my even greater surprise, that badge did not reflect in my silver badge count, which remains stuck to 22 instead of the expected 23 (and I counted that twice... thrice... four times now).

Initial investigations on meta led me to Wrong Badge Count, and at first glance it explained the issue because I didn't believe the badge to actually be legit. However, further digging revealed that award is actually a side effect of one of my first edits on SO (I wasn't even realizing I was creating a new tag back then) and is perfectly legitimate after all.

That led me to Myself's answer to Rebecca's question, which acknowledges that Webmaster's Enthusiast badge was not recomputing the badge tally when awarded but, unfortunately, does not explain why.

Are there badges that do behave this way, and if so, which ones? Is there a legitimate reason for them to do so, or can they be fixed?

8
  • I've noticed this on my Meta Pro Webmasters account The header says 6 badges, but the main body of the page says 8. The 2 badges are Supporter and Analytical. It was updating yesterday.
    – ChrisF Mod
    Commented Aug 26, 2011 at 20:25
  • It looks like there is some bug with your badge count not updating ... this only started today. Commented Aug 26, 2011 at 20:28
  • Interesting. According to my profile here on meta, I have 3 silver badges and 15 bronze, for a total of 18. The header, however, only shows 2 silver and 15 bronze.
    – hammar
    Commented Aug 26, 2011 at 20:29
  • 2
    @hammar - it seems to be affecting any badge awarded today. You get the badge and the main body of your profile updates, but the header doesn't.
    – ChrisF Mod
    Commented Aug 26, 2011 at 20:31
  • @Paŭlo, ChrisF (damn that only one @ rule), so it's a recent bug that affects all badges on every site? Commented Aug 26, 2011 at 20:36
  • 2
    Looks like this, but your post was the first I've seen here to report this. Thanks! Commented Aug 26, 2011 at 20:42
  • 2
    Frédéric - It certainly looks that way. I was going through sites getting Analytical (well you have to) and the totals were updating yesterday but not today. (cc. @Paŭlo) I was thinking of raising the issue myself (once I'd confirmed I wasn't seeing things).
    – ChrisF Mod
    Commented Aug 26, 2011 at 20:42
  • Aha! So that's what's up! Commented Oct 19, 2017 at 14:12

1 Answer 1

27

This was my fault, a backwards null check was doing the opposite of what's intended...it will be fixed in the next build and counts will sync themselves tonight.

For those curious: what we saw is sometimes a user got deleted mid-grant, so in a tight loop of "update counts on users who got badges" we'd have granted a badge, but then be unable to fetch the user throwing a null ref. Of course that check works better as a if (user == null) -> skip, rather than the opposite.

Update: deployed, badge counts will sync tonight (a sync actually runs every night, just in case)

2
  • 13
    Love it when developers admit silly mistakes in public +1.
    – user138231
    Commented Aug 26, 2011 at 22:25
  • I noticed this issue today. As I got the Electorate badge awarded in StackOverflowand it's not showing up on the status bar. :( And it's the second time it happened. And this could be caused by the Android app and the website conflict I guess. Because both badges awarded while I was using the mobile app. But not sure. Commented Aug 22, 2016 at 4:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .