Delphi app not always closing properly

I am the developer of a widely distributed application written in Delphi 5.
Recently there have been some reports from users that when closing the app,
it remains in the taskbar and can only be terminated using Task Manager. I
have occasionally seen this myself and have also seen an instance where it
wasn't in the taskbar but the process was still running, but I haven't found
any specific action that causes it. This has only been happening for the
last few months so I assume it has something to do with a recent code
change, but I don't know exactly what causes this and have no idea how to
search for the possible cause. I would appreciate any hints on what causes
this and how to find the part of the code that needs fixing.
0
Glenn
6/24/2009 5:30:45 PM
embarcadero.delphi.rtl 934 articles. 0 followers. Follow

1 Replies
614 Views

Similar Articles

[PageSpeed] 37

Glenn Alcott wrote:

> I am the developer of a widely distributed application written in
> Delphi 5.  Recently there have been some reports from users that when
> closing the app, it remains in the taskbar and can only be terminated
> using Task Manager. I have occasionally seen this myself and have
> also seen an instance where it wasn't in the taskbar but the process
> was still running, but I haven't found any specific action that
> causes it. This has only been happening for the last few months so I
> assume it has something to do with a recent code change, but I don't
> know exactly what causes this and have no idea how to search for the
> possible cause. I would appreciate any hints on what causes this and
> how to find the part of the code that needs fixing.

The typical cause of this behaviour is that the main thread of the
application waits for a secondary thread to terminate, which fails to
do so. If you use TThread descendents in your app and call Free on one
the destructor will call Terminate and then wait for the thread to
actually finish running until it returns. Even if you don't use threads
in your own code some component or library you use may do so.
Communication libraries are an example of that.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
6/24/2009 6:05:38 PM
Reply:

Similar Artilces:

Delphi app not closing properly
I am the developer of a widely distributed application written in Delphi 5. Recently there have been some reports from users that when closing the app, it remains in the taskbar and can only be terminated using Task Manager. I have occasionally seen this myself and have also seen an instance where it wasn't in the taskbar but the process was still running, but I haven't found any specific action that causes it. This has only been happening for the last few months so I assume it has something to do with a recent code change, but I don't know exactly what causes this and have no id...

Delphi 2007 RTL in Delphi 7
I read somewhere that it is possible to use Delphi 2007's (or for that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the source of RTL. Is this really possible? What are the benefits that we can derive using a higher version's RTL? TIA Yogi Yang Yogi Yang wrote: > I read somewhere that it is possible to use Delphi 2007's (or for > that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the > source of RTL. If it actually compiles in Delphi 7, I guess it would be possible. OTOH, if one has Delphi 2007 already, I don't s...

delphi 2010 memory not released when closing delphi project
each time im runing delphi 2010 the memory that was used was not release after closing a project and the memory don't stop to grow and the browsing for file becoming slow any idea ? Thanks Pierre Auger wrote: > each time im runing delphi 2010 the memory that was used was not > release after closing a project and the memory don't stop to grow and > the browsing for file becoming slow > > any idea ? You are using some 3rd-party components that do not properly release memory in their design-time packages would be my guess. A design-time package stays l...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

I have Delphi 2010 which includes c++, but it always loads as Delphi
Hi there, I have Delphi 2010 which includes c++, but it always loads as Delphi. How do I forced to load as c++? Thanks for the help Jorge <Jorge Uriarte> wrote in message news:393178@forums.embarcadero.com... > I have Delphi 2010 which includes c++, but it always loads as Delphi. How > do I forced to load as c++? Did you actually install the C++ personality? Are you loading the IDE using the "Delphi 2010" shortcut (which loads bds.exe with the "-pDelphi" command line parameter)? You should be using the "C++Builder 2010" shortcut (...

problem delphi 2010 apps with a delphi 5 pro Pchar
Hallo I build on till now alle tools and programas with delphi 5 pro now i have delphi 2010 want don't want rewite alle my DLL Tools Like The tool i made for making PDF In case of This DLL i can't becose the vcl i use in delphi 5 will not work in delphi 2010 *This call in apps* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall external 'GUPPDF2.dll'; {code} *In delphi 5 DLL* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall; {code} if call the function i get a "Access violation" i think that the settings parameter empty is...

How to build enterprise-grade Delphi app
Hi It would be nice to build enterprise-grade appl with Delphi, but are the options or third party software (like in J2EE) to do this? e.g. 1) there is J2EE middleware for hosting components - developer is not required to handle all the issues that are connected with session handling and different contexts in which the components can be stored (like application, session, request context, etc.). I understand that some of this can be done in DataSnap or in Web Services (can be even PHP, Java or .NET) and Delphi client - but in both cases there are some drawbacks: - for DataSnap - much shou...

