1. Kelly Amott
  2. PowerBuilder
  3. Monday, 26 September 2022 16:27 PM UTC

We recently migrated a PB19 64-bit application from Server 2016 to Server 2019. On 2016 users could print to PDF without issue. Now, on Server 2019, when they print they can do 3 prints and then the program shuts down. The only error we are seeing is a kernelbase.dll fault which appears to be a generic error. We have tried two separate servers and both have issues so it appears to follow Server 2019. We don't see this as being caused by our code.

I upgraded the IDE on my machine from PB 2019 to PB19 R3 hoping that it was a compatibility issue. I see that R3 has created a C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 19.2.0.2779 directory on my machine that it appears I will need on the server. I don't see a standalone PBRT installer for 2019 R3. Do I need to use the Installer and just run the Runtime 19.2.0.2779 installer? What other files do I need for R3?

Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 27 September 2022 09:29 AM UTC
  2. PowerBuilder
  3. # 1

Hi Kelly,

 

This seems to be an issue related to the environment. No other customers have reported this issue.

  1. However, I notice that you are using PB 2019 R3 64-bit application. Therefore, we suggest that you use the runtime packager to create the msi file and install it on your Server 2019.

Then verify if you can still reproduce the issue. Refer to the following screenshot for creating a 64-bit runtime packager.

     

     2. Please confirm if all your DataWindows will cause the program to shut down after 3 prints. Or it only happens to a certain DataWindow.

     3. As mentioned by Armeen, please verify if you can work around the issue by using the new NativePDF to export DataWindow as a PDF file. (This feature doesn't depend on the client's printer. So it can verify if the issue is related to the printer)

int li_ret
dw_1.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'Yes'
dw_1.Object.DataWindow.Export.PDF.Method = NativePDF!
dw_1.Object.DataWindow.Print.Orientation = '1' //Landscape!
dw_1.Object.DataWindow.Print.Paper.Size = '1' //1 – Letter 8 1/2 x 11 in
li_ret = dw_1.SaveAs("c:\custom.pdf",PDF!, true)

 

Regards,

 

Comment
  1. Kelly Amott
  2. Tuesday, 27 September 2022 19:39 PM UTC
Hi Mark. I am working in 2019 R2 at the moment. I had rolled back to our PB 2019 starting point but moved to R2 to get NativePDF support. I am still getting the error, if it can be called that, where the app shuts down after the third print to PDF. Interesting that it is always so precise. Why three.... I agree that it's environmental but had hoped that moving to a new PB version might solve it.

I did create an msi and have another test server where I'll deploy it once a couple of updates are made.
  1. Helpful
  1. Mark Lee @Appeon
  2. Wednesday, 28 September 2022 01:34 AM UTC
Hi Kelly,

Thanks for your feedback.

Maybe I was not very clear in my previous reply. I want to confirm whether you've modified your code according to the sample code in the previous reply and does it crashes too if you use the DataWindow's SaveAs method to generate PDF files using the NativePDF data export mode.



Regards,
  1. Helpful
There are no comments made yet.
Kelly Amott Accepted Answer Pending Moderation
  1. Monday, 26 September 2022 16:55 PM UTC
  2. PowerBuilder
  3. # 2

Hi Armeen. We installed Acrobat on the server and then let the users select Microsoft Print to PDF as an option. Others use SnagIt as their print tool and we run into the same issue. Anything requiring an electronic document output has issues. 3 "prints" and the app closes with the kernelbase error.

Comment
  1. Kelly Amott
  2. Monday, 26 September 2022 19:27 PM UTC
Disabled accessibility and had the same issue.

For the second option, I'm on the server and printing locally to the Documents folder. Does the RichTextEdit change still apply?

I reinstalled PB 2019 (base version) and am looking at the NativePDF info. This is where inexperience comes into play. I am at a loss as to how to get to the application properties dialog box using the Application Painter or any other route.
  1. Helpful
  1. John Fauss
  2. Monday, 26 September 2022 20:01 PM UTC
Are you referring to the response window that opens when you click on the "Additional Properties..." button in the Properties tab of the Application Painter?
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Monday, 26 September 2022 20:02 PM UTC
Try the second option just as troubleshooting step.

Here is information about enabling NativePDF option (and you need to make sure you deploy the appropriate required runtime DLLs): https://docs.appeon.com/pb2019r3/pbug/Enhancing_DataWindow_Objects.html#Saving_as_PDF_using_PDFlib
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 26 September 2022 16:40 PM UTC
  2. PowerBuilder
  3. # 3

How are you doing the print to PDF?  Are you using the NativePDF feature?

Comment
  1. Chris Pollach @Appeon
  2. Monday, 26 September 2022 17:24 PM UTC
Hi Armeen;

I think that the built-in NativePDF feature would probably solve these guys issues. Using 3rd party external PDF software historically can be "dicey" in my previous experiences as the host O/S changes. Not to mention the 3rd party PDF stuff (just look at the current Ghostscript issue on the lastest version as an example). ;-)

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.