I'm having a weird problem with the following document:
The preamble consist of
\documentclass[11pt, letterpaper]{amsart}
\usepackage[utf8]{inputenc}
\usepackage[hidelinks]{hyperref}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{fullpage}
\usepackage{exercise}
\usepackage{enumitem}
%\usepackage{baskervald}
\usepackage{mathrsfs}
\usepackage{xstring}
\usepackage{ifthen}
\usepackage{tikz-cd}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[style=alphabetic]{biblatex}
\usepackage{xcolor}
\usepackage{gauss}
\usepackage{bbm}
\usepackage{pdfsync}
\setlist[enumerate]{label=(\roman*)}
\setlength{\parindent}{0pt}
\newcommand{\set}[2]{\ifthenelse{\equal{#2}{}}{\{ #1 \}}{\{ #1 \text{ } | \text{ } #2 \}}}
\title{Exam in Integration Theory \\ 2020-01-14}
\author{Jonathan Lindell}
Then I have
\begin{document}
... some other exercises to get to this one.
\begin{Exercise}
Suppose that \(\set{a_n}{}\) is a sequence of non-negative numbers and \(\set{E_n}{}\) a sequence of Lebesgue measurable subsets of \([0,1]\). Supppose there exists \(\delta > 0\) such that \(m(E_n) \geq \delta\) and
\begin{align*}
\sum_{n}a_n\chi_{E_n}(x) < \infty
\end{align*}
for Lebesgue a.e. \(x\). Prove that
\begin{align*}
\sum_{n} a_n < \infty
\end{align*}
\end{Exercise}
\end{document}
When I compile this, the whole exercise disappers. If I remove the last align the document compiles as normal.

I am using emacs to write the tex code in auctex. I have tried to compile it directly in the terminal using pdflatex, though no difference. If I compile just the code I have posted I get the same problem.
\documentclass{...}and ending with\end{document}. – campa Jan 14 '20 at 14:32pdfsyncpackage (since we got synctex build into the engine, this package have been irrelevant). BTW 1: make your MWE into a single piece of code not two sniplets. BTW 2: you are loading a lot of packages that are irrelevant for showing the issue. BTW 3: you might want to have a look at the\Setexample in themathtoolsmanual, it provides a (IMO) better syntax for sets than a two arg macro. – daleif Jan 14 '20 at 15:33pdfsyncpackage: pdfsync uses extremely [sensitive] code. You should not use pdfsync on final documents because it can change the layout rather significantly (different page/line breaks are the most obvious changes), ... Murphy’s law states that it will happen to you when it absolutely must not... – Mico Jan 14 '20 at 15:47align*environments. You should not use them to create single-line unnumbered displaymath environments; use\[ ... \]instead. See the posting What are the differences between$$,\[,align,equationanddisplaymath? for more information on this topic. (b) Thehyperrefpackage should be loaded last. (c) Theamsfontspackage is loaded automatically by theamssymbpackage; hence, no need to loadamsfontsexplicitly. – Mico Jan 14 '20 at 15:52