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


Joined: 17 May 2005
Posts: 108

PostPosted: Sat Jul 07, 2012 7:13 am   

Package Corruption Issues
 
So, I've been having a ton of trouble with package corruption. I regularly play a dozen or so characters, and every time I turn around, one of them is corrupted. One session in particular has been corrupted three times this week, others rival it. So, I have a few questions pertaining to this problem.

1. Why is this happening? I have re-downloaded, uninstalled, and reinstalled CMud repeatedly to no effect, and I have some very minimally scripted sessions which seem no less prone to corruption than those with a ton of scripting. I used ZMud for close to a decade and never had a single package go bad, and I abused the hell out of it. Seriously, I ran ZMud off a thumb drive for several years while working on the road, simply by memorizing my license key and de-licensing it every time I was going to a different computer.

2. What is the proper procedure for exporting/importing a session? At this point, I try to keep a backup export of every character's package files, but importing is such a pain that I want to put it off. It goes like this:

Open CMud
Close the session-picking window
Open the Package Editor
Choose import XML, select and open the appropriate XML file
Readjust parent/child windows
Close the "untitled" window in the package editor that is always created at this point--Cue CMud's Bug window
-If continue application causes a second bug window to pop up, give up, close CMud, start over
After deleting the window in the package editor, attempt to close the actual "untitled" window itself--Cue bug notice again.
If I don't have to start over now, save package
Close session--cue bug warning
Reopen session with newly saved package
Scratch my head and wonder why opening the session causes two duplicate windows to open, both connecting to the same
session.
In the package editor, delete the window that doesn't have any child windows.
--Don't try to close the actual window at this point, that will just cause another bug warning or 17, instead, close session and reopen.
Now reset default color--do not hit "set as default" or "apply" because those don't work, they cause my new settings to go away
as soon as I close the session and reopen it. Hit OK instead (it took me a month to figure that out).
Now reopen options to set spam protection up. Hit OK.
Reopen options again. Turn on "show tick timer." Hit OK.
Now, sometimes re-setup spellup triggers, because database variables sometimes blank out. (Now I copy and paste them to
another character right before importing, so I can paste the non-blank variables back in afterwards).
Open another character file after realizing that English directions/keypad/clickable URLs packages aren't there.
-if this doesn't fix (re-add) those packages, resort to reinstalling CMud.
Once another session is open, notice session tab is "untitled." Rename it.

Repeat the day after tomorrow.


How can I make this less painful?

Just out of curiosity, couldn't CMud automatically export to XML when a session is shut down, and automatically import
when the session is opened? As my first question likely shows, I don't know what causes the corruption, but if it's a
process than can be reversed by export/import (as long as you haven't progressed to lost triggers/etc.), why not just
make that export/import process part of the program?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4790
Location: Pensacola, FL, USA

PostPosted: Sat Jul 07, 2012 8:08 am   
 
Usually corruption comes from bad code (variables especially) i believe.
If you have a shared package using bad code and it saves something to the host session package, it could potentially be spreading corruption.

Pretty sure you can set your installed version to use the thumb drive for the purpose of saving... which would remove the need for constant import/exports to keep it up to date whereever you go. Just make sure the thumb drive is backed up somewhere.

as for auto imports exports... you could play with the onConnect onDisconnect #EVENTs
_________________
Discord server
Reply with quote
Llohr
Apprentice


Joined: 17 May 2005
Posts: 108

PostPosted: Sat Jul 07, 2012 8:32 am   
 
I'm actually not working on the road these days, I don't import/export to keep things up to date, I import/export to fix sessions when they become corrupted.

I have no shared packages except those enabled by default (English Directions/Keypad and Clickable URLs). I'm finding that even sessions with virtually no scripts get corrupted regularly.

I'd look into the EVENT solution to automating import/export, except that, as you may see from my original post, attempting to import an xml file causes a lot of problems that have to be manually repaired before I can use the session.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Jul 07, 2012 2:29 pm   
 
Can you describe the the effects which tell you that the package is corrupted? I think you've mentioned it in other threads, but it would be useful to post it in this thread so we can have all the information in one place while we try to help.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Jul 07, 2012 5:12 pm   
 
Your process for exporting/importing is needlessly complex.
1) Export the contents of the corrupted package to XML
2) Close CMUD
3) Delete (or rename) the corrupted package
4) Reopen CMUD and launch your session
5) CMUD will attempt to load your package, it won't be found, so a new empty one will be created
6) Import your XML into the new, non-corrupted package
Reply with quote
Llohr
Apprentice


Joined: 17 May 2005
Posts: 108

