cancel
Showing results for 
Search instead for 
Did you mean: 

log a list of active windows/objects?

Former Member
0 Kudos
59

Hi All,

We have a application also run in windows sheduled tasks to do some automated tasks. On some tasks, the exe is not shutting down after his work and we don't know why. If the exe is stopped in a Windows session, there is nothing to see(no window, nothing in Win bar) except the exe in the task manager. The close event from the application is not executed and when we added a 'halt close' in the last function: the close event is fired, but the .exe still hangs. It's happening in less then 1% of the runs and it's hard to reproduce.

Can the application made a list of valid objects/windows when he has done with his jobs? If we log this, it maybe help us to find what the exe is prevent to close.

causes:

- invisible sheet window?

- timer?

- geturl? is used for downloading pdf's,

- ???

Powerbuilder 11.5 build 4608

SQL server 2008 R2 (SQLNCLI10)

run on windows server 2008 R2

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

We 've made descendant response windows from main windows, they closes when their job is done (with a close(this) in the open event). The main function(in a nvo) will open the next window when the previous window is closed. It's a serial proces.

I'll adding these logs to our ancestor, but I think the problem is a nvo, not a window. Is it possible if all windows are closed and all events/functions are done, the application close not happens?

Former Member
0 Kudos

FWIW: I seem to recall a fixed issue on this problem back into the PB 11.5 days that was fixed in 11.5.1 and 12.0. I could be wrong - but, this sure sounds familiar.

Suggestion: Use the Yield ( ) and GarbageCollect ( ) methods and then HALT (no close).

Former Member
0 Kudos

Do the same with the constructor & destructor on the NVOs if you think they are the problem. Don't forget to destroy your NVOs after you are done with them.

Former Member
0 Kudos

Hi Danny

I think we need to know a little more about what happens when your application ends its functions. Are multiple windows opened? If so what closes them?

You could add some code in the ancestor window open / close events to log the window opening and closing to a log file and this might give you an idea of what is left open.

HTH

David

Former Member
0 Kudos

Hi Danny;

   I do this in my Integrated Foundation Class framework for PB & Appeon. I log the open & close of every window plus I have a Window Handler that automatically tracks all instantiated Window Classes and can close them all on one request. The framework also works with Appeon Web and Appeon Mobile - so the same rigorous Window tracking can be done inside a Web application or a Mobile one (iOS or Android). 

  Feel free to download the FC's and sample OrderEntry application. If you like the code - please feel free to either use the FC's (they are free) or adopt the coding that you need to your application! 

HTH

Regards ... Chris