# Bug Tracker

ID: 161 🔗 Closed (Migrated) glossaries-extra 1.45 Peter 2020-05-26 18:56:25 Possible incompatibility with totcount (\newtotcounter) or other macros/packages

## Report

A more detailed description is available at [TeX.SX Link].

In current MiKTeX distribution (both release and pre-release), compiling the attached MWE leads to java.lang.StackOverflowError that, according to bib2gls’s manual, may be caused by an infinite loop. The problem indicates possible incompatibility between bib2gls 2.3 2020-03-23 and \newtotcounter{} of totcount 1.2 or some other macros/packages that it invokes.

It seems to be related to the second line of the AUX file:

	\expandafter\ifx\csname c@tc@totc\endcsname\relax\newcounter{tc@totc}\fi\setcounter{tc@totc}{0}


as changing it to:

	\newcounter{tc@totc}\setcounter{tc@totc}{0}


reverts normal operation of bib2gls.

Also, reordering commands in preamble does not prevent these errors from occurring.

### MWE

\documentclass{article}

\begin{filecontents*}{entries.bib}
@entry{bird,
name={bird},
description = {feathered animal}
}
\end{filecontents*}

\usepackage[record]{glossaries-extra}

\usepackage{totcount}
\newtotcounter{tc}

\begin{document}
\gls{bird}
\printunsrtglossaries
\end{document}

## Evaluation

The bug is in the TeX parser library not in glossaries-extra.sty. This issue has been migrated.

## Watch This Report

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

Name: (Optional.)