Necessity of uniform integrability in martingale convergence theorem 
Statement of theorem: If $X_n$ is a uniformly integrable martingale, then $\lim_n X_n$ exists a.s. and in $L^1$, and
$$X_n=E(\lim_{n \to \infty} X_n \mid \mathcal F_n) \quad \text{a.s.}$$

I can't think of an example of a martingale that is not uniformly integrable for which $E(\lim_n X_n|\mathcal F_n)\neq X_n$ and $\lim_n X_n$ exists. For instance, let $X_1=1$, and for $n\ge2$, $X_n=X_{n-1}+\epsilon_n$, where $\epsilon_n=n$ with probability 1/2, $\epsilon_n=-n$ with probability 1/2, and $\epsilon_n\perp\epsilon_m$ for $n\neq m$. This is a martingale that is not u.i., but $\lim_n X_n$ does not exist.
Any help greatly appreciated!
 A: A very elementary example is the following: consider the probability space $(0,1)$ with Lebesgue measure. Let $X_n=nI_{(0,\frac 1 n)}$. A straightforward argument shows that $\{X_n\}$ is a  martingale. It converges almost surely to $0$. Obviously, $X_n=E(0|X_1,X_2,...,X_n)$ is not true. Hint for proving martingale property: $\sigma \{X_1,X_2,...,X_n\}=\sigma \{(0,1),(0,\frac 1 2),... ,(0,\frac 1 n)\}=\sigma\{(0,\frac 1 n),[\frac 1 n, \frac 1 {n-1}),...,[\frac 1 2 ,1)\}$ and this last sigma algebra consists precisely  of unions of the intervals $(0,\frac 1 n),[\frac 1 n, \frac 1 {n-1}),...,[\frac 1 2 ,1)$. Hence it is enough to show that $EX_{n+1} I_A=EX_nI_A$ for each one of these intervals. This is easy.
PS: this martingale is very useful in providing counter-examples. Unfortunately it is not found in texts. 
A: Let $(\xi_j)_{j \in \mathbb{N}}$ be a sequence of independent random variables such that
$$\mathbb{P}(\xi_j = 2^j) = \frac{1}{2^j} \quad \text{and} \quad \mathbb{P}(\xi_j = 0) = 1- \frac{1}{2^j}.$$
Since $\mathbb{E}(\xi_j)=1$ for all $j \in \mathbb{N}$, it follows easily from the independence of the random variables that
$$M_n := \prod_{j=1}^n \xi_j$$
defines a martingale. Moreover, we note that $\sum_{j \geq 1} \mathbb{P}(\xi_j \neq 0) < \infty$ which implies by the Borel-Cantelli lemma that for almost all $\omega \in \Omega$ there exists $N \in \mathbb{N}$ such that $\xi_j(\omega)=0$ for all $j \geq N$. Hence,
$$\lim_{n \to \infty} M_n = 0 =: M_{\infty} \quad \text{a.s.}$$
As $M_n \neq 0$ we have shown that $\mathbb{E}(M_{\infty} \mid \mathcal{F}_n) \neq M_n$.
Remark: If $M_{\infty} = \lim_{n \to \infty} M_n$ exists in $L^1$ for a martingale $(M_n)_n$, then this implies $\mathbb{E}(M_{\infty} \mid \mathcal{F}_n) = M_n$ (and hence, uniform integrability). This means that we cannot expect to find a martingale $(M_n)$ such that $M_{\infty}=\lim_n M_n$ exists pointwise and in $L^1$ but for which $\mathbb{E}(M_{\infty} \mid \mathcal{F}_n) \neq M_n$.
