! TeX capacity exceeded, sorry [input stack size=5000]

My file was running fine, and I've since added a reference and the error (see title) has arrived. I had to remove the reference to fix it (editing the .bib file didn't help). I added another (different) reference today, and the same error came up.

I think it may be to do with the hyperref? It keeps coming up with a warning about it. I have an image in text with [H] to position it correctly.

MWE (I think it's important packages are seen):

\documentclass[12pt,a4paper]{report}
\usepackage[round]{natbib}
\usepackage{color}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{hyperref}
\usepackage{float}
\setcounter{secnumdepth}{5}

\begin{document}
\maketitle
\tableofcontents
\newpage

\begin{figure}[H]
\centering
{\includegraphics[width=0.9\textwidth,natwidth=610,natheight=550]{blah}
\caption{blah blah blah}
\end{figure}

\bibliographystyle{plainnat}
\bibliography{LATEX2}

\end{document}


I've tried removing the added reference, I've tried renaming the .bib file, checking the file paths, checking for special characters, removing URLs on recently added references... Not sure what else to do? It also comes up with this now: "! ==> Fatal error occurred, no output PDF file produced!" TIA.

• Have you tried removing that { in front of \includegraphics – daleif Aug 24 '16 at 12:06
• Note that if the problem was caused by a reference, your MWE cannot possibly be used to reproduce it as it doesn't include any references. – cfr Aug 24 '16 at 15:14
• @daleif: Sorry - the { in {\includegraphics is a typo here and does not appear in the body of the article. I have removed: \usepackage{hyperref} and the error no longer appears, so I think it is a bug with that? But I can't see how, since it was working fine before I added the references... Could it be that I need to amend the figure somehow to make a float? I am new to LaTeX - sorry! – RSmith1992 Aug 25 '16 at 18:33
• You need to provide something we can explicitly test. For example we do not have your image (which I think can be completely removed) or the used bibliography. As is your doc should not have any problems, but since you still have problems, we need more information. You could also consider providing the log file (paste it into your question) – daleif Aug 25 '16 at 18:45
• Reminds me of tex.stackexchange.com/a/24647/14470 – Frederick Nord Feb 11 '18 at 13:57