1. Antonis Barboutis
  2. PowerBuilder
  3. Friday, 3 June 2022 07:38 AM UTC

Hello , we have a very weird random bug in our PB2021 application . In some rare cases the windows loses their style and become uncontrollable. It happens in a number  windows. The bug affects all window controlls (datawindows and window controlls) . We had migrated our application from Pb10 to PB2021 . We didn't had this issue before.

 

 

Attachments (2)
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 October 2022 14:42 PM UTC
  2. PowerBuilder
  3. # 1

Hi Markus;

   After last weekend helping Venu ( https://community.appeon.com/index.php/qna/q-a/application-crashed-before-reaching-the-powerbuilder-gdi-resource-limit ) with his App issues - which had this same GSI issue that led to crashing - he used my STD Framework's GDI tracking code to narrow down his problem.

  Feel free to use may latest framework code for this ( which is PB2022 based ) ...

https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta

Regards ... Chris

PS Low GDI resources can also lead to improper GUI displays in your PB App!

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 13 October 2022 15:19 PM UTC
PS: Markus just opened Ticket # 9171. I just confirmed his test case on PB 2021/2022 runtime on W10 & W11 ...

When a Datawindow with a control in its summary band and transparency is set for the summary background color, the PB runtime will consume large amounts of GDI objects when being resized.

  1. Helpful 1
  1. Markus Eckert
  2. Friday, 14 October 2022 11:29 AM UTC
Hi Chris

We actually had two different issues with excessive GDI object usage. One was related to the bug report I submitted, the other was an issue where we didn't clean up our objects properly and eventually ended up with a giant bunch of dataobjects still in memory which used up the GDI objects.



But no matter the actual root cause, sudden visual corruption immediately raises GDI alarm flags.
  1. Helpful 1
There are no comments made yet.
Markus Eckert Accepted Answer Pending Moderation
  1. Thursday, 13 October 2022 11:42 AM UTC
  2. PowerBuilder
  3. # 2

This looks similar to an issue we had in our application when it ran into Windows' 10000 GDI Object per Process limit. The moment you run into that limit, everything starts looking weird and your program is quite likely to crash soon after.

 

If you open Task Manager, go to the Details tab and add the "GDI Objects" column you can check if you've hit that limit.

You can also check if the number of GDI objects gradually increases during runtime. If yes you might have a problem with some datastores or graphic objects not getting cleaned up properly.

Comment
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 October 2022 06:27 AM UTC
  2. PowerBuilder
  3. # 3

Hi Antonis,

First, I suggest you check if it’s caused by the PB code. You can try this:
1. In the window’s DoubleClicked event, use a messagebox function to show the current window’s properties such as Height, Width, and ControlMenu to see if something is abnormal.
2. Then use the Move() and Resize() functions to correct the abnormal values of the window’s position and size and see if it then displays without the problem.
If the above can make the window display normally again, you should check your code to solve the problem, especially the Resize event.

Secondly, I suggest you set accessibility=0 in pb.ini to see if it resolves the problem. For details please refer to:
https://www.appeon.com/developers/get-help/knowledgebase/negative-impact-accessibility-application-performance.html 

Regards,
Ken

Comment
There are no comments made yet.
Shenn Sellers Accepted Answer Pending Moderation
  1. Friday, 3 June 2022 14:53 PM UTC
  2. PowerBuilder
  3. # 4

I've had this happen before and it was a case of older PB drivers being in the path.  I had to remove all the PB drivers on the deployed computer and then copy back over the correct ones.  I was never able to narrow it down to which specific driver, so doing the nuclear approach worked.  

Comment
There are no comments made yet.
Antonis Barboutis Accepted Answer Pending Moderation
  1. Friday, 3 June 2022 13:46 PM UTC
  2. PowerBuilder
  3. # 5

Hi John ,

The enlarged font is because i accidentally zoomed when i took the screenshot  , i re-uploaded a more appropriate image. DPI setting is 100% , the application is a classic powerbuilder client application running locally. When this bug occurs it affects some windows , not all , restarting the app fixes the problem. 

I didn't tried the compatibillity settings , the application runs mostly on windows 10 machines. The only thing that i am not sure we do right is that we have the runtimes folder in the app folder and we specify the path relative to the exe path , like the example bellow. 

<?xml version="1.0" encoding="utf-8" ?>
<Application>
<RuntimePath>./runtime</RuntimePath>
</Application>

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 3 June 2022 13:32 PM UTC
  2. PowerBuilder
  3. # 6

Hi, Antonis -

When this occurs, what is the Windows DPI setting? 100%? or something different?

Do you see this only in the deployed app? Is the app running on a Citrix server or via Remote Desktop?

When this occurs, does it occur continuously across all windows in the app or only sporadically for some windows?

The enlarged fonts being shown in the same size fields (column objects, single-line edits, etc.) makes we wonder if this could be related to DPI behavior.

Have you inspected or tried changing the compatibility settings? Right-click the app's desktop icon, select the "Compatibility" tab (an example is shown below):

Regards, John

Comment
There are no comments made yet.
Antonis Barboutis Accepted Answer Pending Moderation
  1. Friday, 3 June 2022 09:53 AM UTC
  2. PowerBuilder
  3. # 7

Thanks Antreas , 

We do not depend on any framework , just powerbuilder.

We have windows resize code in our windows but so far we didn;t have any issue . The "zoom" is because i zoomed accidentally when i taked the screenshot.

The issue is very strange and i cannot reproduce it in the office. Memory consumption is fine

Comment
  1. Andreas Mykonios
  2. Friday, 3 June 2022 10:06 AM UTC
I guess you don't use themes...

I've seen similar problems in the past, but it was usually related to memory issues. Haven't seen it with PB 2021...

What is the exact version of pb you are using? Are you deploying the exact same version of runtime to client pc's?

Andreas.
  1. Helpful
  1. Antonis Barboutis
  2. Friday, 3 June 2022 11:02 AM UTC
No we don't use themes ,we use the latest Build 1509 and the runtime is 21.0.0.1509. All the clients use the latest version with the latest runtimes.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 3 June 2022 13:29 PM UTC
Hi Antonis .. my best guess is that this is an MS-Windows Setting issue (ie: Magnification, Language, Region, Default Printer, etc) that is somehow distorting how the PB App is drawing the screen. Just my $0.02 FWIW
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 3 June 2022 09:36 AM UTC
  2. PowerBuilder
  3. # 8

Hi Antoni.

Does your application depends on any framework? If yes, which?

Have you coded resize events anywhere? Also, one thing that looks strange is that in the screen capture where that issue appears it seems that the zooming changes...

Do you see memory consumption increasing with no reason?

Andreas.

Comment
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.