InDesign 20.4.1 - issue with the destroy lifecycle hook

,

Hi,

I have been working on an InDesign plugin for some time now. This morning I updated InDesign to the latest version, version 20.4.1 (from 20.3.something).

In UXP Developer Tools I can “Load & Watch” my plugin OK, but when I “Unload” it InDesign hangs with the beachball of death and I have to Force Quit InDesign. (“Unloading” has previously worked fine.)

In the create lifecycle hook for the plugin I am adding InDesign event listeners, creating an InDesign submenu in the main menu and creating a flyout menu for the panel. In the destroy lifecycle hook for the plugin I am removing all those things. If I clear out all the code I have in the destroy lifecycle hook, I can “Unload” my plugin without causing InDesign to hang.

My code has been working fine for ages now. It has only broken with this latest version of InDesign, 20.4.1. Does anyone have any idea what Adobe have changed with this version of InDesign that might account for this?

Philip

Does it work if you revert back to 20.3?

@Leo To be honest, I haven’t tried. I am assuming it would. The code in the “destroy” lifecycle that is now triggering the hang has been present in my code since version 19 of InDesign and not triggered the hang.

In addition, @Roland_Dreger has hit the same issue. He took the trouble to file a bug report, and one of the Adobe engineers has acknowledged the problem.

Philip

This bug, which was fixed in InDesign 2025 v20.5 (see the bug report thread referenced above), is back in InDesign 2026 v21.0. Once again, code in a plugin’s “destroy” lifecycle hook causes InDesign to crash.

Comments are closed on the original bug report filed by @Roland_Dreger, so I have submitted a new one simply referencing the original: InDesign 2026 crash on UXP plugin shutdown – regression bug – Adobe InDesign

Philip