Bug 7180

Missing empty line in source code causes SCC difference 16 November, 2021

Roland Smith
26 August, 2021
Product: PowerBuilder Category: IDE
Version: 2019 Build: 2170
Classification: Publishing: Public
Priority: P3
Status: Reproducing Reason:
Communication Status: Waiting for Customer
Mark Lee @Appeon 16 November, 2021
#9
Hi Roland,

Thanks for your feedback.
After you change it to use the standard ORCA functions, please tell me your results

After testing and analyzing for a long time, we reproduced the line dropping behavior locally without directly handling the source code.  Please confirm whether the problem you encountered is consistent with the problem we encountered. Our steps to reproduce the issue are as follows:
1. Add a non-visual object and add instance variables and functions to the object at the same time, and save it. At this time, there is no blank line between "end variables" and "forward prototypes."
2. Modify the non-visual object. For example, add a function and save it. At this time, there is a blank line in the above source code.
3. Modify the non-visual object and delete a blank line at the end of the Instance Variables window. At this time, there is no blank line in the source code above.
If your problem only happens when exporting/importing objects, then please try to find the steps to reproduce this problem for us to analyze.


Regards,
Mark Lee
Roland Smith 10 November, 2021
#8
It is still happening. I created a custom IDE wizard to import objects from the local source control folders into a work library. Then when done the changes, the wizard exports the object back to the local source control folders.

The LibraryImport function only supports DataWindow objects so I am using the ORCA functions provided by the PBDEV***.DLL library. From what I can tell, standard IDE wizards that create objects use the cp_importobject function to import the source code. I think there may be a bug in cp_importobject.

I'm going to change it to use the standard ORCA functions and see if the problem goes away.
Mark Lee @Appeon 09 November, 2021
#7
Hi Roland, 

Are you still facing this matter? 
Is there anything else we can do to keep helping?

Regards,
Mark Lee
Mark Lee @Appeon 27 August, 2021
#6
Hi Roland,

Thanks for reporting the problem. 
We will try to analyze it and see if we can reproduce it on our side. In the meantime, it would be better if you could provide a reproducible case and the repro steps for us to further analyze it so that we could quickly locate what the problem is. Thanks in advance.
 
Regards,
Mark Lee
Roland Smith 26 August, 2021
#5
I just did an export of a window and it added the missing line. Maybe the LibraryExport function is randomly dropping the line?
Roland Smith 26 August, 2021
#4
I exported the object using an IDE wizard I wrote that uses the built in LibraryExport function. I don't think that is where the line was dropped. It must have been when copying the object from the home library to the work library.
I just tried to reproduce it on the same object and it didn't happen. It seems to be random except it only happens to userobjects, not windows or datawindows and only that one line drops.
Chris Pollach @Appeon 26 August, 2021
#3
Hi Roland;

  This issue would be a hard one for the Engineering team to pin down as a) your not use SCM when connected to the IDE; b) I assume that you do not have a reproducible test case and c) your are introducing a possible issue yourself by exporting the App source code and then uploading it via a secondary means (another area of possible loss of a CR / LF.

  I will transfer this ticket to the main support / engineering team for their review & feedback though.

Regards ... Chris
Roland Smith 26 August, 2021
#2
We use PowerGen to rebuild all the libraries overnight and it appears that the blank line is restored by that process because the object in question was exported/checked-in yesterday and I downloaded last nights libraries.
Roland Smith 26 August, 2021
#1
source_compare.png (98KB)

I'm not 100% sure of when this happens but sometimes a non-visual object will not have the blank line that usually is between these two:

end variables

forward prototypes

I attached a screen shot of two versions of the same object, one has the blank line and the other does not. The one on the right is in a work library and the one on the left is in its home library. I either did a save as or dragged it in the library painter to get it into the work library.

We have 79 libraries and 12,000 objects so we do all our coding in work libraries. We aren't using source control within the IDE, we export objects from the work library to the library folder and do check-in from Visual Studio.

I am pretty sure this is a Sybase bug as this has been happening to me a long time.
OS:
Windows 10
Platform:
Database Type:
Database Version: