1. Mike Kochevar
  2. PowerBuilder
  3. Tuesday, 12 December 2023 16:33 PM UTC

Hello,

Happy holidays to everyone!!

I am trying to deploy as 64-bit but PB 2022 R2 crashes. The only error I can see is in the Event Viewer...

Faulting application name: pb220.exe, version: 22.1.0.2819, time stamp: 0x64c36da2
Faulting module name: KERNELBASE.dll, version: 10.0.17763.4974, time stamp: 0xa8cf83fa
Exception code: 0xc0000005
Fault offset: 0x00125aa2
Faulting process id: 0x2cf8
Faulting application start time: 0x01da2d00680aa6ad
Faulting application path: C:\Program Files (x86)\Appeon\PowerBuilder 22.0\pb220.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 2a041255-d1e5-46f5-b375-06b3c2808b60
Faulting package full name:
Faulting package-relative application ID:

Any info would be helpful.

Thanks,

Mike

Mike Kochevar Accepted Answer Pending Moderation
  1. Monday, 18 December 2023 13:51 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chris,

I am not sure how to answer your question about deploy vs creating an exe. The build project I use creates the exe and when I deploy to another PC I copy the new exe and all of the .pbd files to the PC and run the exe. The PB IDE crashes when the project is in the deploy process. I have attached a screenshot of the build projects General tab and the button I am clicking on to start the process.

 

Thank you for your time,

Mike

Attachments (1)
Comment
  1. Roland Smith
  2. Monday, 18 December 2023 19:11 PM UTC
Try changing the current bitness drop-down to 32bit and see what happens.
  1. Helpful
  1. Mike Kochevar
  2. Monday, 18 December 2023 19:39 PM UTC
I tried changing the bitness to x86 and PB crashes before the Build&Deploy finishes. Or should I change the Platform: to x86 on the General tab in the screenshot?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 18 December 2023 19:56 PM UTC
That sounds like you have corrupt object(s) in your App source code. The reason that you can probably run the App from the IDE is that the parts of the app you're executing are not the broken ones.

If you can optimize all your PBLs & the perform a "full build" ok, then the deploy should work without crashing the IDE.

If the above fails to resolve your deploy (compile) crashing issue, then you'll need to return to a back up if your App.

Regards ... Chris
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 15 December 2023 04:00 AM UTC
  2. PowerBuilder
  3. # 2

I've taken a look at the Félix Informatique web site and it appears that they have not updated their product since PB v11, and I'm guessing they have no plans to do so and no longer support their product.

I've also taken a look at the "easy" list of external function declarations you attached. There are roughly 115 external function declarations to API functions in seven different Windows system DLL's. Many can be updated as Roland described, by changing the datatype for handles and memory addresses from Long/ULong to Longptr... but some may be more challenging to migrate, particularly those where structures are involved.

There are many external function declarations where ANSI/Unicode translation is being performed. Presumably this is because Flx Suite was created when PB did not yet have Unicode support, so the developer(s) continued passing ANSI-encoded data when the suite was migrated to PB 10. The translation of character/string arguments to/from ANSI/Unicode works well, but the translation adds needless overhead.

If it were me, I would migrate the app and Flx suite to PB 2022 as a 32-bit app first that passes Unicode, test it thoroughly, get familiar with the packaging and runtime requirements of apps in PB 2022. Next, make the Longptr datatype changes, but continue generating a 32-bit app and get that working well. Then finally, tackle the conversion to 64-bit, but only if it is necessary. In my view, there is nothing wrong with having a 32-bit application, especially since you have so many Windows API external functions that will need to be examined and probably modified. Remember, it's not just the declarations that have to change, but the datatypes of the variables that are passed as arguments and the code that manipulates those variables.

I wish you well with your project. Remember we're here to help answer questions.

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 15 December 2023 15:16 PM UTC
Great advice from John! Don't go 64-bit unless there is strong reason because there really is "migration" work to be done for 64-bit and unsupported 3rd party software is going to be big challenge on top of already daunting task.
  1. Helpful
  1. Roland Smith
  2. Monday, 18 December 2023 13:48 PM UTC
If I read the original question correctly, the IDE is crashing while deploying the application. It isn't a runtime issue.
  1. Helpful
There are no comments made yet.
Mike Kochevar Accepted Answer Pending Moderation
  1. Thursday, 14 December 2023 13:20 PM UTC
  2. PowerBuilder
  3. # 3

Hi John,

I have attached the WinAPI calls from a third party dll call flx suite. There are many other WinAPI calls in the application but I thought I would start small. The dll is written in powerbuilder, I am surprised it works in 32-bit as it also calls PVBM###.dll depending on the version of PB being used, the latest version was a call to PBVM110.dll.

