1. Sathishkumar S
  2. PowerBuilder
  3. Thursday, 2 March 2023 18:49 PM UTC

Hello All,

Our application is getting crashed on the below dlls randomly (PB 2022 build 1892)
PBDWE.dll
PBSHR.dll
LIBCEF.dll
KERNELBASE.dll
PBVM.dll
GDI32full.dll
UER32.dll

Most of the times it happens with PBDWE and PBSHR

I have tried

1. PB Debug which is not giving much info it shows only the dlls list 
2. Profile tracing, the trace file is getting generated with all the PBL names but not showing any other info
When tried to load the trace file from Profile Trace View utility whereas it is showing CollectionTime = 0.0000

I would like to know how to do Profile Trace, is there any setup I have to do?
I have gone through the below link but still i am getting only the pbl names in the trace file.
Catching the Runtime Error in the Act - Tracing and Profiling Your Application at Runtime

Kindly advice me on this.

Thank you.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 2 March 2023 19:30 PM UTC
  2. PowerBuilder
  3. # 1

Hi Sathishkumar;

 1) Some of those DLLs that you mention are not used by PB 2022 or it's runtime - for example ...

KERNELBASE.dll
GDI32full.dll
UER32.dll

 Are you calling these directly in your PB App(s) as external functions?

 

2) Profile tracing is working 100% for me from both the IDE and via PowerScript calls to profile an App "on-the-fly" in both W10 & W11.

What MS-Windows O/S version are you running the PB Apps on?

 

Regards ... Chris

FYI: I am using W10 & W11 version 22H2 latest builds.

Comment
  1. Sathishkumar S
  2. Friday, 3 March 2023 16:11 PM UTC
Hi Chris,



1. Yes, we are using user32.dll only for external functions but others we are not using in the power builder application but showing as crash faulting module.

2. Profile tracing is not working for me, I am using Windows 10 Enterprise. From the exe I am able to generate pbdebug file by using this comment prompt (app.exe /pbdebug) but it is actually too big and to generate it takes time.

So, I feel PBtrace will be helpful but I am not able to generate it.

I have enabled from System Options --> Profiling Tab --> checked Enable Tracing check box and provided the file name (marked all trace activities).

From the profile trace viewer nothing showing except CollectionTime = 0.0000



Thank you.



  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 3 March 2023 17:09 PM UTC
Hi Sathishkumar;

Ahhh - OK, I now see that your trying to perform an App Trace and not a Profile Trace.

For the "/pbdebug" trace failing, it could be that your missing a PB runtime DLL OR you have a runtime DLL in your App EXE folder that is *not from build 1892.

I would suggest validating your runtime on the PB App;s machine against this list ... https://docs.appeon.com/pb2022/application_techniques/PowerBuilder_runtime_files.html

HTH

Regards ... Chris
  1. Helpful
  1. Sathishkumar S
  2. Friday, 3 March 2023 18:07 PM UTC
Hi Chris,



I am able to do PBDebug but I am not able to do Profile Trace in 64-bit version of PB 2022 build 1892.



Thank you.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 3 March 2023 19:49 PM UTC
  2. PowerBuilder
  3. # 2

Hi Sathishkumar;

  FYI:  I  just tested the Application Profiling feature, as follows

1) From the PB IDE  ...

 Note that the 32 bit App Profile trace worked but the 64 bit one from the IDE did not work!

So no matter whet I did, the 64 bit App Profile trace file was always only around 2K!  This is a BIG problem for sure!   :-(

 

2) From inside the PB App itself ...

 

=> Note that your PB App EXE needs to use the TraceBeginTraceEnableActivity and TraceEnd PowerScript commands (etc) in order to make this feature work from a running PB App!  ;-)

 

 

Summary

 From a 64 bit PB App EXE .. this works!!!!   :-)

Note the PBP files are populated correctly from both the 32bit & 64bot App P-Code EXE's!    :-)

 

 

So the bottom line is ... EXE's are OK to Profile but 64 bit App profiling from the IDE is broken!    :-(

Note

You can test the above PB App EXE trace by running the OrderEntry Demo App of the STD Framework:  http://chrispollach.blogspot.com/2022/12/2022r3.html

PS:

The STD framework can also let you view the App Profile Tracing in "Real Time" ...  ;-)

Above example of a 64 bit App running "real time" App Profiling (via the framework). PFC .. Eat your heart out - LOL!

 

HTH
Regards ... Chris

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 3 March 2023 20:01 PM UTC
  2. PowerBuilder
  3. # 3

Hi Sathishkumar;

  FYI:  I  just tested the Application Profiling feature, as follows

