logo
down
shadow

Why does Delphi XE7 IDE hangs and fails on out of memory exception?


Why does Delphi XE7 IDE hangs and fails on out of memory exception?

By : Kasper Damgård
Date : November 18 2020, 03:49 PM
Any of those help See Quality embarcadero
The fequently 'out of memory' in XE7 problem. Some solution to decrease 'out of memory'
code :


Share : facebook icon twitter icon
How do I go about diagnosing memory corruption errors occurring in a COM-DLL after porting it from Delphi 2007 to Delphi

How do I go about diagnosing memory corruption errors occurring in a COM-DLL after porting it from Delphi 2007 to Delphi


By : Mark Gerald
Date : March 29 2020, 07:55 AM
wish help you to fix your issue Not exactly an answer to the question which was more general, but very probably the solution to the specific problem that prompted it:
I am 95% sure to have identified the problem now! :)
How to Free Memory when Out-of-memory exception occurs in Delphi using SetLength

How to Free Memory when Out-of-memory exception occurs in Delphi using SetLength


By : cheney
Date : March 29 2020, 07:55 AM
I wish this help you In general, it's not possible to recover from an out of memory error. At that point the heap is most likely corrupted. The appropriate response is to terminate the process.
In this specific case, the allocation is performed by DynArraySetLength in the System unit. This performs repeated allocations. Only as the last act of DynArraySetLength is the return value, a in your code above, actually assigned. And if errors occur in DynArraySetLength then the runtime makes no effort to tidy up. Which means that in case of failure, any memory allocated is leaked and cannot be recovered. You have no way to refer to it in order to free it.
What happens if 'throw' fails to allocate memory for exception object?

What happens if 'throw' fails to allocate memory for exception object?


By : valie15
Date : March 29 2020, 07:55 AM
Hope this helps (providing my own answer... I'll wait for few days and if there are no problems with it -- I'll mark it as accepted)
I spent some time investigating this and here is what I unearthed:
Application.OnException fails to handle all the exception - Delphi

Application.OnException fails to handle all the exception - Delphi


By : Jess Williams
Date : March 29 2020, 07:55 AM
To fix this issue If you want to intercept ALL exceptions, you need to implement a RTLUnwindProc low-level procedure.
This is a bit low-level (e.g. it needs asm skills), so you should better rely on existing code. See this stack overflow question. I even put some reference code (including low-level asm, working with Delphi 7 and later under Win32) in my own answer.
Delphi Application Hangs

Delphi Application Hangs


By : Abdalhameed Ghaith
Date : March 29 2020, 07:55 AM
hope this fix your issue The right solution is to put the long running task in a thread so that it does not block your UI thread. You should do that.
If you cannot bring yourself to take that task one, and it can be quite tricky, you can always disable ghosting by calling DisableProcessWindowsGhosting. But you really ought not to do that. You really ought to put the work in a thread.
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org