I'm a tad worried about the second commit where the document_array doesn't seem to match the notebook content… I'll try and have a quick look whenever I can to see if the deeper cause isn't too problematic (unless you beat me to it 😉 😉 )
Just a preliminary analysis.
First, the stack trace I posted is incorrect, it should be: ``` #5 0x0000fffff7c241d0 in document_get_from_notebook_child (page=<optimized out>) at document.c:335 #6 0x0000fffff7c242a4 in document_get_from_page (page_num=<optimized out>) at document.c:361 #7 0x0000fffff7c4b248 in configuration_open_files (session_files=<optimized out>) at keyfile.c:1390 #8 0x0000fffff7c4b354 in configuration_open_default_session () at keyfile.c:1404 #9 0x0000fffff7c5e430 in destroy_project (open_default=1) at project.c:480 #10 0x0000fffff7c5e4d8 in project_close (open_default=1) at project.c:435 ```
Second, I bisected it to https://github.com/geany/geany/commit/23367de0c5237558ea63cb8c711d46390d9782... so it's an earlier problem.
That's about all for today ;-).