Out of Memory Exception Solved WorkAround!

Compiling project groups even of relatively small projects can generate ‘Out of Memory’ exceptions.  I have been plagued with such errors since upgrading to XE3, and they are sadly still present in XE4.  Reading the newsgroups I have found posts indicating some users are experiencing these errors in earlier versions as well.

Today I stumbled across a fix workaround, which apparently has been out for a while (5 days), but was unknown to me.  I read the Delphi blogs almost daily, and frequent the newsgroups weekly, yet I had never heard of a solution for this issue, so I thought I would let other Delphi users know…

Andreas Hausladen has provided the fix workaround as part of his DDevExtensions 2.8 package, so you don’t have to entertain a future upgrade in order to finally have this bug fixed!  The option is not turned on by default though, so make sure to toggle it after installing.

Enabling option to WorkAround the Out of Memory Errors

Enabling option to WorkAround the Out of Memory Errors

13 Responses to “Out of Memory Exception Solved WorkAround!”

  1. Joseph Says:

    So this fix was provided by a user and not Embarcadero?

  2. Wodzu Says:

    Unfortunatelly this does not help in my case (D2009), although I have second checkbox checked (release only if memory usage is high).

  3. Andreas Hausladen Says:

    @Joseph: It it not a fix but a workaround. Releasing the compiler unit cache results in a recompile of units and reloading of dcus if you invoke CodeInsight or Make/Run on such a “released” project.

  4. Norm Says:

    My application was also experiencing an “out of memory exception” however it was corrected upon finding an access violation.

  5. Chris Says:

    Brilliant!! I have been plagued with this problem forever. Good to finally have a workaround for it. Thanks for the info.

  6. Daniel Says:

    It’s not working for me either, but you had my hopes up ;)

  7. Larry Hengen Says:

    @Andreas,

    Yes, in my excitement, I misspoke. This is indeed not a fix but a workaround. From a functionality perspective the problem encountered is “fixed”, and I thank you very muich for that (I have updated the post)!

  8. Peter Says:

    Thanks for posting it, no offense to the author of the code who definitely makes great stuff for Delphi Devs, but this needed a little more fanfare on his site, I didn’t even download 2.8 when I saw it on delphi feeds yesterday because it didn’t seem to have any features I needed and now that I saw it was in 2.7 and I could have avoided restarting Delphi 10 times a day a year ago! Holy smokes!

  9. Stuart Clennett Says:

    @Norm — this workaround is for out of memory errors during compilation, not at runtime in your app.

    @Peter — agreed, I didn’t pick up on this from the website either. @Andreas please stop hiding your light ;-)

  10. David F. Says:

    How pathetic is it that this problem has persisted across multiple releases? EMBT is such a poor excuse for a technology company.

  11. TPersistent.com » Blog Archive » Making Delphi 64 Bit/Large Address Aware Says:

    [...] to a performance benefit, 64 bit apps of course have access to more memory.

  12. Andre G. Says:

    Thumbs up for your info. This error was really consuming a lot time, now it has decreased substantially after your workaround. Thanks!!

  13. TPersistent.com » Blog Archive » A Pleasant Development Says:

    [...] recently upgraded to DX Seattle which contains the long awaited (7+ releases) resolution for the “Out of Memory” issue.

Leave a Reply