1. George Hannah
  2. PowerBuilder
  3. Friday, 6 January 2023 16:46 PM UTC

What's the problem? Is powerbuilder compiling something other than the code I see? 

 

George Hannah Accepted Answer Pending Moderation
  1. Wednesday, 11 January 2023 18:33 PM UTC
  2. PowerBuilder
  3. # 1

This resulted in many errors during the full build. From a non-source controlled copy. All of this code has been working for years. There's nothing wrong with the code. 

 

Line 30. 

I'm working to submit the pbl with a case. I need approval internally to share the data...

Comment
  1. George Hannah
  2. Wednesday, 11 January 2023 19:37 PM UTC
I had not. When I did it just now, pb found source for pcscale.sra, would I like to export it. I did, but I can't get it to import because of the syntax error on line 3.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 11 January 2023 21:28 PM UTC
Okay, so that's a start. Could you get an older version of the pcscala.sra and compare it with the current one?
  1. Helpful
  1. George Hannah
  2. Thursday, 12 January 2023 16:08 PM UTC
The only difference is the runtime version - We're using 2728 in production, but when I installed pb on a new PC, I got 2779, so I rebuilt today using 2779.
  1. Helpful
There are no comments made yet.
kitty he @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 11 January 2023 08:24 AM UTC
  2. PowerBuilder
  3. # 2

Hi George,

 

Judging from the described problem, it is not sure that it is related to Git. The three objects pcscale.sra, w_ini_maintain.srw, and w_pc_lw_main.srw in the screenshot after switching branches also failed. You can check the code of these three objects and see if they are related.

 

The error message prompted by PB's syntax detection may point to the wrong location, and the real problem may lie elsewhere (the error syntax hint pointed to by Edit source is inaccurate).

 

It is recommended to check all the code of the problematic objects first. If the problem cannot be solved, can you provide us with a test case for debugging?

 

Regards,

Kitty

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 11 January 2023 06:56 AM UTC
  2. PowerBuilder
  3. # 3

What if you make a copy of everything, connect to that copied workspace and do a full build without any source control connected?

Comment
There are no comments made yet.
George Hannah Accepted Answer Pending Moderation
  1. Tuesday, 10 January 2023 20:28 PM UTC
  2. PowerBuilder
  3. # 4

First three lines in edit source:

forward
global type pcscale from application
end type

when I use CTRL-L in pb, it puts me on the declaration of gs_version. 

Comment
There are no comments made yet.
George Hannah Accepted Answer Pending Moderation
  1. Tuesday, 10 January 2023 18:24 PM UTC
  2. PowerBuilder
  3. # 5

This makes me think this is a git issue. when I try to switch branches, I get garbage like this. Once this happens, the local repo is unusable. 

Regenerate throws errors. My code is now unusable. 

 

Comment
  1. René Ullrich
  2. Wednesday, 11 January 2023 06:32 AM UTC
Could be some enconding problem.

Check the source file in wsobjects directory (e.g. with notepad++): Encoding? Linefeed CRLF?
  1. Helpful
There are no comments made yet.
George Hannah Accepted Answer Pending Moderation
  1. Friday, 6 January 2023 18:07 PM UTC
  2. PowerBuilder
  3. # 6

I didn't mention this yet. Someone else wrote these 3 lines in 1993. There's nothing wrong with the code. This has to be pb & git messing up. 

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 9 January 2023 14:27 PM UTC
Can you open a support ticket and attach the problematic PBL so our engineering team can investigate?
  1. Helpful
There are no comments made yet.
George Hannah Accepted Answer Pending Moderation
  1. Friday, 6 January 2023 18:03 PM UTC
  2. PowerBuilder
  3. # 7

Two developers have this issue, we've both restarted powerbuilder and our PCs. We tried commenting line 3 and also leaving a blank line. In my 3rd screenshot, you can see line 1-3 commented out AND pushed down so line 3 is blank, but still there's an error on line 3. We've also tried re-typing with no luck. I've edited the source in a hex editor and couldn't see any strange characters. 

I'm convinced that this is a mismatch/sync issue between the ws_objects folder and the pbls. Powerbuilder is not compiling the same script as it's displaying. 

When I run in the debugger, gs_inifile gets initialized with c:\pcscale\pcscale.ini, which is from a previous version of this object. 

Comment
  1. Gregory Rusak
  2. Friday, 6 January 2023 18:31 PM UTC
... and what does the code look like when you do an "Edit Source". Is it the same as the ws_objects ?
  1. Helpful
  1. George Hannah
  2. Friday, 6 January 2023 18:49 PM UTC
Line 1-3 look the same in ws_objects & edit source



Some other things I've tried -

- full rebuild

- regenerate

- optimize

- one of my colleagues edited source and added a space. When she saved, the object no longer exists.



  1. Helpful 1
  1. René Ullrich
  2. Tuesday, 10 January 2023 06:27 AM UTC
What are the first three lines in edit source / wsobject file? I guess it has nothing to do with global variables.
  1. Helpful
There are no comments made yet.
Gregory Rusak Accepted Answer Pending Moderation
  1. Friday, 6 January 2023 17:55 PM UTC
  2. PowerBuilder
  3. # 8

Hello George,

Another approach would be to declare an nvo app_manager as a Global application variable and then in that nvo you would have your of_set() and of_get() functions to return and set your global environment variables that were declared as PRIVATE in the app_manager nvo. Just my 2% of a buck.

Warm Regards,

Greg

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 6 January 2023 17:25 PM UTC
  2. PowerBuilder
  3. # 9

The only thing I can think of, is that there might be some 'weird' invisible character' somewhere.

Comment line 3 of your global variable declarations and hit ctrl+L to see if the error goes away. If so, retype that line from scratch.

Comment
  1. Miguel Leeuwe
  2. Friday, 6 January 2023 17:28 PM UTC
Another thing you can try is to close pb and reopen it. I've seen funny compilation errors that spontaneously went away after restarting powerbuilder and or rebooting the computer. (might have something to do with caching or similar).
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 10 January 2023 15:54 PM UTC
Hi Miguel .. that was my 1st thought as well. I have seen this error many times before & that was the issue. ;-)
  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.