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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 27, 2012 4:01 am   

Dealing with Data Corruption (work in progress)
 
Overview of corruption, what causes it, how to avoid it, etc. Specific how-tos come in the next few posts.
_________________
EDIT: I didn't like my old signature
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 27, 2012 4:01 am   
 
CMud comes with a set of default packages already installed for you. This list will perhaps change, but as of now they include
Quote:

EnglishDirections
EnglishKeypad
ClickableURLs
Default Settings (not really sure on this one, but it's one of the hidden tabs in the Package Editor)


Some of the premium session icons (the ones that get auctioned off each year) may also come prepackaged with a basic, game-provided package, but this is not always true and is not guaranteed to work.
As is basically the point in a program such as CMud, the user can create their own packages.

It will eventually be the case that something happens and none, one, some, or all will get messed up in some way. While we aren't able to create something from nothing, there is a process to put all the important pieces of whatever's left back into their proper places. This is generally referred to as the XML Export/Import Process.

1)open up CMud
2)select a session to open and open it in offline mode (offline is handier since there's no data coming in)

3)turn off triggers (click the gun icon on the command line until it shows a red X) and parsing (click the computer icon on the command line until it shows a red X)
-This prevents anything from executing while you attempt the fix.

4)Close all the windows associated with the package you wish to fix
-)sometimes you need to create a new package file entirely, but if you try to remove a package while any window contained in that package is currently visible you'll generate an AV.
-)every session needs a minimum of 1 window visible, so you won't be able to close this one. To get around this, you can create a dummy package that simply contains a window
and no scripts that can step in to be this last window.

5)open up the Package Editor and click on the appropriate package tab
-)if your session only has the "main" package and you have Show Default Packages turned off, there won't be any tabs.
-)click on the View menu and select Show Default Packages to turn this feature on.
-)each tab represents one package file. The Export (All) menu option will work on just this tab.

6)Click on the File menu and choose Export XML (All)
-)sometimes there may be bugs with the exporting functionality or the data is just too far gone (or far too large) to export properly, it is good practice to take a look at this XML file
to make sure everything exported properly.

7)click on the Edit menu and choose Package Properties
-)this set of information is not included in the export process.
-)this set of information is used in the Package Library.
-)it's handy to store this info in a separate text file in case you need to replace the package file.

8)right-click on the package tab and select the Remove option
-)this removes the package association from your session

9)find and delete the package file
-)though removed from your session, with CMud/your session open the file might still be considered "owned" by CMud. This would prevent deletion, so just close CMud and then delete
before reopening CMud and resuming the export/import process.

10)click on the File menu and create a new package
11)click on the File menu and choose Import XML to import your xml data
-)just like when you exported, it's a good idea to look over your imported data to make sure it was properly executed (a few items don't import well yet, or may have various properties
changed.)

12)add back in any Package Properties data you had

Note that this is the longest, most extreme version of what to do. You can reasonably skip a few steps or do them slightly differently with no/slight changes in result.
_________________
EDIT: I didn't like my old signature

Last edited by MattLofton on Fri Jul 27, 2012 4:48 am; edited 1 time in total
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 27, 2012 4:01 am   
 
Layouts control how windows look and operate. Currently, layouts are applied to:

-)sessions
-)the Package Editor

There may be also be one for the Untitled session or other core parts of CMud (mapper, text editor, db module, etc), but I currently do not have such in my installation.

When a layout corrupts, you will typically see duplicated windows, "missing" windows, windows which don't seem to be dockable (after all other docking issues have been eliminated), or windows that do not retain their settings. Fixing layout corruption can be done in several different ways, with the main similarity being that the existing layout is simply not used during session load. The most convenient method can be done during session load and is commonly referred to as The SHIFT Trick.

1)open CMud
2)select the session you wish to load

3)while holding down the SHIFT key (now you know why it's called the SHIFT trick Very Happy ) open the session in Offline Mode

4)rearrange the windows as you desire
-)because your existing layout is not being used, all of your data windows will be displayed in a tabbed list.
-)you apparently are not allowed to dock windows if other windows are minimized. Either close them or move them out of the way of your docking target.
-)system windows like the mapper are not loaded (presumably so it's not in the way when you're rearranging the main/child windows).

5)when you are finally done with rearranging, click on the Layout menu and choose Save Layout
-)it's a good idea to Lock Layout as well
_________________
EDIT: I didn't like my old signature

