Bug 4779

Powerbuilder + git alignment problems 30 June, 2020

ATK Gimmy Susan
10 June, 2020
Product: PowerBuilder Category: PowerBuilder IDE
Version: 2019 R2 Build:
Classification: Publishing: Public
Priority: P3
Status: Reproducing Reason:
Tom Jiang @Appeon 30 June, 2020
Hi Gimmy,

Sorry, we can't reproduce the ghost objects issue! 

But we do have a customer reported an issue related to a 'strange' modified state: When you refresh and a compile error occurs, you will be asked to continue (OK) or Cancel. If you click Cancel, some objects in PBL may be exported to ws_objects and overwrite the source code. 

So in this case, please always click OK to import the objects and fix the compile errors later on. Or you can revert the entire refresh using TortoiseGit or a third-party tool after the refresh to restore to the state before the refresh. 


Tom Jiang
ATK Gimmy Susan 12 June, 2020
Hi Tom
1) we typically have no pending changes. So we don't need 'stash'
2) no

After my last checks (see previous posts), in my opinion the problem should not be sought in interfacing with GIT, but in the management of PBLs.
I suspect that some copying or moving features of objects between PBLs do not always work properly.
In fact, sometimes it happens to me that an 'optimize' asks me to save ghost objects.
In my opinion the problem lies here.

Of course it is my opinion.
Tom Jiang @Appeon 12 June, 2020
Hi Gimmy,

When you do a refresh, PB IDE will compare the objects in PBLs and the objects in ws_objects and will import objects from ws_objects to PBL if there is any difference. It will also add an object to PBL if there is a new object in the ws_objects folder. It will delete an object from PBL if it is not in the ws_objects folder anymore.

The compare might not be accurate when, for example, a line break \n is changed to \r\n when an object is retrieved from Git. So you will see PB IDE import objects that were not changed. But it would not cause any real issue. Our development is working on a solution for this.

I am not sure how the ghost objects come into your project. I am wondering whether it is due to the uncommitted or unversioned files in your project.

1. Are your PBLs committed in your repository? 
2. When you switch the branch did you stash save all your changes and pop the changes after you switch back?
3. When you switch the branch, do you choose "Overwrite working tree changes (force)?" 
If you do item 2 and 3, do you still get the issue?


Tom Jiang
ATK Gimmy Susan 11 June, 2020
Hi Chris

You are right, but the problem is not optimizing the PBL but avoiding the gost object and consequently the orphans in the ws_objects\* folder

Chris Pollach @Appeon 11 June, 2020
FWIW: Ghost objects should be eliminated if you "optimize" all your PBL's
ATK Gimmy Susan 11 June, 2020
Hi Chris

... mhm ... I understand.

However, I believe we can divide the problem in two.

one: some objects are in a 'strange' modified state that IDE have not well intercepted.
two: the presence of ghost objects (incorrect deletion from the IDE)

Chris Pollach @Appeon 11 June, 2020
Hi Gimmy;

  The Icon exchange tool might be an issue now as "under the hood", R2 has completely changed the icon mapping sub-system internally.  Food for thought. 

  Maybe Tom has some further thoughts?

Regards ... Chris
ATK Gimmy Susan 11 June, 2020

regarding the second question.

I am struggling to add PBL to another project.
The program refers to an old copy of the PFCs with many cross references on many libraries.
Could not isolate PBL.

If you deem it appropriate I can make you a copy of the entire project including the ws_objects \ *
( it's not a problem for me )
ATK Gimmy Susan 11 June, 2020
Desktop.rar (2KB)

Hi again

I attach as an example the two files related to the object "uo_tpage_errori".

1_uo_tpage_errori.sru = Export the object before refreshing
2_uo_tpage_errori.sru = Files from ws_objects\* folder after branch change

What I notice is a difference on row 1 and row 21.

The only thing I remember is that I used the 'Icon Replace Tool 2019' program taken from Appeon codeexcange to change the icons.
ATK Gimmy Susan 11 June, 2020
refresh.txt (59KB)

this is all the log
ATK Gimmy Susan 11 June, 2020
Immagine.png (144KB)

Hi Tom

Thanks for the reply.

Question 1.
I acted like this:
1) are on branch 1
2) I move to branch 2 using TortoiseGit
3) delete the file 'w_dockancestor'
4) I refresh
1) the error no longer occurs.
2) Powerbuilder IDE imports other files.
(remember that there is no need to import files as the PBLs are aligned with the ws_object \ * both in the local and remote repositories)
3) see attachment
Tom Jiang @Appeon 11 June, 2020
Hi Gimmy,

