Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Mon Nov 23, 2009 6:21 am   

[3.12] Corrupted package
 
I was working on one of my packages when it locked up and I had to ctrl+alt+del out of cmud. When I loaded it back up the settings were completely empty. It's still about the same size, and opening it up in notepad I can see that the triggers, aliases, ect are apparently still there. For whatever reason, I had no backups for this settings, so I'm sort of at a loss here. Is there any way to salvage this package?
Reply with quote
Jesse-Linoge
Newbie


Joined: 08 May 2009
Posts: 4

PostPosted: Mon Dec 14, 2009 4:57 pm   
 
I had the same exact thing happen to me last night.
Cmud crashed when I opened my session all 7 of my packages were corrupted in this manner.
Even loading them individually in other sessions they show up empty yet like he said in a text editor you can clearly see all my settings exist.
I have a copy of packages affected like this if it will help.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Dec 14, 2009 5:58 pm   
 
CMUD settings are stored in an SQL database. It is nearly impossible to lose the settings completely in the database. My guess is that your session is loading some other package file somehow, or that there is a file permission problem that is preventing CMUD from loading the file. You might reboot Windows in case Windows has the file locked somehow.

And yes, if you have a *.pkg file that isn't loading you can email it to me at sales@zuggsoft.com.

Also, the *.pkg files are normal SQLite database files, so you can also Google and find utilities that allow you to open SQLite databases. You can then recover your scripts from the database directly.

Finally, CMUD usually makes a backup of your packages in a *_bak.pkg file name. You can also turn on the Automatic Backup features in your Preferences to cause a new backup file to be created whenever you make a change to your current file, and control how many backups you want to keep.
Reply with quote
Jesse-Linoge
Newbie


Joined: 08 May 2009
Posts: 4

PostPosted: Mon Dec 14, 2009 6:56 pm   
 
Emailed you a copy of one of my packages that is no longer loading.
I tried looking at the package with sqlite browser but the settings table was empty so ended up just cutting and pasting from notepad on the packages that didn't backup correctly.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Dec 14, 2009 8:05 pm   
 
I got your file and looked at it. All of the records in the file had been deleted. Almost like you used a #KILLALL command or deleted all of the settings in the settings editor. The text data that remained in the file is left from the deleted records and may not be completely intact. When SQLite deletes a record, it just marks the record as deleted and can reuse that disk space later.

So yes, loading it in Notepad might let you recover some settings, but some others might be gone.

I can't think of any way for a single crash to cause the database to get erased...databases just don't work that way. CMUD does transaction processing when saving to the database to ensure that data isn't lost. If you could find a way to reproduce the crash that caused this, then I might be able to look into it further. But I can't think of any way to make this happen.
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Wed Dec 16, 2009 12:03 am   
 
I sent you my package file as well.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Dec 17, 2009 5:53 pm   
 
I got your file as well. But as I said above, I still need to see the crash dump that is related to this along with a procedure to reproduce the crash.
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Thu Dec 17, 2009 11:11 pm   
 
There was no crash, Cmud simply froze. I believe I was simply editing my settings at the time.
Reply with quote
cuprohastes
Wanderer


Joined: 22 Oct 2006
Posts: 92

PostPosted: Mon Dec 21, 2009 7:05 pm   
 
Oh this happens all the time.

The problem is there's no crash message, so there's no dump to send.

Usually what happens is about once a week, CMUD opens up, all my package contents are missing and CMUD happily writes the corrupt package to the backup.
The trick is to use three backups and when you see your package is empty, immediately copy and re-name the third backup to prevent it being over-written too.
That or use a backup program to keep multiple file versions around so you can revert to the last.
Or usually a combination of both as CMUD desperately erases it's own backup files.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jan 04, 2010 6:21 pm   
 
If CMUD is freezing while you are editing your settings, then it sounds like a threading problem with a script that is running at the same time you are editing. Do you use any #WAIT commands anywhere in your script? If you run the #THREAD command, does it show any background threads that are still running?

You might also want to try turning off the "Auto Update" option in the View menu of the settings editor to see if that helps. That will prevent the settings editor from trying to update itself when a background script tries to modify your database.

Finally, remember that CMUD has an Automatic Backup settings in the Preferences where you can set the number of automatic backups to retain. So you don't need any external backup program.
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Fri Jan 08, 2010 7:54 am   
 
I use neither. This was a one time incident, and have no clue what triggered it with no information to give you other than my package.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net