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!


Mary Jane Foster Accepted Answer Pending Moderation
  1. Tuesday, 21 February 2023 19:36 PM UTC
  2. PowerBuilder
  3. # 1

Hi Ken:
I'm sorry I am not replying directly to you, it wouldn't allow me to add a screenshot there.

First, we cannot consistently reproduce it, and even if we could our application is huge and based on a multi GB database. BUT, I have noticed something with this particular crash, right before the system crashes, it spawns up another application with no username, and memory associated with it (see the one outlined in red in the screenshot).  What would cause this to happen?  It might be the clue to finding a solution.



There are no comments made yet.
Mark Jones Accepted Answer Pending Moderation
  1. Wednesday, 15 February 2023 15:14 PM UTC
  2. PowerBuilder
  3. # 2

One trick we use to improve image quality is to set their transparency=1.    Images like this are rendered slightly differently as they need to blend with their background and end up with edge smoothing and seem to look a lot better.   Unfortunately you cannot do this with images rendered via computed fields using the bitmap() function or images on buttons.



There are no comments made yet.
Mary Jane Foster Accepted Answer Pending Moderation
  1. Tuesday, 31 January 2023 15:04 PM UTC
  2. PowerBuilder
  3. # 3

Hi all:

Quick update.  We've been beta testing a version without out 3rd party image tool and, as far as functionality goes, it is ok, but we aren't sure yet whether or not it is better with the 3rd party image tool or just PB.  There is still a memory leak, and while we are still experiencing crashing, we've confirmed it isn't because of the GDI Object count (which research indicated that was a contributing factor to the prior version).  With both versions we experiencing crashing in about the same amount of time.  Because the PB_HEAP_LOGFILE isn't an option (resolving that issue has been moved to 'enhancements'), I've gone to the Event Viewer and the message is consistently the same. 

I will post it here in case anyone has any suggestions - or, if you feel it better I create a separate post, I will do so:

Faulting application name: a_replace.exe, version:, time stamp: 0x625eda81
Faulting module name: KERNELBASE.dll, version: 10.0.19041.2364, time stamp: 0x5b7d4d22
Exception code: 0xc000041d
Fault offset: 0x000000000002cd29
Faulting process id: 0x3500
Faulting application start time: 0x01d934d7cbf4855c
Faulting application path: [our builds path]

Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: fac85f41-0bc7-45fb-b0ff-780702f0cd89
Faulting package full name:
Faulting package-relative application ID:

If anyone has any suggestions or has experienced the same issue, I'd love to hear them!

Thank you.


  1. Ken Guo @Appeon
  2. Wednesday, 1 February 2023 01:26 AM UTC
Hi Mary,

We couldn’t figure out the root cause of this problem just based on your description.

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.


  1. Helpful
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. # 4

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.