How to debug a crash that only occurs on application shutdown? (Delphi)

后端 未结 6 2353
一生所求
一生所求 2021-02-13 06:21

So, after some recent changes we discovered that one of our oldest applications is sometimes crashing on shutdown. This manifests itself either in the form of \"Runtime error 21

6条回答
  •  感动是毒
    2021-02-13 06:56

    "Runtime error 216" is from Windows itself, not the Delphi exception handler. I've found that it is caused by code that runs in initialization and finalization sections of units, which execute before the Delphi exception handler kicks in. Particularly. COM objects that need to unload through finalization code running after the Delphi App has terminated will cause this and similar errors. So check that stuff.

    MNG

提交回复
热议问题