Dash App Crashes When Invoking Callback While Element Is Hidden

I have a dash app (in Python) that displays a number of graphs inside of seperate html.Div elements, each of which I can render invisible by using a callback to set “hidden = True.” I can also press a button to add another graph to the layout. If every graph is visible (or in other words if “hidden = False” for every html.Div element currently in the layout) when I press the “Add Graph” button, everything works perfectly. However, is one or more of the graphs is hidden when I press the “Add Graph” button, the app crashes without giving me any error messages.

I suspect the reason this is happening is because I’m using the “hidden” attribute incorrectly, and I have looked for alternate methods of rendering the graph invisible. The most promising method I’ve found is using the Dash-Bootstrap-Component Collapse, but this is not working for me (when I try to collapse it, the graph remains constantly visible while the other elements momentarily disappear behind the it only to pop back into place a moment later).

If desired, I can edit this post to include relevant portions of my code.