Revolution crashes importing stack

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lharris
Posts: 20
Joined: Fri May 22, 2009 5:27 pm

Revolution crashes importing stack

Post by lharris » Mon Sep 28, 2009 2:56 pm

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]

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Sep 28, 2009 9:00 pm

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
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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Mon Sep 28, 2009 9:00 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

lharris
Posts: 20
Joined: Fri May 22, 2009 5:27 pm

Post by lharris » Tue Sep 29, 2009 1:18 pm

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Sep 29, 2009 1:30 pm

lharris,

Have you tried S&R?

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

lharris
Posts: 20
Joined: Fri May 22, 2009 5:27 pm

Post by lharris » Tue Sep 29, 2009 2:07 pm

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Sep 29, 2009 2:30 pm

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
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

lharris
Posts: 20
Joined: Fri May 22, 2009 5:27 pm

Post by lharris » Tue Sep 29, 2009 2:36 pm

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

lharris
Posts: 20
Joined: Fri May 22, 2009 5:27 pm

Post by lharris » Wed Sep 30, 2009 1:42 pm

Hi - no luck with S&R.
I'll have to start over - good way to learn revolution.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Sep 30, 2009 1:48 pm

Hi lharris,

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

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

Post Reply