Delphi 2010: AV when switching from Default to debug layout and when closing Delphi
Hello, I experience strange AVs in rtl140.bpl when switching from the Default to the Debug Layout (e.g. when starting the application) or when closing Delphi 2010. I have a bunch of Addins (Modelmaker Code Explorer, EurekaLog, DDevExtensions, JCL, etc...), components installed. Any ideas/tools to possibly track down where the culprit is? Possibly simply an addin in combination with docked windows etc. Thanks, Thomas > {quote:title=Thomas Steinmaurer wrote:}{quote} > I experience strange AVs in rtl140.bpl when switching from the Default > to the Debug Layout (...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

How to fully close a Delphi-XE5 Android App?
This has been asked before but not fully answered. I want to exit an app for two reasons. 1. on startup if problems with the data files and (I'd also like to know to handle this case on IOS too!) 2. from a back-button press Other answere here and elsewhere got answers of using: SharedActivity.Finish; or MainActivity.Finish; Both appear to close the window but neither exit the application as in debug mode the program does not end in Delphi and the application is still running on the device itself. The apps seem to eventually go away when in that state, but if you tr...

Close Delphi XE4 Metro App With Touch
When you create a Metro application with Delphi XE4 it does not act like a normal Metro application because you can *not close the application with a finger swipe from the top of the screen to the bottom of the screen*. All of the Metro apps I have that came with windows actually close with touch this way. You are returned to the Start screen... then if you go to the desktop the app is no longer running. When you close a Delphi Metro application with a swipe from the top of the screen to the bottom of the screen it returns you to the Start screen. If you then go to the desktop.. the applicat...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

Delphi 2007 to Delphi 7
I've written a class in Delphi 2007 that is not supported in Delphi 7. What would be the best way to achive what I've done in Delphi 2007 in Delphi 7? Thanks, Tom type BondConstants = class { Bond Types } type BondType = record const TREASURY = 3; AGENCY = 0; CORP = 1; MUNI = 2; SBA = 5; MBS = 4; CMO = 6; end; { Day Count Methods } type DayCount = record const ACTUAL_360 = 2; ACTUAL_365 = 1; ACTUAL_ACTUAL = 1; d30_360 = 0; ...

Delphi XE / Delphi 2010
Hello! I noticed that Embarcadero® Delphi® 2010 Version is not on the list of products on Embarcadero page. Or is it still possible to buy it? Will RAD Studio XE compile programs written in Delphi 2010 without problems.? Thanks. Am 13.09.2010 09:04, schrieb Petra Nemec: > Will RAD Studio XE compile programs written in Delphi 2010 without problems.? As always you will probably have to recreate the projects as the import is still a bit -- special. Christian Hello! Does anybody know if it is still possible to get a Delphi2010 trial version (if yes where)? ...

Web resources about - Delphi app not always closing properly - embarcadero.delphi.rtl

Statement of Disaffiliation from the GUU regarding failure to properly address Misogynistic behaviour ...
Glasgow Uni Coalition of Resistance hat eine Notiz mit dem Titel Statement of Disaffiliation from the GUU regarding failure to properly address ...


The real value of bitcoin and crypto currency technology - Bitcoin Properly - YouTube
Bitcoin in five minutes: Blockchain technology will drastically change our lives. In the coming years, the technology behind crypto currencies ...

Michael Schumacher paralysed and unable to walk or talk properly: friend
Michael Schumacher is paralysed and still has difficulty with his speech and memory almost a year after a freak skiing accident, good friend ...

Do you use apostrophes properly?
Sadly, too many of us can't.

Myki still a disaster, and Public Transport Victoria is not monitoring it properly: Auditor-General
The authority managing Victoria's public transport network does not have a &quot;complete and reliable picture of myki's operational performance&quot;, ...

Bill Shorten should resign after failing to properly disclose donations, says former ALP national secretary ...
A former national secretary of the Australian Labor Party, Bob Hogg, has called for Opposition Leader Bill Shorten to resign, accusing him of ...

Perth's Swan River not properly protected: report
The Swan-Canning river system in Perth is not being properly protected despite conservation efforts made by the Swan River Trust, a new report ...

Fracking's effect on water not properly monitored, report finds
A new report commissioned by Environment Canada says there's little information about the effects of shale gas development on the environment. ...

'We want to know how to love them properly,' veteran's spouse says
A day after confronting the Veterans Affairs minister over lack of support for veterans’ caregivers, the wife of a former Canadian Forces sergeant ...

Resources last updated: 12/3/2015 3:12:59 PM