1) From the PB IDE  ...

 Note that the 32 bit App Profile trace worked but the 64 bit one from the IDE did not work!

So no matter whet I did, the 64 bit App Profile trace file was always only around 2K!  This is a BIG problem for sure!   :-(

 

2) From inside the PB App itself ...

 

=> Note that your PB App EXE needs to use the TraceBeginTraceEnableActivity and TraceEnd PowerScript commands (etc) in order to make this feature work from a running PB App!  ;-)

 

 

Summary

 From a 64 bit PB App EXE .. this works!!!!   :-)

Note the PBP files are populated correctly from both the 32bit & 64bot App P-Code EXE's!    :-)

 

 

So the bottom line is ... EXE's are OK to Profile but 64 bit App profiling from the IDE is broken!    :-(

Note

You can test the above PB App EXE trace by running the OrderEntry Demo App of the STD Framework:  http://chrispollach.blogspot.com/2022/12/2022r3.html

PS:

The STD framework can also let you view the App Profile Tracing in "Real Time" ...  ;-)

Above example of a 64 bit App running "real time" App Profiling (via the framework). PFC .. Eat your heart out - LOL!

 

HTH
Regards ... Chris

Comment
  1. Sathishkumar S
  2. Monday, 6 March 2023 14:05 PM UTC
Hi Chris,



Thank you for raising support ticket to resolve the PB2022 64bit IDE Profile Tracing.

Meantime is there any way you can suggest to identify the dll crash issue.

pbhsr.dll / pbdwe.dll.



Thanks

Sathishkumar.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 6 March 2023 14:28 PM UTC
If you are getting a Windows App Event log mini-dump being logged, then I would open a support ticket & attach the mini-dump information to it. Also, try & be very detailed as to the App's compilation & execution environment.
  1. Helpful
  1. Sathishkumar S
  2. Tuesday, 7 March 2023 11:22 AM UTC
Hi Chris,



I will try to get the mini dump file as soon as possible.

for now, below are the details of App's compilation & execution environment



PowerBuilder IDE 2022 Build 1892 64 bit

Compiling the application in 64-bit with Pcode mode



dev Environment

OS --> Windows 10 Enterprise LTC

Version --> 1809

OS Build --> 17763.4010

Type --> 64bit



QA Environment

OS --> Windows Server 2016 Datacenter

Version --> 1607

OS Build --> 14393.4583

Type --> 64bit



Below are some of the events logged when the application crashed.



Faulting application name: chartbase.exe, version: 23.2.1.1, time stamp: 0x63765588

Faulting module name: PBSHR.dll, version: 22.0.0.1892, time stamp: 0x6376558c

Exception code: 0x80000003

Fault offset: 0x00000000001bb7eb

Faulting process id: 0x879c

Faulting application start time: 0x01d9504d64c64285

Faulting application path: C:\Program Files (x86)\Application\Application.exe

Faulting module path: C:\Program Files (x86)\Application\Runtime 22.0.0.1892\PBSHR.dll

Report Id: 06861cf8-eb8a-4010-a7c9-093e710c09b5

Faulting package full name:

Faulting package-relative application ID:







Faulting application name: Application.exe, version: 23.2.1.1, time stamp: 0x63765588

Faulting module name: pbdwe.dll, version: 22.0.0.1892, time stamp: 0x637655e4

Exception code: 0xc0000005

Fault offset: 0x000000000037fdc4

Faulting process id: 0xc164

Faulting application start time: 0x01d9506a96094b72

Faulting application path: C:\Program Files (x86)\Application\Application.exe

Faulting module path: C:\Program Files (x86)\Application\Runtime 22.0.0.1892\pbdwe.dll

Report Id: 414ddaa5-a6f7-4823-a8fc-5cba75fdfad7

Faulting package full name:

Faulting package-relative application ID:





Faulting application name: Application.exe, version: 23.2.1.1, time stamp: 0x63765588

Faulting module name: KXPLM64.DLL, version: 1.1.3616.0, time stamp: 0x585424d4

Exception code: 0xc0000005

Fault offset: 0x0000000000014c07

Faulting process id: 0xcf20

Faulting application start time: 0x01d9506f6312b4ef

Faulting application path: C:\Program Files (x86)\Application\Application.exe

Faulting module path: C:\Windows\system32\spool\DRIVERS\x64\3\KXPLM64.DLL

Report Id: aa6fdd9d-1051-438c-9e61-01d4c67f0068

Faulting package full name:

Faulting package-relative application ID:





Faulting application name: splwow64.exe, version: 10.0.14393.4169, time stamp: 0x5ff78ec1

