Tag Archives: Bug

A Bug Found by Fast Fingers

OK, so there IS a bug in this game.
Comment posted by Tony this morning:
Fun, managed to end up with two tiles that didn’t match though….
The moment I read this, I immediately know what went wrong: he’s typing too fast! (well, not his fault though). Here’s more details: when you tapped on two identical tiles, the system spent 0.3 seconds drawing a connecting path between them. Now if you have a fast finger, you can break it within that 0.3 seconds.
The bullet-proof solution to this would be freezing the board while drawing the path. But this introduced some computation overhead. Instead, I simply reduce the drawing time from 0.3 second to 0.01, and still able to see the flash of a connecting line on screen. Bingo! The bug fix was launched!

JVM Wrong Timezone Bug

A few weeks ago we noticed that one of our applications had wrong timestamps in the log files by late for an hour.
At first I thought the timezone setting in the OS could be wrong but our ops people confirmed it is actually correct. Then I thought the JVM settings on that server must have something wrong. But I compared the JVM directories on the problematic server to a good server, they are exactly the same. This puzzles me. Then I wrote a simple Java app to print out all system properties and found that on the “bad” server, the default timezone is “GMT-08:00″ instead of “US/Pacific”.
After searching online, it turned out this is actually a bug in Java.
In short, in some cases JVM can get a wrong timezone from the machine, even if all the settings are right. What happened is when JVM starts, it looks for a matched …