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