1. Yiannis Papadomichelakis
  2. PowerBuilder
  3. Friday, 21 June 2019

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
2
Votes
Undo

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.
  1. Tuesday, 16 July 2019
  2. PowerBuilder
  3. # Permalink
Yiannis Papadomichelakis Accepted Answer Pending Moderation
0
Votes
Undo
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.
  1. Monday, 24 June 2019
  2. PowerBuilder
  3. # 1
Chris Pollach Accepted Answer Pending Moderation
1
Votes
Undo

Hi Yiannis;

  How are you changing the library list ...

1) AddToLibraryList ()    // OR ...

2) SetLibraryList ()

Regards ... Chris

Comment
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. Yiannis Papadomichelakis
  2. Monday, 24 June 2019
There are no comments made yet.
  1. Friday, 21 June 2019
  2. PowerBuilder
  3. # 2
Andreas Mykonios Accepted Answer Pending Moderation
0
Votes
Undo

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

Andreas.

Comment
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. Yiannis Papadomichelakis
  2. Friday, 21 June 2019
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. Andreas Mykonios
  2. Friday, 21 June 2019
There are no comments made yet.
  1. Friday, 21 June 2019
  2. PowerBuilder
  3. # 3
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.