40
\$\begingroup\$

Write programs that produce crazy, obscure, ridiculous, or just plain nutty runtime errors. Obfuscation and golfitude (shortness) not required.

  • solutions that look like they should work fine are better.
  • solutions that look like they should break one way but break another are better.
  • solutions that are nondeterministic are better as long as they are reproducible sometimes.
  • solutions with long distance between error cause and manifestation are better.
  • bonus points for producing errors that should be impossible.
  • bonus points for errors that crash the runtime (like making python segment fault) or operating system.

The unit of score shall be upvotes.

Addendum 1

Compiler misbehaviors are fine too.

\$\endgroup\$
9
  • 2
    \$\begingroup\$ Making Python segfault is easy: import sys; sys.setrecursionlimit(~-2**31); x=lambda x:x(x); x(x); \$\endgroup\$ Commented Aug 4, 2012 at 1:53
  • \$\begingroup\$ Peter: whoops. I repurposed the question half way through writing it :S \$\endgroup\$ Commented Aug 5, 2012 at 23:48
  • \$\begingroup\$ ...what about malbolge or INTERCAL? i'm pretty sure they'd have some pretty insane errors, probably can do it with a single char as well. \$\endgroup\$ Commented Aug 6, 2012 at 21:26
  • 1
    \$\begingroup\$ This is definitely the best link to go for the solution: destroyallsoftware.com/talks/wat :-) \$\endgroup\$ Commented Aug 13, 2012 at 17:50
  • 1
    \$\begingroup\$ Possible duplicate of stackoverflow.com/q/1146014/736054. \$\endgroup\$ Commented Jan 6, 2014 at 12:29

32 Answers 32

1
2
1
\$\begingroup\$

Bash - counterintuitive escape failure

echo "this should definitely work!!!11!" 

returns

-bash: !11: event not found 

(history expansion on the commandline is not prevented by double quotes)

Bonus:

echo "I don't know what's gone wrong!! !echo is usually pretty foolproof!-1" 

The output is unlikely to be what's expected. Press up to get the command again, and notice it's changed from what you typed. If you press up and enter a couple of times, it's likely your output will begin to look somewhat horrific. Try it for yourself.

\$\endgroup\$
1
0
\$\begingroup\$

Not to compete but Burlesque is pretty easy to crash :D.

blsq ) rs blsq: Burlesque/Eval.hs:(2900,3)-(2904,33): Non-exhaustive patterns in case 

and there are literally dozens of these crashes still hanging around. It's just that nobody ever reports them so they won't be fixed anytime soon.

\$\endgroup\$
1
2

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.