weird card deletion anomalies

Richard Gaskin ambassador at fourthworld.com
Wed Sep 9 10:16:48 EDT 2009


I'm rewriting my script editor to use multiple cards in a single window 
rather than a separate window for each script.  The migration has been 
going well, with one oddity:

When I first set this up, I had the stack's closeStack handler delete 
every card from #2 on:

   go cd 1
   repeat with i = 2 to the number of cds
     delete cd 2
   end repeat

This worked well enough, but I found that about half the time I saved 
the Rev engine would crash.  The file was fine - I can reopen it, edit 
anything easily, and even save it again.  But only after it creates 
multiple cards, about half the time it crashed during the save command, 
while half the time it saved just fine.  FWIW, the crash occured before 
the "~" copy was made, so it's something early on in the save routine.

On a lark I move the card deletion from the closeStack handler to a 
preOpenStack handler.  Now it works fine all the time  - I can save 
without difficulty.

Anyone else seen odd crashes during save?

I've checked the RQCC, and there's only one report of a crash during 
save which doesn't seem related to my circumstance.

It's all good now, I'm happily editing away, but it's the sort of thing 
that makes me wonder if I've tripped across some rare but 
possibly-devastatig-for-some-client-project-down-the-road issue....

--
  Richard Gaskin
  Fourth World
  Revolution training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com



More information about the use-livecode mailing list