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

Mark Jones Accepted Answer Pending Moderation
  1. Wednesday, 15 February 2023 15:14 PM UTC
  2. PowerBuilder
  3. # 1

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.

 

Mark

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 28 March 2022 20:03 PM UTC
  2. PowerBuilder
  3. # 2

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. # 3

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

 

Happy Monday!

MJ

Comment
  1. Miguel Leeuwe
  2. Wednesday, 3 August 2022 14:45 PM UTC
When looking at your exported dw syntax, you have them set to PBUnits (0). "datawindow(units=0"
  1. Helpful
  1. Mary Jane Foster
  2. Wednesday, 3 August 2022 16:22 PM UTC
Hello Miguel:



We reset to Pixels as you suggested and unfortunately we aren't seeing a different - the images remain fuzzy.



I will take all the suggestions we can get... what else have you got for me? :-)



MJ
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 3 August 2022 20:31 PM UTC
check what the expression to size the images are doing. Try to not set the sizes dynamically?

Can you make all the images have the same size?

Use the attribute "Originalsize" to first have the image adapt itself to its optimal size, but after that un-check that box and then save the datawindow. I've seen fuzzy images when you let it be checked.

regards,

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

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: 1.0.0.1, 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.

MJ

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



Regards,

Ken
  1. Helpful
There are no comments made yet.
Mary Jane Foster Accepted Answer Pending Moderation
  1. Tuesday, 21 February 2023 19:36 PM UTC
  2. PowerBuilder
  3. # 6

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.

 

MJ

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.