AI in science fiction tends to go malignant, and logic bombs are used to freeze the computer to save the day. A contradictory statement like "The next statement is true, the last statement was false" will either be catastrophic to the system, causing a meltdown, or at least lock the AI up forever.
One recent SFF question involved a bet that a space station member couldn't break the AI, at which point he presented the above logic bomb, and the AI devoted all resources to evaluating it. All resources, including life support. TNG presented a logic bomb of an impossible geometric shape that would cause the Borg to die off from concentrating everything on it (ethics demanded they didn't use it).
What is the earliest example where these logic bombs simply lock up the AI for a short amount of time, then it just casts it off or reboots, it only takes a small part of its processing power, or it's ignored outright (programmer's foresight)? In realistic writing, a properly programmed computer or AI or machine would not fall to such simple tricks.