Sometimes I get an AVE when I start up the Delphi (D4) application. It seems to occur mostly when the IDE has many forms and units to load into the editor. Some of the forms have OnCreate (and even a Loaded) event procedures, and they must be created in a specific order as they are in the Project. Is it possible that the IDE is loading the forms in a different order and trying to perform the OnCreate procedure? When the AVE occurs, it often messes up the location of the Messages, Object Inspector, etc. I cannot always reproduce the error. Usually I can close the Delphi application and reopen it without problems. It seems more likely to happen after I have done some debugging and running of my application. This has happened off and on since I first started to develop this fairly complex "Ortmaster" application. I did a lot of things wrong as I was learning Delphi and OOP, but I think I've cleaned up those errors. It does not happen quite as often as it once did, and some problems I previously experienced (particularly "phantom breakpoints"), have not been happening now. One other odd behavior I saw recently was an extreme sluggishness after my program ran for 20+ hours. During that time it was reading and processing data from a USB Serial port running at 57.6 kB with characters being received at 4800 per second. The SerialNG component's Receive buffer had not overflowed, and there were no other Comm errors indicated in my Comm Status list. However, I was unable to access my dialup connection, and other simple processes seemed to be bogged down, until I closed my application (and maybe also Delphi). When bogged down, I noticed a lot of HDD activity. My guess is that most of the system resources were being used, and there was a lot of disk memory access. Any ideas on how to track this down? Thanks, Paul
![]() |
0 |
![]() |
Paul E. Schoen wrote: > Sometimes I get an AVE when I start up the Delphi (D4) application. It > seems to occur mostly when the IDE has many forms and units to load > into the editor. Some of the forms have OnCreate (and even a Loaded) > event procedures, and they must be created in a specific order as > they are in the Project. Is it possible that the IDE is loading the > forms in a different order and trying to perform the OnCreate > procedure? > > When the AVE occurs, it often messes up the location of the Messages, > Object Inspector, etc. I cannot always reproduce the error. Usually I > can close the Delphi application and reopen it without problems. It > seems more likely to happen after I have done some debugging and > running of my application. > > This has happened off and on since I first started to develop this > fairly complex "Ortmaster" application. I did a lot of things wrong > as I was learning Delphi and OOP, but I think I've cleaned up those > errors. It does not happen quite as often as it once did, and some > problems I previously experienced (particularly "phantom > breakpoints"), have not been happening now. Delphi 4 was horrible in terms of IDE errors. > One other odd behavior I saw recently was an extreme sluggishness > after my program ran for 20 hours. During that time it was reading > and processing data from a USB Serial port running at 57.6 kB with > characters being received at 4800 per second. The SerialNG > component's Receive buffer had not overflowed, and there were no > other Comm errors indicated in my Comm Status list. However, I was > unable to access my dialup connection, and other simple processes > seemed to be bogged down, until I closed my application (and maybe > also Delphi). When bogged down, I noticed a lot of HDD activity. My > guess is that most of the system resources were being used, and there > was a lot of disk memory access. Any ideas on how to track this down? Check your memory handling by some kind of memory checker (can't remember any name except MemProof right now, as I have of course never needed anything like this. Other programmers in this group may give other names, or a simple google search for "delphi" and "memory checker" or similar). -- Bj�rge bjorge@haha_itte.no
![]() |
0 |
![]() |
On Feb 13, 10:55 pm, "Bj=F8rge" <bjo...@itte.no> wrote: > Paul E. Schoen wrote: > > Sometimes I get an AVE when I start up the Delphi (D4) application. It > > seems to occur mostly when the IDE has many forms and units to load > > into the editor. Some of the forms have OnCreate (and even a Loaded) > > event procedures, and they must be created in a specific order as > > they are in the Project. Is it possible that the IDE is loading the > > forms in a different order and trying to perform the OnCreate > > procedure? > > > When the AVE occurs, it often messes up the location of the Messages, > > Object Inspector, etc. I cannot always reproduce the error. Usually I > > can close the Delphi application and reopen it without problems. It > > seems more likely to happen after I have done some debugging and > > running of my application. > > > This has happened off and on since I first started to develop this > > fairly complex "Ortmaster" application. I did a lot of things wrong > > as I was learning Delphi and OOP, but I think I've cleaned up those > > errors. It does not happen quite as often as it once did, and some > > problems I previously experienced (particularly "phantom > > breakpoints"), have not been happening now. > > Delphi 4 was horrible in terms of IDE errors. > > > One other odd behavior I saw recently was an extreme sluggishness > > after my program ran for 20 hours. During that time it was reading > > and processing data from a USB Serial port running at 57.6 kB with > > characters being received at 4800 per second. The SerialNG > > component's Receive buffer had not overflowed, and there were no > > other Comm errors indicated in my Comm Status list. However, I was > > unable to access my dialup connection, and other simple processes > > seemed to be bogged down, until I closed my application (and maybe > > also Delphi). When bogged down, I noticed a lot of HDD activity. My > > guess is that most of the system resources were being used, and there > > was a lot of disk memory access. Any ideas on how to track this down? > > Check your memory handling by some kind of memory checker (can't remember > any name except MemProof right now, as I have of course never needed > anything like this. Other programmers in this group may give other names,= or > a simple google search for "delphi" and "memory checker" or similar). > > -- > Bj=F8rge > bjorge@haha_itte.no- Hide quoted text - > > - Show quoted text - Hi You could try the following - I dug it out of some old code - you might need to check on 'uses' needed. procedure LogMemory(PosMessage: string); var MS: TMemoryStatus; begin MS.dwLength :=3D SizeOf(MemoryStatus); GlobalMemoryStatus(MS); EventLog(Format('%8s %8s %-s', [DateToStr(Date), TimeToStr(Now), PosMessage + ' ' + FormatFloat('#,###" KB"', MS.dwAvailPhys div 1024)])); end; ps event log is my routine to write a message to a file .
![]() |
0 |
![]() |