• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
every now and again SDK becomes unusable...
#10
(05-10-2021, 09:26 PM)mark.h Wrote: The canelaDB libraries are being libraried multiple times. This happens because in your mainstack stack script, the preOpenStack handler calls "initializeCanelaDB", which starts using the canelaDB libraries. If this occurs while gCDBAuthKey is incorrect, you will see the error that you saw.

The reason your preOpenStack handler is getting called multiple times is because you have substacks, and whenever those substacks are opened, a preopenstack handler is sent. The preOpenStack handlers aren't being explicitly handled by the substack, so they pass to the mainstack. I recommend one of the following:

1. Move your preopenstack handler out of your stack script, and into the first card of your stack
or
2. Update your preopenstack handler to check the owner of the target:
Code:
on preOpenStack
   if the owner of the target is me then
   initializeCanelaDB
  end if
end preOpenStack
or
3. Add an empty preopenstack handler to all of your substacks

I think 1. or 2. will work best for you, though I would also still recommend that you don't assign any values to gCDBAuthkey

Thanks Mark - this does sound like a much more likely culprit!

I've gone with (2) and changed 

Code:
initializeCanelaDB

to 

Code:
If the owner of the target is me then initializeCanelaDB


in the existing preOpenStack handler as that was the smallest change; so far so good - if that causes a similar issue again, i'll try (1)

thank you very much for your help!
Stam

(05-10-2021, 06:16 PM)mark_talluto Wrote: Let me get a new build of the libraries with both of these changes introduced. Your feedback on this will help us solve this mystery.

-Mark

Thanks as always for your tireless work Mark.

So far the issue hasn't recurred, will feed back...

Best regards
Stam
  Reply


Messages In This Thread
RE: every now and again SDK becomes unusable... - by stamatis - 05-18-2021, 12:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)