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

后端 未结 6 2377
一生所求
一生所求 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:09

    Like others said: 216 means AV after SysUtils was shutdown. Usually, the only thing that shutdowns after SysUtils (and have chance to raise AV) - is System unit. Specifically: memory manager.

    So, run-time error 216 at shutdown usually means memory corruption bug in your application.

    That can be very easy to solve - just enable full debug mode in memory manager or use a debugging memory manager. Sometimes, however, it can be very hard to find. But you can start with debug mode of MM first.

    See this article.

提交回复
热议问题