I have reduced a weird issue I noticed a little while ago. Displaying a pyplot figure, here, just before the call to qr, causes the factorization to return all NaNs.
If the figure isn't displayed, which I'm not sure how to do in the REPL, so the below is run in Atom with display commented out, the factorization works fine.
If the factorization is rerun, the result is fine as well.
using PyPlot
fig = figure(1);
x = rand(10,10);
plot(x); xlim(-12,0);
display(fig); # comment out in Atom so fig doesn't show
first(qr(x))[1]