Thank you for your time,

Mike

Attachments (1)
Comment
  1. Roland Smith
  2. Thursday, 14 December 2023 19:04 PM UTC
I don't know why any of this would cause the IDE to crash. To be clear, you have the PBL file flxapi.pbl in your library list and have performed a migration or full rebuild in PB 2022 at least once?



The references to PBVM###.DLL are to load bitmaps or icons from the PB runtime and display them somewhere in the app.



You should be able to update the code pretty easily to support PB 2022. The main runtime file is now PBVM.DLL. Add new external function declarations for FN_ResGetIconID_220 and FN_ResGetBitmapName_220 and then add a new entry to the case statements where they are called.



If the third party that you got this from won't do it, you'll need to review the Microsoft documentation for each API function. Any argument or return that is defined as a handle or pointer needs to be defined in PB as LongPtr.



This is a great resource for figuring out what to define the arguments and returns as.

https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types

  1. Helpful
  1. Mike Kochevar
  2. Monday, 18 December 2023 13:33 PM UTC
Hi Roland,

Yes, the PBL for flxapi.pbl is in the library list and has been migrated to PB2022R2, also runs from the PB IDE as x64. Thank you for the resource link I appreciate it.



Mike
  1. Helpful
There are no comments made yet.
Mike Kochevar Accepted Answer Pending Moderation
  1. Wednesday, 13 December 2023 17:41 PM UTC
  2. PowerBuilder
  3. # 4

I tried to deploy using the command prompt option pbc220.exe with the PBC runtime parameters generated by the build object in the PB2022R2 IDE. The completes with errors but the errors are information errors, i wouldn't think that would cause the process to crash, also I can see "Rebuild complete" before the errors...

Library: c:\users\mkochevar\tfs2016\boston\pims\release22.0.0.0\flxsb\flxsb.pbl Object: uo_flxsb_container Function: uo_flxsb_container::move
(0001): Information C0148: The identifier 'x' conflicts with an existing property with this name. The new definition of 'x' will take precedence and the prior value will be ignored until this version of 'x' goes out of scope.
(0001): Information C0148: The identifier 'y' conflicts with an existing property with this name. The new definition of 'y' will take precedence and the prior value will be ignored until this version of 'y' goes out of scope.
Library: c:\users\mkochevar\tfs2016\boston\pims\release22.0.0.0\pims_base\pims_base.pbl Object: w_browser ole_browser Class Declaration
(0009): Information C0148: The identifier 'cancel' conflicts with an existing property with this name. The new definition of 'cancel' will take precedence and the prior value will be ignored until this version of 'cancel' goes out of scope.
(0010): Information C0148: The identifier 'cancel' conflicts with an existing property with this name. The new definition of 'cancel' will take precedence and the prior value will be ignored until this version of 'cancel' goes out of scope.
(0020): Information C0149: The identifier 'resizable' conflicts with an existing property with this name in the parent class. The new definition of 'resizable' will take precedence and the prior value will be ignored until this version of 'resizable' goes out of scope.
(0025): Information C0148: The identifier 'cancel' conflicts with an existing property with this name. The new definition of 'cancel' will take precedence and the prior value will be ignored until this version of 'cancel' goes out of scope.
(0028): Information C0148: The identifier 'cancel' conflicts with an existing property with this name. The new definition of 'cancel' will take precedence and the prior value will be ignored until this version of 'cancel' goes out of scope.
(0029): Information C0148: The identifier 'cancel' conflicts with an existing property with this name. The new definition of 'cancel' will take precedence and the prior value will be ignored until this version of 'cancel' goes out of scope.
Library: c:\users\mkochevar\tfs2016\boston\pims\release22.0.0.0\pfeapsrv\pfeapsrv.pbl Object: w_logon Object Variable Declarations
(0001): Information C0146: The identifier 'w_logon' conflicts with an existing global variable with this name. The new definition of 'w_logon' will take precedence and the prior value will be ignored until this version of 'w_logon' goes out of scope.
Library: c:\users\mkochevar\tfs2016\boston\pims\release22.0.0.0\pims_ad_hoc_query\sqlbuilder\sqlbuilderprosourcecode\pb90\sqlbuilderdemo80.pbl Object: w_logon Object Variable Declarations
(0001): Information C0146: The identifier 'w_logon' conflicts with an existing global variable with this name. The new definition of 'w_logon' will take precedence and the prior value will be ignored until this version of 'w_logon' goes out of scope.
Library: c:\users\mkochevar\tfs2016\boston\pims\release22.0.0.0\flxapi\flxapi.pbl Object: nv_flxapi_tooltip Function: nv_flxapi_tooltip::of_relaymsg
(0016): Information C0146: The identifier 'msg' conflicts with an existing global variable with this name. The new definition of 'msg' will take precedence and the prior value will be ignored until this version of 'msg' goes out of scope.

