Page 1 of 1

Revolution crashes importing stack

Posted: Mon Sep 28, 2009 2:56 pm
by lharris
Hi
I'm trying to convert a HyperCard stack that contains 20,000 cards.
Rev crashes trying to open it. If I split the stack down to 100 cards it works fine.
Is there a limit to the number of cards a stack can have in revolution?
I have tried the obvious such as compacting, searching for corrupt or blank cards.
Thanks[/list]

Posted: Mon Sep 28, 2009 9:00 pm
by Mark
Dear lharris,

Since you can compact a stack, you should also be able to run Split & Recover, which you can download here. Download it and try to recover the stack. (Please note: there are two modes, one is split, the other recover. You need the recover mode).

This is definitely worth a try. I have helped quite a few people with S&R already. It is not a guarantee for success, though. Let me know the result.

Good luck,

Mark

Posted: Mon Sep 28, 2009 9:00 pm
by FourthWorld
Jacque Gay's excellent article on porting HC stacks to Rev may be helpful for general tips:
http://www.hyperactivesw.com/mctutorial ... altoc.html

In your case, you'll want to find some other way to store the data than on cards.

One reason Rev is so fast is that the entire stack file is loaded into memory whenever it's accessed, and 20k cards is a lot for it to work with.

The upside of Rev's loading the whole stack is that it makes most operations much faster and makes the sort of stack corruption HC users were all too familiar a very very rare thing.

But the downside is that its internal card management scheme is less forgiving for stacks that ignored Bill Atkinson's warning that "HyperCard is not a database". HC worked well enough as a DB that many people used it as such, and as long as one compacted regularly it could handle large numbers of cards with a grace I've not seen in any other xTalk.

Storing data outside of the interface has other benefits, like being able to update the UI without affecting the data store. While important for commercial work, for personal projects that may not be much of an advantage.

Options for data storage in Rev for a data set of your size would be either to store it as lists in custom properties (I've stored more than 100k records totaling more than 100MBs that way), or using SQLite, which is included with RevStudio and RevEnterprise.

SQLite isn't hard to learn and can accommodate a very large number of records, but personally for data sets below 50k records I generally prefer using custom properties.

Posted: Tue Sep 29, 2009 1:18 pm
by lharris
Well - no luck trying to get the stack imported - doesn't seem to be corrupted and anything over 100 cards dies. I have exported my data as an xml file so I might as well rewrite from scratch.

As a side note - I want to implement a calendar with a visual interface similar to ical - I looked a datagrids for the day and week view - is there a way to format a datagrid so the first column (just the times) can not look like data in a field - I want a 12 hour visible portion but to be able to scroll to other times - datagrid forms looked like an easy way to implement this.

Any ideas?
Thanks

Posted: Tue Sep 29, 2009 1:30 pm
by Mark
lharris,

Have you tried S&R?

Mark

Posted: Tue Sep 29, 2009 2:07 pm
by lharris
Yes - split and recover failed with an error about being unable to delete a protected card in the destination stack - I ran a script to unprotect all the cards but that didn't help.
Since revolution wants data to be stored externally (unlike HC) I was going to do a rewrite anyways - At least my data is safe.
Thanks

Posted: Tue Sep 29, 2009 2:30 pm
by Mark
lharris,

What happened when you re-opened S&R and simply continued? (Note: you might have to start all over from the begining now). Please make sure to read the file "Obligatory Read Me.pdf". It is called like that for a reason.

Mark

Posted: Tue Sep 29, 2009 2:36 pm
by lharris
It churned for a while then gave another error - tried a few times and the filesize was not increasing. I will try again and see if it finally gets to the end of file.
Thanks

Posted: Wed Sep 30, 2009 1:42 pm
by lharris
Hi - no luck with S&R.
I'll have to start over - good way to learn revolution.

Posted: Wed Sep 30, 2009 1:48 pm
by Mark
Hi lharris,

Do you have any additional information? How far does the recover get, what ar the errors, do you notice anything weird?

Mark