PostPosted: Sat Jul 07, 2012 5:25 pm   
 
Well, the most common symptom is the disappearing of classes, with all remaining settings (some disappear) from those classes going into the root folder, as if they were windows or modules. The settings thus placed in the root folder do not function.

Additionally, I have had sessions reading each other's (differently named) variables. For instance, each session will have an alias "ca" which sends #var lastspell<charactername> {%-1} {_nodef} {recast};cast %-1. So each character's alias creates a variable called "lastspellLlohr," or "lastspellRauko," etc., depending on the name of the character. Somehow the character Llohr would then cast Rauko's last spell upon spell failure, despite the differently named variables. (I gave them different names because they were accessing each other's variables constantly).

Also, I have had some instances of very simple triggers having no effect, not firing and just generally behaving as if they didn't exist.

I have also had the English Keypad packages just stop working entirely for all sessions, reinstalling CMud fixed that.

Additionally, windows start doing crazy things, I regularly have issues with the way windows are distributed. Most sessions have a main window and some number of child windows. As my screens are wide, I have the parent window on the left and all child windows in a tabbed column on the right, with each session tabbed, so that I can cycle through them with CTRL-Tab and only see the main and child windows of whichever session is in front. I frequently have issues where a newly opened session acts like a sub-window of an already opened session, making CTRL-Tab take 5 cycles to get through three windows. This can be quickly fixed by dragging the tab of the session acting as "main" to the top row of tabs. Sometimes sessions will send captured text to other sessions' child windows, which, if the characters in those sessions share channels, causes duplicate captures. Worst is when opening a third session causes no window to appear, as if it's floating and in the background, but cycling through doesn't bring it to the front. In those cases, I have to click the Windows button and choose the session, at which point it either shows up floating, or shows up in the upper left corner, covering the tabs of other open sessions and rendering them inaccessible. If it appears floating, attempting to tab it to the other open sessions usually puts it up in the corner like that, making the other sessions unusable. Even if I expand the window size, all of it is grayed out except for the little upper left-hand corner, which displays the bottom right-hand corner of what I should be seeing. I have no screen shots of this because as soon as it happens, sessions become unplayable, so I export/import immediately.


The last symptom I can think of off the top of my head may not have to do with package corruption, but occasionally scripts involving setting and checking variables do not run when I first add them to a session. I generally get them fixed eventually by manually executing each trigger in the script repeatedly until it starts to fire on its own when the pattern is received. No pattern/value/etc. adjustments are required to make them run, they just don't want to do anything until they've been manually executed a dozen times or so.
Reply with quote
Llohr
Apprentice


Joined: 17 May 2005
Posts: 108

PostPosted: Sat Jul 07, 2012 6:10 pm   
 
Daern wrote:
Your process for exporting/importing is needlessly complex.
1) Export the contents of the corrupted package to XML
2) Close CMUD
3) Delete (or rename) the corrupted package
4) Reopen CMUD and launch your session
5) CMUD will attempt to load your package, it won't be found, so a new empty one will be created
6) Import your XML into the new, non-corrupted package



Yes that looks much simpler, thank you.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jul 08, 2012 12:16 am   
 
Any time CMud just up and disappears from memory entirely in a situation it very obviously should not be doing that, corruption will generally occur. Any time CMud generates an Access Violation and gives you the choice between Continue Application and Close Application, corruption will generally occur. It might not always happen, and when it does happen it might not always show you a significant symptom but you can bet that somewhere a 1 turned into a 0.

Corruption may occur in a package file (*.pkg), a layout file (*.xly), a toolbar file (*.tbr), the mapfile (*.dbm), and the sessions files (sessions.db = the sessions you can choose from, sessionkeys.db = the passwords on those sessions). This is not limited to just the user-created files.

Corruption may manifest in those same locations, though it will usually be the case that the source of the problem is not the same as the place you notice the effects of it (ie, you notice something wrong with your triggers not firing but it's really the layout file that's borked).
_________________
EDIT: I didn't like my old signature
Reply with quote
rozdwojeniejazni
Wanderer


Joined: 13 Aug 2011
Posts: 74

PostPosted: Thu Jul 19, 2012 11:38 am   
 
Daern wrote:
Your process for exporting/importing is needlessly complex.
1) Export the contents of the corrupted package to XML
2) Close CMUD
3) Delete (or rename) the corrupted package
4) Reopen CMUD and launch your session
5) CMUD will attempt to load your package, it won't be found, so a new empty one will be created
6) Import your XML into the new, non-corrupted package

Are you sure it works this way? I need to create the package manually every time. Am I doing something wrong?
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