I just experienced something similar...
I spent a couple of hours, wondering if I had totally lost any understanding of how things works...
I read this post, installed the newest arduino (1.0.5) and voila... Everything worked.
It seemed like the first couple of commands in the loop would be executed, then everything would stop.
At some point it even seemed as though only the setup was actually run.
I don't know, if this means anything, but my 1.0.4 version of arduino was from Digispark.
Hope that helps somebody get to the root of similar problems!
Best
Dan