I defined a box to contain headers for each section in an instruction file. I have been using this personally defined box for quite a long time and it worked fine all the time. A MWE is as follows:
\ducumentclass{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{longfbox}
\newcommand*{\mylbox}[1]{\lfbox[border-style=double, border-width=3pt, width = \textwidth,
padding=4pt]{\textbf{\centerline{\Large #1}}}}
\newcommand*{\mysbox}[1]{\centerline{\lfbox[border-radius = 1.5ex, border-width=2pt,
padding=4pt, padding-left = 10em, padding-right = 10em]{\textbf{\large #1}}}}
\begin{document}
\mylbox{General Information}
\end{document}
However, when I made a few changes in the text (this can't be the reason), I got a lot of errors when I compile the file. Two examples of those error messages would be:
quote ! Undefined control sequence.\fbox@border@hcornerarc@ ...er -x}\fi @tempdimd \fbox@adjusty {@tempdimb ... l.71 \mylbox{General Information}
quote ! You can't use `\dimexpr' in restricted horizontal mode.\fbox@adjusty #1->\dimexpr \option {/fbox/@border-box-height} - #1\relax l.71 \mylbox{General Information}
A more complete list of error messages can be found here.
What is the problem? The only thing I did was that I updated many packages via MikTex like two days ago. Nothing else.
If you also need further details about a specific error, please let me know.

longfboxloadspict2ewhich does define\@tempdimd, so that cannot really be the issue, can it? – campa Nov 17 '20 at 10:430.3b. In version0.4bthat has been renamed to\pIIe@tempdimd. That might be worth adding to your answer. – campa Nov 17 '20 at 10:47pict2eanyway. Better allocating a new one; the package maintainer can easily fix the issue. – egreg Nov 17 '20 at 10:51mylbox: for width, it was changed from\textwidthto\dimexpr\textwidth - 14pt. Why is the latter one better? Could you please also explain a bit about the changes made in curly brackets? Thanks a lot! – Lin Jing Nov 17 '20 at 11:10\textwidthyou get an overfull line, because you have 7pt occupied at each side. Using\centerlineis almost never good. – egreg Nov 17 '20 at 11:33\bfseriesinstead of\textbfis simply to avoid so many curly brackets? I also defined another box that is shorter than this one. How to center it without using\centerline? The command is as follows:\newcommand*{\mysbox}[1]{\centerline{\lfbox[padding = 4pt, padding-left = 10em, padding-right = 10em]{\bfseries\large #1}}}– Lin Jing Nov 17 '20 at 12:23%in the command? – Lin Jing Nov 17 '20 at 12:30%) at the end of lines? (Why is my macro creating extra space?) – egreg Nov 17 '20 at 12:31