When I try to export my document to pdf, indesign locks up. It'll jsut stop at a certain percentage and endlessly hang out in the background task manager. I can't get indesign to force quit or restart in this state, the only thing I can do is reboot the whole computer.
This is happening in indesign 2021 and indesign 2022
Exporting the first 50% of the pages if that works try the other 50% of pages - whichever side it fails on is where the issue is. You can keep dividing and conquering the pages to track down the pages with issues.
Other methods to try:
Could you try using File>Export and choose IDML - open that up in InDesign - resave as an indesign document using a new file name.
Does the issue persist?
You could try:
Try resetting your preferences: The easiest way to reset everything is to delete the InDesign preferences: as soon as InDesign starts to boot hold down Shift, Alt, Ctrl (and Apple/Cmd if working on a Macintosh). A dialog will appear asking to delete the InDesign Preferences, select 'Yes' on this dialog. Further info and instructions here if needed: https://helpx.adobe.com/in/indesign/kb/indesign-preferences-support-file-locations.html