Faulting module name: ntdll.dll, version: 10.0.14393.4530, time stamp: 0x60e33cac

Exception code: 0xc0000005

Fault offset: 0x000000000000867a

Faulting process id: 0xadbc

Faulting application start time: 0x01d9508963cc6ae9

Faulting application path: C:\Windows\splwow64.exe

Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

Report Id: 2258e711-4212-4fcd-a5b4-2a6147f4b32c

Faulting package full name:

Faulting package-relative application ID:





Faulting application name: splwow64.exe, version: 10.0.14393.4169, time stamp: 0x5ff78ec1

Faulting module name: KXPLM64.DLL, version: 1.1.3616.0, time stamp: 0x585424d4

Exception code: 0xc00000fd

Fault offset: 0x0000000000014c07

Faulting process id: 0xadbc

Faulting application start time: 0x01d9508963cc6ae9

Faulting application path: C:\Windows\splwow64.exe

Faulting module path: C:\Windows\system32\spool\DRIVERS\x64\3\KXPLM64.DLL

Report Id: 00201824-317d-4c22-8c16-637bf4650cde

Faulting package full name:

Faulting package-relative application ID:





Faulting application name: splwow64.exe, version: 10.0.14393.4169, time stamp: 0x5ff78ec1

Faulting module name: ntdll.dll, version: 10.0.14393.4530, time stamp: 0x60e33cac

Exception code: 0xc0000005

Fault offset: 0x0000000000008583

Faulting process id: 0x6bac

Faulting application start time: 0x01d95052d6a5f746

Faulting application path: C:\Windows\splwow64.exe

Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

Report Id: 8df0de98-86d1-4f35-a9e3-9cf1a799014e

Faulting package full name:

Faulting package-relative application ID:





Thanks

Sathishkumar.
  1. Helpful
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 March 2023 09:37 AM UTC
  2. PowerBuilder
  3. # 4

Hi Sathishkumar,

 

Looks like it’s crashing randomly when you run your 64-bit PB application. I suggest you:
1. First check if the version of these problematic DLL files is 22.0.0.1892.
2. Check out the directory where the PBL/EXE are located. If there are any PB runtime dll files in this directory, delete them.
3. Check the External Funtions used in your application. If these API funtions use any long type argument or return value and its maximum value will exceed the maximum value of long, such as HANDLE in 64-bit, please change the long type to Longptr type, no matter they are in declaring or being called. After that, verify if the problem is solved. About the Longptr type in 64-bit, please refer to:
https://docs.appeon.com/pb2022/application_techniques/Deploying_64bit.html 
https://docs.appeon.com/pb2022/application_techniques/Using_external_functions.html#Declaring_external_functions 

 

Regards,
Ken

Comment
  1. Sathishkumar S
  2. Tuesday, 7 March 2023 12:53 PM UTC
Hi Ken,



Yes, the application is randomly crashing in the production for around 200-300times in a day,

Pbdwe.dll (responsible for 55-65% of the crashes)

Pbshr.dll (responsible for 10-15% of the crashes)

other dlls such as pbvm.dll, lincef.dll, ntdll.dll (responsible for 25-35% of the crashes)

KXPLM64.DLL, KMUU7587.DLL, KERNELBASE.dll (dlls which is not in runtime but still crashes the application)

I have tried to replicate a few issues but still I am not able to find the reasons since it seems related to dll, unable to debug from powerscript.



Please find the answers for the questions



1. Version of the problematic dll version is fine I have checked it

2. In the PBL/EXE location there is no dll in the dev environment (Pwerbuilder IDE),

but in the production and QA we have a runtime 22.0.0.1892 folder all the dlls are kept in that.

For the production and QA, we have created a new folder, installed runtime from PowerBuilder Runtime Packager with all the options marked for PB

64bit components and installer as .msi

3. I will check the external functions, before we faced few issues with the external functions whereas we have changed the datatype from long vs longptr

I have to check all the external functions or is there any way to filter out the specific external functions to check for the datatypes (like API calls).



thanks for the links to refer about 64bit deploying and datatype declaration.



Some of the events logged when the application crashed.



Faulting application name: chartbase.exe, version: 23.2.1.1, time stamp: 0x63765588

Faulting module name: PBSHR.dll, version: 22.0.0.1892, time stamp: 0x6376558c

Exception code: 0x80000003

Fault offset: 0x00000000001bb7eb

Faulting process id: 0x879c

Faulting application start time: 0x01d9504d64c64285

Faulting application path: C:\Program Files (x86)\Application\Application.exe

