1. David Flory
  2. PowerBuilder
  3. Monday, 27 January 2020 03:03 AM UTC

I have a very small application that builds and runs in the IDE with no issues.  The .exe crashes with "unresolvable external (window name) ..." when I call the window from clicked event of menu.  One or two menu items work but most fail with this message.  Using PB 2019 trial.  Been using PB since ver 3.0a and can't remember any .exe's that didn't fail.  This was the 2nd one tonight...

Any ideas?

David Flory Accepted Answer Pending Moderation
  1. Monday, 27 January 2020 22:28 PM UTC
  2. PowerBuilder
  3. # 1

Thanks for your help.  I'm going to call this case resolved.

Any idea why the .pbd is not placed in the directory with the .exe?  I can't believe I haven't seen this before since I've been using PB from version 3.0a through 11.5 until now...

Just compiled to machine code and got a Microsoft crash message.  Same issue I suppose but I thought a machine code .exe had everything.  I'll take a look at the "foreign" directory.

Thanks again.

 

Dave

Comment
  1. Chris Pollach @Appeon
  2. Monday, 27 January 2020 22:37 PM UTC
Hi David;

Another possibility is a corrupt Project object class. It might be worth deleting & then creating the Project again.

Regards ... Chris
  1. Helpful
  1. Michael Kramer
  2. Monday, 27 January 2020 22:49 PM UTC
PBD file ends up in folder where the PBL file resides. ALWAYS!

You have no option in project object to configure alternative "publish" folder.

Whenver all you PBL files reside in one folder you will never see this as an issue - because PBD files then end in same folder.
  1. Helpful
There are no comments made yet.
David Flory Accepted Answer Pending Moderation
  1. Monday, 27 January 2020 21:00 PM UTC
  2. PowerBuilder
  3. # 2

Here's the situation (and the problem is easily recreated).

I have a very small application.  There are only two .pbl's.  The larger one has about 45 objects and is in the same directory with the target.  Objects are mostly the menu, windows and data windows.  Real basic stuff.  Included in the windows are many that are first level and second level descendants from the second .pbl, which is in a completely separate directory.  This .pbl contains one window which is the ancestor of most of the windows in the app.

I'm compiling in 64 bit P code, although I tried machine code and the result was the same.  Initially, I did .pbd's for both of the .pbl's, even though all the datawindows and windows in the app were named in the code. Some of the calls for a window did not fail but most of them did.

So I tried compiling without the .pbd's.  The .exe ran flawlessly.  Put them back in and got the same errors.  Then I left the smaller .pbl out and just made a .pbd out of the larger .pbl.  The .exe ran flawlessly.

On review, the windows that were referred to in the error messages were those descendents of the window in the .pbl from the other directory.

Windows were called from the menu in the clicked event with "open(w_name)".

The app never failed to run in the IDE and there were no error messages from the compiler.  I have another, much bigger, app that makes extensive use of the ancestor window in the same smaller .pbl.  But the .pbl is in the same directory as the target.  Here, I have to use .pbd's because I have a number of datawindow objects that are actually called from the database.  This app ran clean the first time compiled.

I can only speculate that having the ancestor window in a "foreign" .pbl may be significant...

Dave

 

Comment
  1. Michael Kramer
  2. Monday, 27 January 2020 21:27 PM UTC
How is your path?

When you "deploy" = create EXE and PBD files each PBD is created in the same folder as its PBL file.

Let's say One.PBL is in C:\Here and Other.PBL in D:\There.

When you deploy your project/target, your MyApp.EXE + One.PBD are created in C:\Here. However, your Other.PBD is created in D:\There.

SO => When you run your C:\Here.MyApp.EXE file it finds C:\Here\One.PBD easily (in same folder) but can't find D:\There\Other.PBD (folder outside path).

Two solutions: (A) Copy all .PBD files to MyApp.EXE's folder (I often create tiny PowerShell command to do that copy) - or - (B) Augment AppPath for MyApp.EXE or system path for your Windows user to include every single subfolder where our .PBD files reside.
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Monday, 27 January 2020 14:47 PM UTC
  2. PowerBuilder
  3. # 3

"format 2" of Open, OpenSheet, OpenUserObject, OpenTab, etc. may confuse linker during PB's deploy process. So:

  • Can you share example menu script that fails?
  • Example of Open call to open the failing window type?
  • How many files in your app's library list?
  • How did you create the .EXE that is failing?

/Michael

 

Comment
There are no comments made yet.
David Flory Accepted Answer Pending Moderation
  1. Monday, 27 January 2020 04:33 AM UTC
  2. PowerBuilder
  3. # 4

Thanks for the comment, Chris.  I always do that.  But in this case, I removed the PBD's as a last resort and the app runs fine.  ???

 

Comment
  1. Chris Pollach @Appeon
  2. Monday, 27 January 2020 15:28 PM UTC
Hmmm ... that makes no sense. The only time I have ever encountered this type of problem is where the PBD(s) became write protected and when I re-deploy each time, the *existing* PBD's were not updated with the newer objects and/or updates.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 27 January 2020 03:20 AM UTC
  2. PowerBuilder
  3. # 5

Hi David;

  Make sure that you create a PBD for each PBL. 

Regards ... Chris

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.