Hi all
Got an interesting (and highly frustrating problem) that I hope someone can solve
The program we are creating uses multiple stacks, all of them are substacks of a main stack, (this allows us to swap stacks in and out so we can work on different parts of the program without overwriting each others work)
But we;ve come up against an odd problem, it only happens with one substack. Frequently when we open the substack, or swap it out for a newer version of itself or so forth, it randomly duplicates itself and causes a "Stack with identical name is present" error, but the duplicated stack is an older version which doesn't have any of the most recent work we've done on it, (as you can imagine this is a highly frustrating error)
Any ideas?
Thanks
David
Stack duplication error
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Stack duplication error
Hi David,
Stacks don't duplicate by themselves. You must have a script somewhere that causes it to duplicate or you are opening the new stack while the old one is still in memory. What is the procedure exactly, which you follow to replace the old stack with the version? Don't just say "we delete one stack and replace it with the new one". Provide all details, from starting LiveCode until the error appears.
Kind regards,
Mark
Stacks don't duplicate by themselves. You must have a script somewhere that causes it to duplicate or you are opening the new stack while the old one is still in memory. What is the procedure exactly, which you follow to replace the old stack with the version? Don't just say "we delete one stack and replace it with the new one". Provide all details, from starting LiveCode until the error appears.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 44
- Joined: Thu Jul 19, 2012 1:49 pm
Re: Stack duplication error
Hi Mark
Sorry for the lack of details
When we want to replace the stack we remove it from the current Mainstack via the property inspector, then remove that separate stack from memory (rClick->Close and Remove from Memory) Then we open the new version of that stack and add it into the mainstack again via the property inspector.
This issue keeps happening and is repeatable, but it happens at different (seemingly random) points, there isn't a single script that opens the stack, I know this for a fact as we're using it like a library, so groups are copied from it rather than the stack being displayed. I've also done a search of the entire program for a place where the stack is opened, there wasn't one.
It's a major pain of an error
I hope this is enough information, if not just mention and I'll try to add more
Cheers
David
Sorry for the lack of details
When we want to replace the stack we remove it from the current Mainstack via the property inspector, then remove that separate stack from memory (rClick->Close and Remove from Memory) Then we open the new version of that stack and add it into the mainstack again via the property inspector.
This issue keeps happening and is repeatable, but it happens at different (seemingly random) points, there isn't a single script that opens the stack, I know this for a fact as we're using it like a library, so groups are copied from it rather than the stack being displayed. I've also done a search of the entire program for a place where the stack is opened, there wasn't one.
It's a major pain of an error
I hope this is enough information, if not just mention and I'll try to add more
Cheers
David
-
- Posts: 44
- Joined: Thu Jul 19, 2012 1:49 pm
Re: Stack duplication error
Thanks for all the help guys but we've solved the problem (sort of)
As it turns out the stack was being opened, but not in the way i was expecting, the name was being constructed by variables and then open stack <var> was called.
But this code was running for multiple stacks and only this one duplicated itself, any ideas on why that might be happening? Even if the stack wasn't in memory it was being opened which makes even less sense to me
EDIT:
No wait, we haven't solved this, we've now taken out the stack entirely and made a new one with the same cards and groups etc, on it.
Just to make this clear, there now isn't a stack with the old name actually in the program, still it's appearing.
(but not overwriting anything as it's the only one with the name)
Anyone got any ideas about it now? The stack no longer even exists on the computer and it's still coming back...
Thanks
David
As it turns out the stack was being opened, but not in the way i was expecting, the name was being constructed by variables and then open stack <var> was called.
But this code was running for multiple stacks and only this one duplicated itself, any ideas on why that might be happening? Even if the stack wasn't in memory it was being opened which makes even less sense to me
EDIT:
No wait, we haven't solved this, we've now taken out the stack entirely and made a new one with the same cards and groups etc, on it.
Just to make this clear, there now isn't a stack with the old name actually in the program, still it's appearing.
(but not overwriting anything as it's the only one with the name)
Anyone got any ideas about it now? The stack no longer even exists on the computer and it's still coming back...
Thanks
David