InnoSetup hangs after install due to dll

孤人 提交于 2019-12-11 18:50:52

问题


I am using a custom DLL inside an InnoSetup wizard.
All works well.

Except that AFTER install completes successfully, the main GUI windows closes (as expected) but the icon remains in the task bar.
(the install process still exists and can be easily killed from the task-manager)

I presume the DLL is leaving some unreleased resource or reference, and the InnoSetup finalizing code is waiting on it. Any hints on specific resources that the IS is waiting on ?

Thanks


回答1:


After significant debugging and hair-pulling, the deadlock occurs is Delphi unit finalization code.

If threads are started/terminated in the finalization code, valid-looking code will hang when innosetup tries to release the dll.

I know the DLL_THREAD_ATTACH routines are serialized by windows, so this is probably the problem. Innosetup itself is written in delphi, and this can be reproduced by a simple dephi program, which calls a delphi DLL, which calls a delphi DLL which thread termination code in a unit finalization routine

Hope this helps someone in the future



来源:https://stackoverflow.com/questions/24258585/innosetup-hangs-after-install-due-to-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!