AS3 Tweetr library suffers from the Twitpocalypse bug
Friday 26 June 2009 – Filed under: Flash – 5 Comments
UPDATE - Sandro has released an update for the Tweetr library that fixes the Twitpocalypse bug. You can find the update on Google Code.
It’s been a while that I’ve been programming ActionScript, but I recently started dusting off my rusty skills. I’ve been playing around with the Twitter API using swfjunkie’s Tweetr library. In the process I discovered that this library suffers from the Twitpocalypse bug.
Put simply, the Twitpocalypse bug has to do with numbers. Each tweet has a unique Status ID. The problem was that the number of tweets was about to exceed the maximum amount of possible id’s for a signed 32 bit integer, the mathematical property used to store these ID’s with.
Twitter itself fixed this problem before it could happen on the serverside, but any client application working with signed 32 bit integers to keep track of Status ID’s would suddenly start displaying negative ID’s once the maximum number (2,147,483,647) was reached.
It’s the Y2K bug all over again
While working with the swfjunkie Tweetr library, I discovered that these classes also suffer from this bug. I witnessed tweets streaming in with negative ID’s and decided to investigate on how to fix this. It appears that a data parsing related class in the library uses the Actionscript int (32 bit) to store the ID’s with. Changing this property into a Number fixes the problem.
If you’re using the Tweetr library and are looking for a quick fix, you can download the updated version of the Tweetr library from my blog:- Download updated Tweetr library from my blog – Download the updated version by Sandro from Google Code.
« previously: Digital TV on Mac Mini, part 2 next: Running Google Chrome OS under Parallels »
5 Responses
Leave a Reply
Recent Articles
- Running Google Chrome OS under Parallels
- AS3 Tweetr library suffers from the Twitpocalypse bug
- Digital TV on Mac Mini, part 2
- Digital TV on Mac Mini, part 1
- New bike
- FLV Player 2.0.25 released
- No custom headers for Flash file upload. Why?
- Building AIR with FDT
Advertisement
Categories
- Art & Design (4)
- Flash (38)
- FLV Player (9)
- Software (17)
- User Experience Design (3)
- Various (10)
- Work (6)
Saturday 27 June 2009 at 00:06
Heya Martin
I’ve been so busy lately that i actually haven’t realized that this problem affects tweetr as well. Thank you for letting me know. I will apply the fix to the next release that i am working on. Once again, thank you for using tweetr and for spoting the problem
Cheers,
Sandro
Saturday 27 June 2009 at 06:51
Thanks for your reaction Sandro, looking forward to the update. Love the Tweetr lib!
Saturday 27 June 2009 at 18:25
[...] AS3 Tweetr library suffers from the Twitpocalypse bug http://ow.ly/fVUb [...]
Thursday 2 July 2009 at 11:29
The link to your Tweetr library is returning a page not found. Can you check your link? Thanks for your work.
Thursday 2 July 2009 at 12:14
Hi Elliott – the link has been updated, thanks for letting me know.