Corrupted Stack

Richard Gaskin ambassador at fourthworld.com
Sat Aug 10 16:40:29 EDT 2013


Joe Hamburger wrote:

 > The corrupted stack I'm talking about appears fine. I can open
 > any card in it and do whatever I want within the stack. The
 > problem arises when I use a script in another stack to alter
 > the contents of fields in this stack.
...
 > My question is, since I can open the damaged stack, is it safe
 > to cut from it and paste it into a new replacement stack? Would
 > I be better off to abandon the damaged stack and start completely
 > fresh.

Given the general robustness of LC and the specific symptoms being 
limited to editing field contents, my hunch is that you should be able 
to safely copy stuff out into a new stack - except that one field's 
contents, of course.

In fact, you may be able to continue using the stack you have if you can 
at least delete the field's contents, or perhaps the field itself.

But before you do, it may be helpful to write out the field's contents 
to a binary file for review and analysis:

   put fld "Whatever" into url ("binfile:"& \
     specialFolderPath("desktop")&"/myWeirdData.txt")

It may also be good to save a copy of the errant stack itself for 
further review.

It would be interesting to see if there are non-ASCII characters there. 
  One might expect that NULLs can be problematic, but I've had NULLs in 
fields without crashing.  Maybe some other sequence there is causing the 
engine to go wonky?

Where did the data in the field come from?  Was it all typed, or 
imported from a file made by another program, or pasted?

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys





More information about the use-livecode mailing list