1. Mary Jane Foster
  2. PowerBuilder
  3. Monday, 28 March 2022 19:08 PM UTC

UPDATE:  We resolved this by doing away with the third party image object and began using PowerBuilder's web object..  Thank you all.

 

Hello PB Community!

Since migrating from PB2017 to PB2021 we've begun experiencing what seems to be an issue with memory with our executables (which are 64 bit BTW).  We have a 3rd party image display system sitting on an OLE object that, after time, the PowerBuilder buttons and fonts become larger, and bold, and the images start to not come up, or some do and some don't.  So, I started monitoring the memory (what little I know about it is about ready to be evident) in the Resource Monitor.    What I see happening is when we open the the window the thread count increases by 6 or 7, and when we close said window (with objects being destroyed and garbage collection, etc.), the thread count only diminishes by 3.  

Once that thread count reaches between 200 & 250 (rough numbers, it varies I'm sure because other things are happening on the system) we start experiencing the odd behavior and the only way to remedy it is to completely shut down and restart the application.

I've gone back to our PB 2017 built application and monitored the same activities and the thread count behavior is what you would expect it to be.  Increases by 3, then decreases by 3 when we close the application.  I have yet to be able to get the thread count over 15.  No code changes were made prior to the migration, so the code base is identical.

Any thoughts, suggestions, offers of tequila would be appreciated!  Truly.

Happy Monday!

MJ

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 28 March 2022 20:03 PM UTC
  2. PowerBuilder
  3. # 1

Hi MJ;

  Sounds like maybe a 64bit OLE issue (as a guess). Is the PB 2017 Rx based version of the App 64bit as well?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Monday, 28 March 2022 20:28 PM UTC
Interesting! BTW: Are you on the latest MR for PB2021 - build 1506?
  1. Helpful
  1. Mary Jane Foster
  2. Monday, 28 March 2022 20:39 PM UTC
Not yet. We are still on 1311. And thank you for the quick replies, they really are appreciated.



MJ
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 31 January 2023 22:18 PM UTC
I would strongly suggest getting on the latest MR ASAP & then retry.
  1. Helpful
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 29 March 2022 08:44 AM UTC
  2. PowerBuilder
  3. # 2

Hi Mary,

I suspect the issue may have something to do with PB 2019 R3 starting to support UI Automation. So I suggest you try this:

1. Open the PB IDE pb.ini file (C:\Users\%username%\AppData\Local\Appeon\PowerBuilder 21.0\pb.ini). Add ACCESSIBILITY=0 under the Data Window node and then try again:
[Data Window]
ACCESSIBILITY=0

2. If you compile your application to an EXE to run, then you need to add a pb.ini file to the directory where your PBapp.exe resides, and this file contains the following content.
[Data Window]
ACCESSIBILITY=0

If the issue remains, I suggest you submit a bug to the Appeon Support System(https://www.appeon.com/standardsupport/newbug) and upload a small reproducible case there for our analysis.

Regards,
Ken

Comment
  1. Ken Guo @Appeon
  2. Thursday, 31 March 2022 01:52 AM UTC
Hi Mary,



From experience, a meeting right now does little to solve the problem, and providing a small, reproducible case for developers to debug is the most effective way. So I suggest you:

1. Create a small case. Use this OLE in a window and see if it’ll also make the thread count increase.

2. Submit a bug to the Appeon Support system as the issue can be better tracked there.



Regards,

Ken
  1. Helpful
  1. Mary Jane Foster
  2. Tuesday, 5 April 2022 20:35 PM UTC
Hi:

It turned out to be easier to replace the current image gallery with a web version of it utilizing .html than creating a reproducible case. It is currently in QA and then sometime next week to beta. At this time I hesitate to close this request until we have a better idea of the results post testing. Any complaints if I leave it open for a few more days?



Thank you again for all of your help.



MJ
  1. Helpful 2
  1. Armeen Mazda @Appeon
  2. Tuesday, 5 April 2022 21:35 PM UTC
No problem. This site is a tech Q&A not support ticket system. But definitely appreciate you report back so anybody else in the community facing similar situation can learn from this experience. Thanks.
  1. Helpful 2
There are no comments made yet.
Mary Jane Foster Accepted Answer Pending Moderation
  1. Monday, 1 August 2022 12:08 PM UTC
  2. PowerBuilder
  3. # 3

Hi All and thank you for the great suggestions.

Here are the things we have tried, and the results:

  • Image Gallery (ranked in worst to best option so far)
    • Picture List Box - can only show one image per line
    • ListView Object
      • Too slow to render more than 500 images
      • Images are fuzzy
    • Web Control
      • Display is inconsistent; sometimes it does not display all the images and requires a refresh
      • Image quality is good
      • Speed is slower - both the speed to draw initial page and the speed to draw our larger galleries
    • Dynamically create gallery using custom user object 
      • Image quality good
      • Speed is slower when greater than 800 images
    • N-Up datawindow - Display as Picture
      • Speed is good, even on >7K images!
      • Images are poor quality.  Thumbnails are fuzzy and not crisp
        • Tried using larger images
        • Tried using smaller, more optimized images for the gallery size
        • Tried making size displayed bigger - helped marginally, but still fuzzy
        • We believe this is how PB converts the image when using this feature and it looks like we have no control over this, as it is just a checkbox.  Is there anyone out there who knows a way around this?  We believe it is converting the images to a 256 .bmp.