1. Pierre DETE
  2. PowerBuilder
  3. Wednesday, 18 December 2019 15:26 PM UTC

Hello PB users,

With Pb 2017 the busy windows' UI behavior is so different that the process seems to be crashing. It's something quite disturbing for our customers.

With PB 12.5 when a busy window can't respond, nothing appends, so it seems evident you should wait, but with PB 2017 after few seconds a "Not responding" message is added to the window's title with a big red cross and if you start to click on the window it became blur which seems to confirm the process will never stop.

 

What do you think about that? Are you facing the same behavior?

Regards, 

Pierre

 

 

Attachments (1)
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 December 2019 17:40 PM UTC
  2. PowerBuilder
  3. # 1

Hi Pierre,

Are you comparing PB 12.5 to 2017 both on Windows 10 AND on same build #?  Windows 7 vs. Windows 10 build XXXX vs. Windows 10 build YYYY work differently.  We have had customers on Windows 10 that after update something stops working or works differently.

Just so you know, PB hooks into the Windows OS layer for a lot of its functionality, and we didn't code anything special to make the X red color and display the "(Not Responding)" message. This looks to me like Windows OS is doing this.

I have seen other apps on Windows 10 (not developed with PowerBuilder) do exact same thing when a process is taking too long, and sometimes it will come back and sometimes I have to kill the process.

Is there something you can do to optimize the performance of the code so it doesn't tie up the process for so long? 

Regards,
Armeen

 

Comment
  1. Stuart Macandrew
  2. Wednesday, 18 December 2019 22:22 PM UTC
We experienced this as well when our application was run under Windows-10.

This is not Powerbuilder functionality - this is Windows functionality. Powerbuilder applidations are single threaded. If your application stops pumping messages for a threshold period (i.e. your application is busy), then Windows screen-shots your window, hides your window and displays it's screenshot. The screenshot title has "not responding" appended. And it has an X in the title bar to allow the end-user to terminate your hidden application if they wanted. Search on "Windows Ghosting feature" for more information.

You can disable this feature with the Windows API call DisableProcessWindowsGhosting().
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 18 December 2019 22:27 PM UTC
Thanks for confirming this is Windows 10 OS behavior and sharing the workaround to change how Windows 10 behaves.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 19 December 2019 00:42 AM UTC
Great info Stuart, thank you!
  1. Helpful
There are no comments made yet.
John Raghanti Accepted Answer Pending Moderation
  1. Wednesday, 18 December 2019 21:06 PM UTC
  2. PowerBuilder
  3. # 2

We get Not Responding messages in title bars in both 12.5 and 2019. There's no difference.

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 18 December 2019 22:26 PM UTC
Thanks for sharing this feedback John that this is not a PB version specific issue.
  1. Helpful
There are no comments made yet.
Pierre DETE Accepted Answer Pending Moderation
  1. Thursday, 19 December 2019 11:06 AM UTC
  2. PowerBuilder
  3. # 3

Hello,

 

I joined a video to illustrate the question.

https://drive.google.com/open?id=1Iex80Ao-kP7tkkYOifYdTl0Ma4Y_rle9

 

I used the sample C:\Program Files (x86)\Appeon\PowerBuilder 12.5\Tutorial\Solutions and I migrated it to 2017.

I launched  the two versions on Windows 10 Entreprise 1803 build 17134.1184.

in the close event of the w_welcom window there is :

Long ll_i

FOR ll_i = 1 TO 20
Sleep(1)
NEXT

 

After clicking on the closing cross, I clicked everywhere on the window.

As you can see it's a quite different.

I understand it's a Windows behavior but why this difference?

Regards,

Pierre

 

Comment
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Friday, 20 December 2019 05:45 AM UTC
  2. PowerBuilder
  3. # 4

Hi Pierre, 

1. We tested in PB 12.5, 12.6 and 2017 and could also get the ‘Not Responding’ message in the title bars. The results are the same as John’s.

2. And Stuart’s explanation is correct, this is Windows functionality. I confirm that you can use the Windows API to call DisableProcessWindowsGhosting() to work it around.

You can declare like this: SUBROUTINE DisableProcessWindowsGhosting()  library  "User32.dll"   

3. When Windows asks a program to do something, like take a keystroke or close itself, and the program fails to acknowledge that request within a certain amount of time, the program is “Not Responding”. If the program never comes out of that state, we might also call it “hung”, as in “hung up” on something.

There are “legitimate” reasons this can happen. For example, if the program you’re using is doing some very long, CPU-intensive calculation, it might not respond in a timely fashion. An example might be a graphics program performing a reduction or other operation on a large image. If, during that operation, you attempt to close the window and nothing happens, after a few seconds Windows might add “(Not Responding)” to the title bar to indicate that it has tried to pass your request to the application, but the app’s not listening.

Anything that causes the application to stop responding can cause Windows to add the ‘(Not Responding)’ moniker to the title bar.

While it might be considered bad form or bad design to not respond to user input or to Windows while performing lengthy calculations, it’s quite legal and legitimate. Once the calculation is complete, the program starts listening and responding again.

You can also refer to the following links for details.    

https://askleo.com/not_responding_what_does_it_mean_and_what_do_i_do_about_it/ 

https://social.msdn.microsoft.com/Forums/vstudio/en-US/d231c26f-a74f-4f91-9fce-43ec23691b64/title-bar-says-not-responding-but-program-still-working-on-long-process?forum=vcgeneral 

Regards,
Mark Lee

Comment
  1. Pierre DETE
  2. Friday, 20 December 2019 09:58 AM UTC
Hi Mark,

Thank you for useful links and explanations. I just tested DisableProcessWindowsGhosting(), it works and with it I obtain the same behavior as PB12.5. I'm surprise that you can't reproduce my test. Did you see my small video comparison between 12.5 and 2017?

I suppose there is something in 12.5 that do the DisableProcessWindowsGhosting() job.

So we have 2 solutions, either enhance our code to add nice waiting progress bar or plug the DisableProcessWindowsGhosting(). Thank you for your help.

Regards.



  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 20 December 2019 18:54 PM UTC
Hi Pierre;

FWIW: The other alternative where your PB App knows that its going to invoke a long running process is to perform that action in another thread. This would be accomplished by using PB's multi-threading feature, where the min thread delegates long running tasks to a sub-thread. Thus the main thread (your App) still keeps responding to the App user.

FYI: http://chrispollach.blogspot.com/2019/10/std-integrated-framework-multi.html

Food for thought

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.