Comment
  1. John Fauss
  2. Thursday, 14 December 2023 02:00 AM UTC
If you are creating/managing tooltips with Windows API functions, then I can assure you there are changes that need to be made for it to work when executing as a 64-bit app. I'm willing to assist, but without knowing which WinAPI functions you are using, seeing the external function declarations and any structures passed to/from the API functions, I cannot advise or suggest corrective action.
  1. Helpful
There are no comments made yet.
Mike Kochevar Accepted Answer Pending Moderation
  1. Wednesday, 13 December 2023 12:56 PM UTC
  2. PowerBuilder
  3. # 5

Yes, PB2022R2 is crashing when trying to deploy the application. The application runs with the x64 option selected and a manual full build completes without error.

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 13 December 2023 20:44 PM UTC
Hi Mike;

Did you try "optimizing" all your App's PBLs before starting a Full Build / Compile?

Regards ... Chris
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 20:23 PM UTC
  2. PowerBuilder
  3. # 6

The Event Viewer info says that pb220.exe aborted. Am I right that the PowerBuilder IDE is aborting while you are deploying to 64bit? The questions/answers you've gotten so far talk about your application aborting.

Comment
There are no comments made yet.
Mike Kochevar Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 17:56 PM UTC
  2. PowerBuilder
  3. # 7

Hi Chris,

The application does run in the IDE with the x64 option selected and the xml file points to the correct runtime files folder.

Mike

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 12 December 2023 20:17 PM UTC
That's a great 1st step Mike running OK under the IDE!

The key things now are ...

1) Is the PB runtime that the XML file points to actually the 64 bit runtime?

2) Did you deploy the 64 bit Runtime via the PB Packager utility?

3) If you copied the PB runtime instead of using the PB Packager - did you get all the required DLLs?

FYI: https://docs.appeon.com/pb2022r2/application_techniques/PowerBuilder_runtime_files.html

HTH
  1. Helpful
  1. Mike Kochevar
  2. Thursday, 14 December 2023 14:30 PM UTC
Hi Chris, here are the results of testing I did with different runtime paths for the 64-bit build. All results are the same, PB crashes during the deploy. To answer an earlier question from you, I did optimize all libraries and then did a full build and then tried to Build&Deploy but PB crashed during the deploy.



Original entry on the Run tab...

Runtime Path in Application XML(Use only in P-Code mode):

C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 22.1.0.2819\



Created the runtime via the PB Packager utility and changed the path to:

C:\Users\mkochevar\PB_2022_Runtime_64bit\Runtime 22.1.0.2819



Build&Deploy project and PB 2022 R2 crashes.



The number of files in the each directory are different, number of files in PB Packager created folder is 70, number of files in the \x64 folder (created when PB was installed) is 134.



Change the path for: Runtime Path in Application XML(Use only in P-Code mode), to,

C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 22.1.0.2819\x64\



Build&Deploy the project and PB 2022 R2 crashes.



Thank you for your time,

Mike
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 14 December 2023 15:22 PM UTC
Ahhh .. a normal C/S project has only a "Build" option.

A PowerClient or PowerServer project has the "Build & Deploy" option.

So are you building a C/S App EXE or are you trying to deploy a PC or PS project when the IDE crash occurs?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 17:33 PM UTC
  2. PowerBuilder
  3. # 8

Hi Mike;

  Does your PB App work correctly when run in 64 bit mode from the PB 2022 R2 IDE?

  If the 64 bit App runs OK under the IDE, then make sure that you deploy the 64 bit PB runtime via the "PB Packager" utility and also include the generated <AppName>.XML file with your  PB App' EXE in the same deployment folder. Note that you might need to edit that XML file for the proper PB runtime location on the deployment machine.
Regards .. Chris

Comment
There are no comments made yet.
Mike Kochevar Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 17:24 PM UTC
  2. PowerBuilder
  3. # 9

I did go through the 64-bit migration guide. I was able to compile all external dll's as 64-bit. I have not made any Win API adjustments, I am not sure if I need to or not. 

Comment
  1. John Fauss
  2. Tuesday, 12 December 2023 17:37 PM UTC
There may very well be some changes needed for interfacing with 64-bit WinAPI functions. Which Windows API functions does the application call?
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 17:06 PM UTC
  2. PowerBuilder
  3. # 10

Have you gone through the 64-bit migration guide?  https://docs.appeon.com/pb2022r3/migrating_32bit_applications_to_64bit/index.html

Do you have any 32-bit DLLs/OCXs?

Did you adjust any Win API calls?

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.