I used a preamble for many months where tikz and longtable lived together without problems. From a few days, I think after last update, I have the problem that I have reproduced with the MWE I send. If you activate the three lines commented, a strange error appear, related to a missing brace. I would like to know if and what mistake I made.
\documentclass[a4paper,twoside,openany,10pt,final]{memoir}
\usepackage{longtable}
\usepackage{polyglossia}
\setmainlanguage{italian}
\usepackage{fontspec}
\usepackage{longtable}
\usepackage{polyglossia}
\usepackage{fontspec}
%\usepackage{tikz} %%%
%\usetikzlibrary{shapes} %%%
%\usetikzlibrary{calc,intersections,decorations.text,positioning,decorations.markings} %%%
\usepackage{soul}
\usepackage{bidi}
\begin {document}
\begin{center}
\begin{longtable} {c
p{.8\textwidth}
c
c
}\\
\caption{Indice delle copie dei documenti originali}\\
\toprule
doc. & titolo & pag. & pagg. \\%
\midrule
\endfirsthead
\multicolumn{4}{c}%
{{\itshape \tablename\ \thetable{} -- segue dalla pagina precedente}} \\
\hline
doc. & titolo & pag. & pagg. \\%
\hline
\endhead
\hline
\multicolumn{4}{r}{\footnotesize\emph{continua alla pagina seguente}}\\%
\endfoot
\endlastfoot
H1 & Descrizione & pag. h1 & 66\\%
H2 & Descrizione & pag. h2 & 4 \\%
H3-1 & Descrizione & pag. h3 & 26 \\%
H3-2 & Descrizione & pag. h3 & 8 \\%
H4 & Descrizione & pag. h4 & 21 \\%
H5 & Descrizione & pag. h5 & 11 \\%
H6 & Descrizione & pag. h6 & 12 \\%
H7 & Descrizione & pag. h7 & 8 \\%
H8 & Descrizione & pag. h8 & 16 \\%
H9-1 & Descrizione & pag. h9 & 14 \\%
H9-2 & Descrizione & pag. h9 & 7 \\%
H10 & Descrizione & pag. h10 & 9\\%
H11 & Descrizione & pag. h11 & 30 \\%
H12 & Descrizione & H12 & \\%
H13 & Descrizione & H13 & \\%
H14 & Descrizione & H14 & \\%
H15 & Descrizione & H15 & \\%
H16 & Descrizione & H16 & \\%
H17 & Descrizione & H17 & \\%
H18 & Descrizione & H18 & \\%
H19 & Descrizione & H19 & \\%
H20 & Descrizione & H20 & \\%
H21 & Descrizione & H21 & \\%
H22 & Descrizione & H22 & \\%
H23 & Descrizione & H23 & \\%
H24 & Descrizione & H24 & \\%
H25 & Descrizione & H25 & 17 \\%
\hline
& & & 232 \\%
\hline
\end{longtable}
\end{center}
\end{document}