Q:

Capacity exceeded error while using cleveref package with ifacconf class

I am using the cleveref package with the ifacconf class and it is returning the error as follow:
TeX capacity exceeded, sorry [input stack size=5000]. }{}

I could not identify the error. Can anybody help me?
My MWE:
\documentclass[a4paper]{ifacconf}

\usepackage{graphicx,amsmath,url}     
\usepackage[round]{natbib}            

\usepackage[spanish,brazil,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{ae}

\usepackage{cleveref}

\begin{document}

\cref{here}

\begin{figure}
    \label{here}
\end{figure}

\end{document}

A:

The class adds section to the reset list of the part counter, that it doesn't define.
\documentclass[a4paper]{ifacconf}

\newcounter{part} % fix the issue in the class
\counterwithin*{section}{part}

\usepackage{graphicx,amsmath,url}
\usepackage[round]{natbib}

\usepackage[spanish,brazil,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{cleveref}

\begin{document}

\cref{here}

\begin{figure}
  \caption{Caption}
  \label{here}
\end{figure}

\end{document}

Note that the ae package is obsolete and should not be used in newer documents.