Thanks for reporting the issue with the detailed description!
The issue might due to a failure to import the object "w_dockancestor". If you remove the w_dockancestor from the source (ws_object) folder and then do a refresh, does it resolve the issue?

Can you put one of those PBLs in error in a test project and provide it us for further analysis of the issue? Please remove any sensitive data before uploading a test case. Thanks!


Tom Jiang
ATK Gimmy Susan 10 June, 2020
Immagine.png (198KB)


I have done other tests to verify the problem.

1) I committed by sending the pbl of both branch 1 and branch 2 to the remote.repository.
2) The whole project was commit and sent to remote repository. All objects in all libraries have a green dot.
3) I made a program that compares the presence of objects in a pbl with the files in the relative folder ws_objects\*

1) I am placed in Branch 2
2) I move to branch 1 and do a refresh with TortoiseGit. All right. There are no objects to update.
3) I move to branch 2 and do a refresh. The problem occurs !!! (Example: the refresh tries to import the 'w_dockancestor' file which generates an error as it lacks some references)

- see Image.
1) in my PBL there is no object 'w_dockancestor'
2) In the objects of my program (obtained with the LibraryDirectory instruction) the object 'w_dockancestor' appears
3) the file 'w_dockancestor' exists in the files of the ws_objects \ * folder.
4) The 'w_dockancestor' object MUST NOT exist. It was deleted.

I don't want to steal the job from Appeon engineers, but I suspect that:
- The IDE has not correctly deleted the file in the PBL, but only the possible address.
- This prevented the deletion of the file in the ws_objects\* folder
- This prevented GIT from keeping everything in sync.
ATK Gimmy Susan 10 June, 2020
Sorry Chris.

It's 2019r2 !!!

( i need more coffee )
Chris Pollach @Appeon 10 June, 2020
Thank you for that information Gimmy!

BTW: PB2017Rx does not support branching. All PB App source code must remain in the "main" branch. The same for PB 2019. Its only PB2019 R2 where Appeon introduced support for GIT branching (not SVN). However, the branch control cannot be accomplished within the PB IDE. You have to use the GIT Client software to switch branches.

Lets see what other suggestions the main support team has.
ATK Gimmy Susan 10 June, 2020
Hi Chris.
You are right.


Powerbuilder 2017r2 build 2323 ( now I have installed 2328 )
Git version 2.27.0.windows.1

Windows 10

I use 3 branches in the project
Chris Pollach @Appeon 10 June, 2020
Hi Gimmy;

  Can you tell us ...

1) GIT "server" software version & build that you are using?
2) GIT "client" software version & build that you are using?
3) Are you using PB2019R2 build 2328?

  In the mean-time, I will now transfer this ticket over to the main Support / Engineering team to see if they have any suggestions for you as to why this might be happening.

Regards ... Chris
ATK Gimmy Susan 10 June, 2020
Immagine.png (177KB)


The ws_Objects\xxx.pbl.src\*. * folder is not aligned with the contents of the xxxx.PBL

*Reproduce Steps:

Unfortunately, I am unable to systematically recreate the case. The problem exists, but I can't connect cause and effect.


It happened again !

We have been working with GIT for 2 years now, but sometimes we have this problems.
I am referring to the fact that we find the exports inside the ws_Objects\xxx.pbl.src\*. * Folder which are not aligned with the contents of the xxxx.PBL.

From the powerbuilder ide I see all the objects aligned (all with the green dot), but if I refresh, PB import some objects.

Analyzing them we find differences. This seems to me quite serious.
The problem is serious when the refresh (after a branch change) tries to import objects that refer to other non-existent objects (has been successfully deleted).
Refresh gives error and freezes everything.
Now, to get around the problem, I am forced to commit and push all the PBLs every time I have to change branches. (so I can avoid refreshing)
Very, very, very, very uncomfortable.

see attachment

Regards GMY
Windows 10
Database Type:
Database Version: