Page 1 of 1

OutOfMemory when compiling in Delphi XE2

Posted: Wed Sep 10, 2014 12:08 pm
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

Re: OutOfMemory when compiling in Delphi XE2

Posted: Thu Sep 11, 2014 6:17 am
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

Re: OutOfMemory when compiling in Delphi XE2

Posted: Thu Sep 11, 2014 12:29 pm
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

Re: OutOfMemory when compiling in Delphi XE2

Posted: Thu Sep 11, 2014 6:45 pm
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!