1. Yiannis Papadomichelakis
  2. PowerBuilder
  3. Friday, 21 June 2019 09:56 AM UTC

In PB2019, the application crashes when I use ShareObjectRegister() after dynamically changing the library list (by adding one or more pbds). This behavior is exactly the same as in PB 12.6. 

I noticed that Shared Object functions like SharedObjectGet, SharedObjectRegister are unsupported by Appeon, so I find nothing to replace them!

It’s hard to imagine a modern tool without any multi-threading capabilities, so do you know any workaround for this problem?

 

Accepted Answer
Yiannis Papadomichelakis Accepted Answer Pending Moderation
  1. Tuesday, 16 July 2019 14:01 PM UTC
  2. PowerBuilder
  3. # Permalink

I managed to solve this problem!

Our application have several global variables, some of them are structures, others are nonvisual user objects.

SharedObjectRegister() crashes the app after creating the global structure variable. Converting the structure to a non autoinstantiate user object, solves my problem!

It seems that PB has a problem when running constructors (even if they are empty) for global objects when creating a new thread.

So, no autoinstantiate, no problem!

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 11:28 AM UTC
  2. PowerBuilder
  3. # 1

Are you sure they are unsupported? They are not marked as obsolete...

Andreas.

Comment
  1. Yiannis Papadomichelakis
  2. Friday, 21 June 2019 11:36 AM UTC
They are not marked as obsolete probably because they don’t offer an alternative to this.

Check this:

https://www.appeon.com/support/documents/appeon_online_help/2015/workarounds_and_api_guide/ch04s02s15.html



"Shared Object functions like SharedObjectGet, SharedObjectRegister are unsupported by Appeon"



Now the workaround they provide (in the link)....could be a joke.... ;)







  1. Helpful
  1. Andreas Mykonios
  2. Friday, 21 June 2019 11:46 AM UTC
Well those documents are referring to Appeon for PowerBuilder, which was later renamed to PowerServer… Are you using Powerserver? I think that you aren't as I believe neither Dockable windows are supported.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 15:28 PM UTC
  2. PowerBuilder
  3. # 2

Hi Yiannis;

  How are you changing the library list ...

1) AddToLibraryList ()    // OR ...

2) SetLibraryList ()

Regards ... Chris

Comment
  1. Yiannis Papadomichelakis
  2. Monday, 24 June 2019 09:28 AM UTC
The behavior of AddToLibraryList() and SetLibraryList() is exactly the same. ShareObjectRegister() crashes the application when the library list is changed.

In fact, it crashes when ShareObjectRegister() tries to create a global structure we use to store some user session information. I will try to replace it with object and see what happens...
  1. Helpful
There are no comments made yet.
Yiannis Papadomichelakis Accepted Answer Pending Moderation
  1. Monday, 24 June 2019 07:49 AM UTC
  2. PowerBuilder
  3. # 3
I use AddToLibraryList(). I never thought that SetLibraryList() will behave differently, but I will give it a try.
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.