1. Andrew Davis
  2. PowerBuilder
  3. Thursday, 28 January 2021 17:46 PM UTC

Hi All

Hope you are well, I have a compiled programme in 2019 build 2170 32bit compile 

When i quit my programme ( halt close )

The programme seems to quit but if i look at task manager the programme is still listed as running 

This is on windows 7 32bit 

 

Any ideas whats wrong or how i can troubleshoot ? 

 

regards and thanks in advance 

Andrew

 

Chris Pollach Accepted Answer Pending Moderation
  1. Thursday, 28 January 2021 18:17 PM UTC
  2. PowerBuilder
  3. # 1

Hi Andrew;

  Sounds like the App is waiting for something from one of your App's open instance classes during the Close operations.

  Does the App close OK  using only the HALT command?

  Does the App's "Halt Close" work OK on W10?

Regards ... Chris

Comment
  1. Andrew Davis
  2. Thursday, 11 February 2021 13:05 PM UTC
Chris,



So doing a just Halt - does terminate the App

It does not terminate on win10 on halt close



is there harm in just using Halt without the close - assuming i disconnect databases ?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 11 February 2021 14:16 PM UTC
Hi Andrew;

The only possible side effect of a HALT vs HALT CLOSE command is that your DBMS "transaction in progress" might be rolled back vs committed and/or saving settings to the registry / INI file could be bypassed.

Regards ... Chris
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 05:45 AM UTC
  2. PowerBuilder
  3. # 2

Hi Andrew,

Do you use SharedObjects? If so it may be that there is still a shared object running.

Regards,

René

Comment
There are no comments made yet.
Andrew Davis Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 10:02 AM UTC
  2. PowerBuilder
  3. # 3

Chris / Rene 

 

Thanks for you help as always.

I will test the halt only and the w10 and let you know.

Is there a way to check / debug what is not closing ?

 

regards

Andrew

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 11 February 2021 20:46 PM UTC
Hi Andrew ... Just a PS on the HALT CLOSE option. FWIW: I would implement Application Logging like you see in my STD Framework . In "debug" mode I log all Window Open & Close events. Since I do not use MessageBox() commands, the closures are not affected but the log now gives me a trace of the user's activity and proper window & control behaviour, GDI resources used, Address space memory used, Process resources used, etc.

FYI: http://chrispollach.blogspot.com/2021/01/2020r2.html

Tip: Click on "Example of enhanced logging!" image

Food for thought. ;-)

Regards ... Chris
  1. Helpful
There are no comments made yet.
Andrew Davis Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 16:07 PM UTC
  2. PowerBuilder
  3. # 4

Update

without the close on the halt close - the application terminates

So i did some testing running the application within powerbuilder ide using the debug mode.

I put the debug in the application close event - which i have added as a very last line -

messagebox("programme finished","press ok")

this comes up i click ok - but the debugger stays on that line - where i assume it should finish / end - the only way to continue is to 'stop debugging'

So i presume that something is not unloading - is there anyway at this stage i can see what is loaded - not closed etc.

thanks

 

Andrew

Comment
  1. Chris Pollach @Appeon
  2. Friday, 29 January 2021 19:39 PM UTC
Hi Andrew;

Yes, using a MessageBox() command to then try & open a Response window during an App close operation is really dicey. Especially as you move from PB release to release and/or MS-Windows release to release as this often changes timing of when some events occur and even the order of the events firing remember that PB vents are activated based on the Windows Message Queue and when a MsgID arrives from the O/S). I have found too that this can also change in 32 vs 64 bit EXE executions as well.

So my advise would be to only use a MB() command in a CloseQuery event and for the Close event(s) themselves, just LOG the information to a App log file or the O/S's event log. No GUI interaction. Just my $0.02. HTH

Regards ... Chris
  1. Helpful
  1. Andrew Davis
  2. Wednesday, 3 February 2021 18:30 PM UTC
Chris

Thanks for the info good to know, I only added the messagebox to see if i could try to see what was happening and see if the close event was completing which it seems to be



How can i tell what is still open / objects in memory etc. It seems that when running through the ide/debugger its not terminating properly either.



regards



Andrew
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 3 February 2021 19:36 PM UTC
Hi Andrew;

The use of the debugger in a Close, De-activate / Activate or Focus / LooseFocus event has always been dicey. That has been well documented for decades in the PB help under the related debugging sections. At best case, you might get through one of these events once - but typically, not a 2nd time.

Regards ... Chris
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.