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

后端 未结 6 2379
一生所求
一生所求 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 07:18

    Are you using runtime packages? I've seen similar issues before. If you're sharing globals or interfaces across package boundaries, you have to make sure that all references to classes that belong to a certain package get cleaned up before that package is unloaded; otherwise they'll try to make virtual calls into memory that's no longer valid.

提交回复
热议问题