Exception "Invalid address specified to RtlSizeHeap" when program ends
Original Reporter info from Mantis: softvision
-
Reporter name: Bernd Engelhardt
Original Reporter info from Mantis: softvision
- Reporter name: Bernd Engelhardt
Description:
I have a unit with about 2 MB. The unit contains a lot of classes, constants, types and variable definitions (about 8000 lines of classes and definitions). This unit does not include any code that is executed during startup (no initialization or finalization section). When I include this unit in the "uses clause" of an application, the application throws the following messages when ending:
&"warning: HEAP[project1.exe]: \n"
&"warning: Invalid address specified to RtlSizeHeap( 0000000000140000, 00000000005CA32C )\n"
There is no code which calls/creates any object based on this unit. It is enough to include the unit in the uses clause of the main project (a default project created with Lazarus).
For me it seems that the heap is resized and this operations is going wrong (to many class definitions?). When the program ends an exception is thrown. If I use the unit in a DLL, then the exception is thrown on "FreeLibrary" and the DLL remains in memory.
The same code/unit works in FPC 2.4.1. The problem exists since version 2.5.x. The problem exists on x86 and x64.
I know the description is not perfect, but I can not publish the unit. Perhaps someone knows a change to the heap management, which could cause the problem.
Mantis conversion info:
- Mantis ID: 15842
- OS: Windows
- OS Build: 7
- Platform: x86/x64
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 18904 (#23b11793)
- Monitored by: » softvision (Bernd Engelhardt)