When you discover that your code is not giving the right results, not because there is any bug in your program, but because there is a bug in the theory on which it is based.

Theoretical bugs are rare but more common than thought. When you find one, your perception of the world improves quantically.

A more day to day example, it is when you realize something you never saw before, not because it was not there, but because your mental model of the world didn't include it.
case 1
JC: I've been trying to find the bug in this program all night, but its looks perfect. Don't know why sometimes is producing weird results.
Guru: Its time to chase some Theoretical bugs.

case 2:

Linux_user: The problem with microsoft is not that they produced bad programs, but they copypasted so much software from other people, that the outcome was a walking Theoretical bug. At some much extent that, when it crashed it means it was really working.
by jcmid February 4, 2010
Get the Theoretical bug mug.