>....to an illegal memory location For me, that phrase is unclear.
Range checking, the function to check for what you are calling "illegal memory location" was turned off, per your statements. If the tool to check for "illegal memory location" was turned off, then..... So, assuming you had some variables declared after the array, the memory they occupied was set to your initialization value. As a test and for kicks. you could monitor them as the code writes past the end of the array. If 0 then maybe not an issue since lots of things are 0 to start. >...but only get it maybe hours later when I try to free up the same (or some other?) location? Because those location have been trashed and if they are pointers then the pointers are not valid. If they are other floats they may be invalid floating point numbers. Etc. Just m2c. Ciao -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, September 19, 2007 7:29 AM To: delphi@elists.org Subject: Re: Error 216 at close down! My array of 36 doubles is initialized at program start by writing a valid value to each and every one of the 52 cells (Note that I wrote to 52 cells, but the array was only 36 in size!) That worked fine and has done so for about a year! Range Checking is off for speed purposes. I could turn it on, but may forget to turn it off later, and I do need quite a lot of real-time power elsewhere. (The array in question is, on the other hand, only accessed once a second or so.) The error occured at close down, however, NOT during writing to any one of those 16 non-existing cells.. Yes, the question is somewhat retoric now, that I have solved the problem, but I (and others?) may still learn something from this. Why do I not get an error during a write to an illegal memory location, but only get it maybe hours later when I try to free up the same (or some other?) location? I know, memory may be assigned in chunks of 4 kB at a time, which could have something to do with it. New variables have been added, that may conflict with the actual location of those additional 16 cells. And after initialization, by the way, the x-tra cells never come into use again! I only use up to 30. Now that I think about it, I seem to remember seing something like this before in other applications. (Writing to beyond max array locations --> some strange behavior, but no run-time error, or at least not until later.) This time I did debug my way through some of the CPU code. The actual error popped up after a reRaise of some kind. _______________________________________________ Delphi mailing list -> Delphi@elists.org http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> Delphi@elists.org http://www.elists.org/mailman/listinfo/delphi