1. Miguel Leeuwe
  2. PowerBuilder
  3. Friday, 29 December 2023 08:19 AM UTC

Hi,

We have several PB apps that share some common libraries (like the PFC ones for example). Whenever I've done a full build of an app and want to run another app, I have to do a full rebuild of that app first. If not, things blow up randomly and I even get values of global variables shown as data retrieved in datawindows. When I do the full rebuild, without changing any code, all goes fine.

It's been 7 years with this problem and it takes a lot of time having to do full rebuilds all the time when switching to run another app. I know I could just copy the shared libraries for each app to a different path, but I don't want to duplicate them when not needed.

Has anyone seen this too or have an explanation for it?

regards

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 29 December 2023 13:59 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Miguel;

  This is a known behaviour after the IDE detects that ancestor objects have been recompiled. The reason being in the way instance variables are allocated memory wise in inherited objects. They must account for changes in instance variable location, data type changes, shared variables, etc. These changes dictate how a runtime objects memory mapping turns out. Basically, object base address + offset - for the length of (taking into account alignment on word boundaries).

  I think that the new compiler architecture coming in PB 2025 could really help you here significantly reducing that compile time on related apps having to rebuild after a PFC base object update. 

Regards ... Chris 

Comment
  1. Miguel Leeuwe
  2. Friday, 29 December 2023 14:53 PM UTC
Hi Chris,

Yes, but what baffles me is that there are no changes at all ... It's just a matter of having to recompile. Indeed hopefully 2025 will reduce this.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 29 December 2023 15:18 PM UTC
Yes, the IDE looks at the PFC libraries as being a more recent build so it basically "plays it safe" by forcing a full build to ensure that everything else in the app is copesthetic.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 29 December 2023 14:41 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Miguel - 

I'm thinking along similar lines to what Chris has outlined, except I'm wondering if the need to recompile is largely due to differences in the global variables that are defined/used by each app.

Our commercial app is PFC-based, and for each customer we build a unique application based on a common/shared set of PFC and many additional common application libraries - all without experiencing the issue you describe.

The key, I believe, is that the application object (where the definitions for all global variables reside) for each customer-specific version of our app uses the same set of global variables laid out identically. Using this strategy, the relative offsets to global variables and memory mapping for global variables that Chris describes do not change between apps. Customer-specific settings are either contained within a database table or in a "setup" non-visual object is unique to each customer, but is named the same and contains a common/shared set of access methods.

I realize this specialized strategy/approach may not be feasible in your case, but it works well for us.

Happy new year!

Comment
  1. Miguel Leeuwe
  2. Friday, 29 December 2023 14:59 PM UTC
Happy new year John!

Yes, see also my reply to Chris. What seems weird to me is that there are no code changes at all. It's just the recompile needed to make things work correctly. Anyway, I'll just keep recompiling or maybe one day I'll decide to duplicate all of the shared libraries for each application. Maybe I'll be able to figure out which of the libraries exactly is causing the problem.

regards
  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.
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.