Hi! Thanks for taking the time to try the game.
This is intentional; with defense, you always receive at least 1 damage.
And no, the game isn't supposed to crash when you reach d3. I don't know what the reason for this could be, but it's never happened to me before. I'm sorry it did.