0

As the question suggests I have an app that I can run perfectly fine after building under Delphi 2010, however if its compiled under Delphi XE I get the error:

Project xyz.exe raised exception class EOSError with message 'System Error. Code 1158. The current process has used all of its system allowance of handles for Window Manager objects'.

The error occurs after receiving a large amount of data from an SQL query but it seems odd that it only crashes out after being built with XE. I've run FastMM in the 2010 environment with no issues unfortunately I cant run it in XE as I only have a compiler license which is running on a build server.

I've also checked the number of handles being used through PERFMON and the 2010 version uses more handles that the XE version with no problem.

Any ideas?

LU RD
  • 34,438
  • 5
  • 88
  • 296
Scott Alexander
  • 455
  • 2
  • 17
  • 5
    You are exhausting handles. FastMM won't help you there. You need a tool that will track handle leaks. MadExcept 4 will do that for you. – David Heffernan May 16 '13 at 10:23
  • Cheers I'll grab a copy of that and give it a go. – Scott Alexander May 16 '13 at 10:26
  • 1
    Thanks for introducing me to MadExcept4, turns out the objects that I was creating from my query results were 2mb each, so a couple of hundred responses adds up to a lot of memory being used. Still a bit odd that XE detected it but 2010 could not. – Scott Alexander May 16 '13 at 15:53
  • 3
    Don't be shy about buying the full commercial ME product, it's truly wonderful stuff. – David Heffernan May 16 '13 at 16:00
  • Unfortunately fixing that issue did not solve my bug, I'm still getting the same error only through a XE build though, 2010 works fine. I've now also included a function to return the number of handles on each query result and its fixed at 936 handles, which is fine. The message box that returns on each result is considerably slower as well. – Scott Alexander May 17 '13 at 12:07

0 Answers0