Suppose $M$ is a smooth manifold and $f$ is a real valued smooth function on $M$. Set $N:=f^{-1}([0,1])$ and suppose $N$ is a compact submanifold of $M$. Let $\mu$ be a volume form on $M$ and $v$ a volume preserving vector field on $M$, so that $L_v\mu=0$, where $L$ denotes the Lie derivative. Suppose in addition that $i_v\mu = d\alpha$ is exact.
Then
$\int_N df(v) \mu = \int_{\partial N}f i_v\mu$
by Stokes' theorem. As $f$ is constant on each connected component on $\partial N$, the integral on the right-hand side is zero.
Now I thought Stokes' theorem was meant to generalize the fundamental theorem of calculus. Suppose I take $M=\mathbb{R}$ and $\mu = dt$ and $v = \partial_t$ then $L_{\partial_t}dt=0$ and $i_{\partial_t}dt = 1$ (which is exact!). Then if $f^{-1}([0,1])=[a,b]$ (say), with $f(a)=0$ and $f(b)=1$ with $0
\int_a^b f'(t)dt = f(b) - f(a) = 1-0\ne0.
What gives?