Crash on Quit

When someone quite I open a modal dialog to ask them if they want to get info on purchasing.
They choose yes or No Thanks buttons.
Either way the app appears to close but then after it appears to be close a Mac “app has crashed”
dialog shows up. The end of the logging shows this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.HIToolbox 0x99c4d748 StoreEventParam(EventPriv*, unsigned long, unsigned long, unsigned char, unsigned long, void const*, PromiseInfo*) + 257
1 com.apple.HIToolbox 0x99a7ac8d SetEventParameter + 407
2 com.apple.HIToolbox 0x99c40455 _PostEventToTarget + 140
3 com.apple.HIToolbox 0x99d73156 PostActivateEvent + 364
4 com.apple.HIToolbox 0x99d72d9c HiliteAndActivateWindow + 402
5 com.apple.HIToolbox 0x99d75c86 AdjustToNewWindowActivation(WindowData*, WindowContext*, OpaqueWindowPtr*, unsigned char, WindowData*) + 272
6 com.apple.HIToolbox 0x99afc409 PotentiallyAdjustToNewWindowActivation(WindowData*, WindowData*, WindowContext*, OpaqueWindowPtr*, WindowData*) + 122
7 com.apple.HIToolbox 0x99afc385 BringToFrontAndActivateWindow(WindowData*, OpaqueWindowGroupRef*, unsigned char) + 121
8 com.apple.HIToolbox 0x99afc2fa WindowData::SelectWindow() + 240
9 com.apple.HIToolbox 0x99afc204 SelectWindow + 29
10 rbframework.dylib 0x0143aa63 ProgressBarCreatePane + 4755
11 rbframework.dylib 0x0143a3ab ProgressBarCreatePane + 3035
12 rbframework.dylib 0x013f2d00 EmbedWithinInternal + 4448
13 rbframework.dylib 0x013f42dc EmbedWithinInternal + 10044
14 rbframework.dylib 0x0137306d RuntimeCloseWindow + 29
15 com.torrid-tech.retirementview 0x0002e0aa Window.Close%%o + 42
16 com.torrid-tech.retirementview 0x007117d5 frmExitPopupLite.frmExitPopupLite.cmdNoThanks_MouseDown%b%o<frmExitPopupLite.frmExitPopupLite>oi4i4 + 253
17 com.torrid-tech.retirementview 0x00711d6f Delegate.IM_Invoke%b%oi4i4 + 130
18 com.torrid-tech.retirementview 0x0058f408 AddHandler.Stub.18%b%i4i4 + 80
19 rbframework.dylib 0x0141d353 radioButtonActionDestructor + 483

Trying to figure out why its crashing so that obviously I can stop that from happening :slight_smile: Because it doesn’t look good to the user for sure.

WHERE do you “open a modal dialog to ask them if they want to get info on purchasing.”

in the CLOSE event? or the CancelClose Event? or somewhere else?

Yes in the CancelClose event.

What code is in the Close event?