Fubini's theorem didn't fail here, because the conditions are not satisfied.
Roughly, Fubini's theorem (in our case) states that if f:[0,1]^2\rightarrow [-\infty,+\infty] is a continuous function, such that one of following conditions holds:
1) f(x,y)\geq 0 forall x,y in [0,1]
2) \iint_{[0,1]^2}{|f(x,y)|dxdy}<+\infty
then
\iint_{[0,1]^2}{f(x,y)dxdy}=\int_0^1{\int_0^1{f(x,y)dy}dx}=\int_0^1{\int_0^1{f(x,y)dx}dy}
The problem is that neither (1) nor (2) are satisfied in this case.