OutOfMemory when compiling in Delphi XE2

contains all delphi packages mentioned below
Post Reply
a-s-z
Posts: 12
Joined: Tue Sep 15, 2009 11:34 am

OutOfMemory when compiling in Delphi XE2

Post by a-s-z »

Hi,

the expert is not working in my project. An OutOfMemory-Exception is thrown, after linking the exe.
I have updated to latest version, since the changelog said that patching is not done in IDE process any more. Unfortunatly the error is not gone.

After activating expert logging I could see that the exception is likely to be thrown when trying to load the MapFile with LoadMapFileEx.
The map file size is about 60Mb, there is no exception when using the command line tool madExceptPatch.exe

Is loading of the map file needed in AfterCompile step any more? How can I get a stack trace of the exception, or is it possible to compile the expert locally so I can debug the IDE expert using the IDE?

Thanks,
Andre
a-s-z
Posts: 12
Joined: Tue Sep 15, 2009 11:34 am

Re: OutOfMemory when compiling in Delphi XE2

Post by a-s-z »

Hi,

I have managed to compile the bpl and debug it with Delphi.
The exception is thrown in madMapFile.pas line 604, the size of the map file is approx. 61 MB.

Best regards,
Andre
a-s-z
Posts: 12
Joined: Tue Sep 15, 2009 11:34 am

Re: OutOfMemory when compiling in Delphi XE2

Post by a-s-z »

Hi,

I have solved the problem by changing sources. The map file is now read in chunks of 4 Mb. No problems any more :D

In addition I have optimized the parsing routine a little bit. madExceptPatch needed 9 seconds before and now about 2 seconds to patch the application :wink:

Best regards,
Andre
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: OutOfMemory when compiling in Delphi XE2

Post by madshi »

Thanks, I received your patch via email and will evaluate it early next week. I'm surprised the patching took 9 seconds for you - normally it's extremely fast on my PC! Just a couple of milliseconds with all the projects I'm compiling here. Would you mind also sending me your map file, so that I can reproduce the long parsing time? Thanks!
Post Reply