Mainstack contains itself

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

Mainstack contains itself

Post by montymay » Tue Sep 17, 2019 8:28 pm

Running LC 9.5 Business and Windows 10. I have a mainstack consisting of many cards but also containing substacks. Recently I noticed in the Project Browser that there is listed a substack having the same name as the mainstack! Opening that substack reveals a repetition of the cards of the mainstack and its substacks. Opening the second recursion repeats the behavior. (Infinite recursion here?) Below is a screenshot of the Project Browser as it appears upon first opening it. The substack appears three or so rows from the bottom.

How do I delete the substack? (Less importantly, how could this have happened?) RIght clicking the unwanted substack reveals a delete item, but it does not remove it.

Tried building a standalone but I get a error that is discussed in the following thread:
posting.php?mode=reply&f=8&t=29395
Also below is a screenshot of the error dialog:
Image

This unwanted repetition of the mainstack as a substack of itself may be the problem.

Thank you for any suggestions.

Monty

Image
Capture.PNG
Attachments
capture2.PNG

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9386
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Mainstack contains itself

Post by richmond62 » Tue Sep 17, 2019 9:02 pm

Well: infinite recursion or infinite cloning of the mainstack into itself?

I would suppose you can discount the latter because
your computer would be well on the way to some sort of memory shortage.

I would suggest,as a first call, you look at your stack with the Application Overview stack:
-
AppOver.jpg
-
This should at least give you an idea as to whether it is a fault inside the stack itself, or just
a fault with the Project Browser (something I NEVER use, having always favoured the Application Overview).

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9386
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Mainstack contains itself

Post by richmond62 » Tue Sep 17, 2019 9:06 pm

Should this problem be NOT just a fault of the Project Browser I would do the following:

Save all the substacks into a folder as main stacks (i.e. detach them from your main stack),
the save your main stack.

Then reopen the main stack and see what the Project Browser or App Overview show.

If, as I suspect, the main stack now has NO substacks, reimport your 'normal' substacks
as substacks and save the thing.

That may just sort your problem out.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Mainstack contains itself

Post by FourthWorld » Tue Sep 17, 2019 11:32 pm

I'm most interested in how it got this way. Was there any point while you were working that you say a warning about duplicate stack names?

To remedy this might work.(I say "might" only because I've never seen this circumstance before):

1. Make a backup of your file. If anything goes wrong, don't call me. ;)

2. In the Message Box run:

Code: Select all

lock messages; delete stack "db10" of stack "db10"
Let us know how that goes.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9386
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Mainstack contains itself

Post by richmond62 » Wed Sep 18, 2019 8:27 am

It would be interesting to see if this condition can be duplicated.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”