The function $f(x) = x e^{-x^2}$ is infinitely often differentiable and has an antiderivative $F(x) = -\frac12 e^{-x^2}$ everywhere on $\mathbb R$. The improper integral is defined by
$$ \int_{-\infty}^\infty f(x)\,dx = \lim_{y\to-\infty}\int_y^c f(x)\,dx + \lim_{y\to\infty} \int_c^y f(x)\,dx $$
With this knowledge we get
$$ \int_{-\infty}^\infty f(x)\,dx = \lim_{y\to-\infty}\bigl(F(c) - F(y)\bigr) + \lim_{y\to\infty} \bigl(F(y) - F(c)\bigr) = -\lim_{y\to\infty}e^{-y^2} = 0$$
since $F$ is symmetric and the limit is obvious.
I don't think it's a trick question, but it is not a proper integral because Riemann integrals only work for bounded intervals. But these improper integrals are nevertheless well-defined (as improper integrals).
The only thing that could potentially be tricky is that there are integrals over infinitely long intervals, where the improper Riemann integral does not coincide with the Lebesgue integral (which works on unbounded intervals on its own).