Last edited by MattLofton on Fri Jul 27, 2012 5:14 am; edited 1 time in total
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 27, 2012 4:02 am   
 
There are three files associated with the mapper window, each one with a different fix:

the map database (sessionname.dbm)
1)close CMud
-)if the mapper has been opened, CMud will still have ownership of the mapfile even if you have already closed the session it's used in.

2)run the MapConvert v1.3 utility (can be gotten on the CMud downloads page)

3)choose the appropriate mapfile in the boxes on the left
-)the boxes on the right are for converting the mapfile to the specified format (usually for zmud<-->cmud v3 conversions but can also do zmud<-->zmud or cmud<-->cmud).

4)click the Repair button

the map configuration (sessionname.zfg)
1)close CMud
-)if the mapper has been opened, CMud will still have ownership of the mapfile even if you have already closed the session it's used in.

2)find and delete the appropriate .zfg file
-)this file typically doesn't corrupt.

3)back in CMud, open session and then the mapper
4)run the Reconfigure Wizard
5)go into the Map Configuration window to adjust settings

the customizable toolbar (mapper.tbr)
1)close CMud
-)if the mapper has been opened, CMud will still have ownership of the mapfile even if you have already closed the session it's used in.

2)find and delete the mapper.tbr file
-)might be reset as part of the layout fix.
-)this file typically doesn't corrupt.
_________________
EDIT: I didn't like my old signature

Last edited by MattLofton on Fri Jul 27, 2012 5:35 am; edited 1 time in total
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 27, 2012 4:02 am   
 
The session database is actually two files, sessions.db and sessionkeys.db. Sessionkeys.db stores the password protection you can put on sessions, while all other properties of the session are stored in sessions.db.

Fixing the session database is a rather inconvenient process, as there is no actual "feature functionality" within CMud for it.

1)close CMud

2)find and delete the sessions.db and sessionkeys.db files
-)the folder structure of your CMud data directory and the files contained there are not disturbed.

3)open CMud

4)create new sessions for any user session you'd like to bring back
-)best to do this one session at a time.
-)each session will automatically reuse the main package file and the mapper files if they exist.
-)if you had more than one user package, you need to re-add those to the session either via the session properties window or via the Package Editor.
_________________
EDIT: I didn't like my old signature

Last edited by MattLofton on Fri Jul 27, 2012 5:46 am; edited 2 times in total
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jul 27, 2012 4:03 am   
 
Other files used by CMud, or accessed by users (ie, SQL databases)
_________________
EDIT: I didn't like my old signature
Reply with quote
adamjgp
Newbie


Joined: 24 Jan 2013
Posts: 6

PostPosted: Sat Feb 23, 2013 2:28 pm   
 
4)Close all the windows associated with the package you wish to fix
-)sometimes you need to create a new package file entirely, but if you try to remove a package while any window contained in that package is currently visible you'll generate an AV.
-)every session needs a minimum of 1 window visible, so you won't be able to close this one. To get around this, you can create a dummy package that simply contains a window
and no scripts that can step in to be this last window.

Ok, I have been using cMUD for a while now, and it is a half decent client. There are lots of bugs that drive me absolutely crazy. Mainly this corruption one. I try to keep my configuration files in my dropbox folder so that I can mud from different computers and have the same settings (crazy i know, right?). However, no matter what computer I try to use, I can never reliably get a session to open. I typically only get my a secondary window to show up, which is use to capture any messages I get.

I tried to execute your instructions to recover the data corruption, but when I get to:

4)Close all the windows associated with the package you wish to fix

I have an issue. When I "Close all the windows associated with the package you wish to fix" It shows me the "Open Session" dialog. I think that you mis-worded this step or something. Let's put that aside for now. I would also really really really like a way to change the default session settings, so that every time I make a new character on my mud I don't have to go through and set the font, change color highlighting, and create basic triggers. I've gone through all the options in cMUD related to settings files, and the only one I could find that woudl change settings is the packages, and by trying to edit/copy/save I am somehow corrupting the packages.

Maybe this isn't the right spot for this, but I paid $40 for a piece of software that in my opinion doesn't work. I spend more time trying to trouble shoot data corruption than I spend actually mudding.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2307

PostPosted: Mon Feb 25, 2013 10:03 pm   
 
No, this is not the right spot for this. There is a proper solution for this, but you should ask the question in a separate post. The problem in this case is not the software, but that you are not properly using packages.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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