Delphi Error Code 216
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers
Delphi Runtime Errors
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x delphi 216 runtime error Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only runtime error 216 takes a minute: Sign up Delphi Runtime error 216 thrown in SysUtils.FinaliseUnits, line number not in mapfile up vote 5 down vote favorite I have a random Runtime Error 216 that appears on application close. I have debugged as far as I can and the error is thrown in SysUtils.FinalizeUnits. I have gone over the code and ensure all created objects are freed. The number on the runtime error, 0040054A, is not present in the mapfile. Do you know what this means? Can anyone tell me how to find out what is throwing the error? delphi delphi-xe share|improve this question asked Mar 17 '11 at 7:09 Jackie 48114 add a comment| 6 Answers 6 active oldest votes up vote 4 down vote accepted I'd suspect a memory leak (all Runtime Errors 216 I've encountered so far were) and use a profiler (visual inspection is never as good as a tool). Since you're using Delphi XE, you should give AQTime a try (it's included), see also Delphi - Check if memory is being released "on time" Kind regards, Frank share|improve this answer answered Mar 17 '11 at 7:20 Frank Schmitt 18.6k63367 Thanks - working through understanding the results. –Jackie Mar 17 '11 at 8:39 1 Thanks, I used AQTime as suggested by Frank - it worked well and helped me track down one pesky object not freed correctly. –Jackie Mar 17 '11 at 21:32 add a comment| up vote 3 down vote Since runtime error 216 is an access violation, this may indicate that you're attempting to use something that you've already freed. Addresses in the map file are based at 0, but that's not where your EXE file gets loaded into memory. You EXE gets loaded at its preferred base address, which is usually $400000. Subtract that from the address you have. The address you're looking for in the map file is $0000054a. share|improve this answer answered Mar 17 '11 at 7:32 Rob Kennedy 130k13191354 Actually you subtract $401000. I'm not sure where this code can live though! I guess it's some code that the linker brings in take get from WinMain to the begi
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Runtime error 216 on closing application (again) Want to Advertise Here? Solved Runtime error 216 on closing application (again) Posted on 2003-01-05 Delphi 1 Verified Solution 27 Comments 6,250 Views Last Modified: 2012-05-04 Dear Experts, [cross-posted to www.nldelphi.com] I'm troubled by an annoying but otherwise harmless run-time error 216 that my application generates on closing. The http://stackoverflow.com/questions/5335933/delphi-runtime-error-216-thrown-in-sysutils-finaliseunits-line-number-not-in-ma source code is too long to post, and I am unable to locate the code that causes the error, so I will try to just give a short description of the program: - DB application, uses MS Access and Delphi built-in data aware components and own db-aware components. One of these (the only 'non-cosmetic' descendant) is a data-aware twebbrowser descendant. - Uses subforms by docking other forms into the mainform - Uses gsapi (ghostscript dll) and wingraphvi https://www.experts-exchange.com/questions/20444643/Runtime-error-216-on-closing-application-again.html (com component). - Uses interfaces for most interobject communication The vague thing is that the error seems to disappear and reappear as I continue to work on the application, even if I add or remove things that seem completely unrelated. However, if the error occurs restarting the application never changes that. The only thing that seems to have effect is not connecting to the access database, which (usually) causes the error not to appear. I am using a win2k machine with D6 and D7 installed, both versions generate the error. The nasty thing is that if I trace my closing code (even with the VCL components in the search path) the error seems to occur *after* the last line of code, which is de finalization of ADODB. It traces through the whole Form.DoneApplication down to the last 'end;', then into ADODB. After hitting f7 on the last 'end;' there, it gives an Access Violation followed by a Runtime Error if I hit f7 again. Most forums on the Net seem to hint that I might be trying to free an object that the VCL will want to free later, or free an object multiple times. However, commenting out all lines that free objects (except for the obvious StringLists, Inifiles etc.) does not solve the problem. Freeing or not freeing my datamodule also does not seem to do anytin
MSWord. So I am creating a WordApplication using the above code. OleInitialize(nil); WordApplication := TWordApplication.Create(nil); WordDocument := TWordDocument.Create(WordApplication); ... Before I free the word application object i write oleunitialize and then i free the wordapplication. That is http://www.delphigroups.info/2/3/1000058.html Oleunitialize; WordApplication.Free; So, when i close the whole programm i get an errror called 216 runtime error . Can you tell me how i can solve it? P.S. In the finalization section thereis no code written Thanks in advance... Ignacio Vazquez Delphi Developer 2003-07-21 09:58:30 PM Re:RunTiMe Error 216 "Hlias"