Faulting module path: C:\Program Files (x86)\Application\Runtime 22.0.0.1892\PBSHR.dll

Report Id: 06861cf8-eb8a-4010-a7c9-093e710c09b5

Faulting package full name:

Faulting package-relative application ID:







Faulting application name: Application.exe, version: 23.2.1.1, time stamp: 0x63765588

Faulting module name: pbdwe.dll, version: 22.0.0.1892, time stamp: 0x637655e4

Exception code: 0xc0000005

Fault offset: 0x000000000037fdc4

Faulting process id: 0xc164

Faulting application start time: 0x01d9506a96094b72

Faulting application path: C:\Program Files (x86)\Application\Application.exe

Faulting module path: C:\Program Files (x86)\Application\Runtime 22.0.0.1892\pbdwe.dll

Report Id: 414ddaa5-a6f7-4823-a8fc-5cba75fdfad7

Faulting package full name:

Faulting package-relative application ID:



Thanks

Sathishkumar.

  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 9 March 2023 00:41 AM UTC
  2. PowerBuilder
  3. # 5

In the category of "is it plugged in"..... have you checked to ensure that you are using and pointing to the 32 bit DLLs for your 32 bit application(s), and you are using and pointing to your 64 bit DLLs for your64 bit application(s)?

Comment
  1. Sathishkumar S
  2. Thursday, 9 March 2023 10:36 AM UTC
Hi Olan Knight



Yes, I am sure that I have compiled the application with 64bit and when deploying it I have installed runtime from PowerBuilder Runtime Packager which was created with all the options marked for PB 64bit components and installer as .msi.

Application seems to be working fine but sometimes crashing randomly and showing faulting module as pbshr.dll/pbdwe.dll and some other dlls.

That what trying to figure out the reason for it.



Thank you,

Sathishkumar.
  1. Helpful
There are no comments made yet.
Sathishkumar S Accepted Answer Pending Moderation
  1. Thursday, 9 March 2023 10:28 AM UTC
  2. PowerBuilder
  3. # 6

Hi Chris,

I have attached the dump files from the users and also from the dev environment when the application crashes on pbshr.dll/pbdwe.dll.

PowerBuilder IDE 2022 Build 1892 64 bit
Compiling the application with Pcode mode 64-bit


DEV/Compilation Environment where PB IDE is installed.
OS --> Windows 10 Enterprise LTC
Version --> 1809
OS Build --> 17763.4010
Type --> 64bit


Execution Environment 
OS --> Windows Server 2016 Datacenter
Version --> 1607
OS Build --> 14393.4583
Type --> 64bit

Backend 
ODBC connection 
SQL Anywhere 16.0.0.2193

 

Thanks
Sathishkumar.

Attachments (2)
Comment
  1. Chris Pollach @Appeon
  2. Thursday, 9 March 2023 15:13 PM UTC
Hi Sathishkumar;

Please open a Support Ticket and attach the dump files to the ticket. Thanks.

Regards ...Chris
  1. Helpful 1
  1. Sathishkumar S
  2. Monday, 13 March 2023 11:04 AM UTC
Hi Chris,



I have raised a support ticket and attached the dump files which is 9903.



Thanks & Regards,

Sathishkumar.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 13 March 2023 13:44 PM UTC
Great ... Thanks
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 9 March 2023 15:21 PM UTC
  2. PowerBuilder
  3. # 7

Hi Everyone;

  I think I know why 64 App Profiling is not working in PB 2022. When you run or debug in 64 bit mode, you are not running under the PB IDE (PB220.exe) Instead, you are executing under the control of a new executable named "DebugService_64.exe"! I suspect that this new EXE is not yet Profiling ready. FYI ...

Regards ... Chris

Comment
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Friday, 14 April 2023 09:17 AM UTC
  2. PowerBuilder
  3. # 8

Hi Sathishkumar,

 

Today we have released PB 2022 MR Build 1900. This release has fixed the bug you reported about Profile Tracing for 64bit not working.
Please download and install it to verify the issue and let us know if any problems. You can get the installer from our Downloads portal at https://account.appeon.com/download  (login required).

We welcome all feedback from you!

 

Regards,
Ken

Comment
  1. Sathishkumar S
  2. Wednesday, 19 April 2023 08:07 AM UTC
Hello Ken,



Thank you for the update. According to the client, we will be installing the new release PB2022 build 1900 during the first week of May. We will check after that and update the status accordingly.



Thank you.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 19 April 2023 15:15 PM UTC
Hi Sathishkumar;

FYI: Build 1900 fixed the 64 bit issue for me when used from my PB 2022 IDE. :-)

Regards ... Chris
  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.