1. Dean Helsley
  2. PowerBuilder
  3. Wednesday, 24 February 2021 23:28 PM UTC

I have some gauges that are rendered using E-Charts.  I first got them working by modifying the new demo application, then added them to one of our applications.  Both work just fine when running from the IDE.  I made an EXE of the demo application and it also works.  When I deploy our application, I get an error message for each gauge (I attached a sample of one of them).  It must be a deployment issue, but I can't figure out what's missing.

The one difference between the compiled Demo app and our application is that we have the PB runtime files deployed to the application folder.  After reading through some other questions, I checked the installed "Runtime 19.2.0.2670" folder and copied the "pbcef" folder to our application folder (as a subfolder, just as it is in the runtime folder).  The EvaluateJavaScriptSync messages go away, but the gauges are blank after a 30+ second pause.  There are 5 gauges and it feels like something is attempting to do some work and then timing out.  I must be overlooking something very simple.

Any help would be greatly appreciated.

 

Attachments (1)
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Thursday, 25 February 2021 05:12 AM UTC
  2. PowerBuilder
  3. # 1

Hi Dean,

Please make sure the PB runtime files deployed to the application folder are version 2670, please try to copy all runtime files from the installed "Runtime 19.2.0.2670" folder to replace files in the application folder.

BTW, starting from version 2019 R3, the PowerBuilder runtime files are provided as an installable independent component in the PowerBuilder Installer. You can install PB runtime on the client machine directly. Please refer to the article below for more detail.
https://docs.appeon.com/pb2019r3/application_techniques/ch09s02.html#Installing_PowerBuilder_Runtime

Regards,
ZhaoKai

Comment
There are no comments made yet.
Dean Helsley Accepted Answer Pending Moderation
  1. Thursday, 25 February 2021 15:15 PM UTC
  2. PowerBuilder
  3. # 2

I copied all files from the runtime folder to the application folder and the result is the same, a long delay where nothing appears to be happening and the webbrowser objects end up blank.

Comment
There are no comments made yet.
Dean Helsley Accepted Answer Pending Moderation
  1. Thursday, 25 February 2021 17:16 PM UTC
  2. PowerBuilder
  3. # 3

I copied just the application files to a new folder and it worked fine.  I started adding files from the actual application directory (not any of the PB runtime), thinking that maybe another DLL was causing a problem.  When none of those caused the gauges to stop working, I started grasping at straws and then I found it.  We have a PB.INI with only one setting:

UseHwnd=no

We've used this for a long time to reduce memory requirements because we use a lot of datastores.  If I comment that line out in the application folder, the gauges render.  To me, that's a bug, hopefully one that can be fixed because we need keep using that setting.

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 25 February 2021 19:45 PM UTC
Hi Dean, There is demo app we include in PB 2019 R3 that also has Google Charts example. See if there is such issue in the Google Charts example. It may be incompatibility between Apache ECharts and this PB setting rather than a bug of PowerBuilder product.
  1. Helpful
  1. Dean Helsley
  2. Thursday, 25 February 2021 21:18 PM UTC
I may be overlooking it, but I don't see anything like the Echarts ring gauge in Google Charts. In our application, the gauges come up blank if that setting is in the PB.INI. Also, I just discovered that they DO appear if you resize the window. I could get around it by manually triggering a resize after the application opens, but that won't fix the extremely long pause the first time those gauges are created (again, only with that PB setting).



Since the PB.INI is just directing how PowerBuilder behaves, I don't see how this isn't a problem with the product itself.

  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 25 February 2021 21:55 PM UTC
Please open a support ticket and our team will double-check to see if it really is a bug of PB. Thanks.
  1. Helpful
There are no comments made yet.
Dean Helsley Accepted Answer Pending Moderation
  1. Thursday, 25 February 2021 22:05 PM UTC
  2. PowerBuilder
  3. # 4

I profiled the function that creates the gauges.  I can attach screen shots if you like, but here are the numbers.  This is all happening in n_webbrowser that I copied from the demo app.  There are 2 entries for webbrowser.evaluatejavascriptsync, one with 5 calls and one with 35 calls. 

With the setting UseHwnd=no commented out, these are the stats:

webbrowser.evaluatejavascriptsync    5 calls    0.79 seconds
webbrowser.evaluatejavascriptsync   35 calls   0.74 seconds

When the setting is not commented:

webbrowser.evaluatejavascriptsync    5 calls    5.0 seconds
webbrowser.evaluatejavascriptsync   35 calls   35.0 seconds

Other than taking more than 20 times longer, the one thing that jumps out to me is that each call is taking exactly one second.  That seems highly unlikely unless there is a one second timeout waiting on something, whatever that might be.

 

 

Comment
  1. Ankur Patel
  2. Thursday, 5 May 2022 04:29 AM UTC
Hello Dean,



Is it possible to share your sample application in which you have replicated the issue? We are planning to start using UseHwnd=no for our application so we just want to make sure we go through all the side effects this setting causes.



Thanks,

Ankur



  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.