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


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Jun 12, 2008 2:24 am   

[2.26] Duplicate undeleteable top level package created on clean XML import.
 
It has been my practice for a number of versions to export my package to XML using the old version then to import the XML into a clean installation of the new version. I've run across the issue that once I import it I have both the old top level package name plus an identical top level with all my settings in it. If I try to delete the old (empty) one it gives me an error. I typically have to restart Cmud and delete it, which will then cause a crash.

Here's a general flow of events:

Code:
1) Export all XML to a file
2) Rename the old Cmud directory to Cmud_bak
3) Install the new version of Cmud
4) Using the new version of Cmud import the XML package from step 1.
5) Open settings editor and see two top level packages, both with the same name.  One empty the other with my xml import.
6) Now try to delete the empty one.  It will sometimes refuse to delete, other times it will delete and will then crash Cmud.
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Jun 12, 2008 5:50 am   
 
You'll need to email me the XML file that you are importing for me to test this.

Also, remember that CMUD uses *two* directories when you install it. There is the directory that the CMUD.EXE file is located in (which I call the Program directory)...this defaults to "Program Files/CMUD". Then there is the directory that contains all of your user-defined sessions and packages (which I call the Data directory)...this defaults to "My Documents/My Games/CMUD". So which directory are you renaming? If you don't rename the Data directory, then the new installation of CMUD will still see and use all of your existing settings files.

However, I think what is happening is that by doing a fresh installation, your new session with the same name as the old one actually has a new and different "UID" (Unique identifier). You'll see the UID in the XML file. CMUD uses this UID to determine whether you are importing a different window/module, or overwriting an existing window/module. So I think that is why you get a new window with the same name...it's not a duplicate "package"...it's a window".

The problem is that the original (blank) window is the one assigned to the session. CMUD determines which window is assigned to the session what you first load the session. If you go to the Window properties for the blank window and set the Network connection to None, and then go to the new window and make sure the Network connection is set to "Use session connection". Then restart CMUD and now you should be able to delete the blank window.

CMUD just normally doesn't let you delete the primary window that is assigned to the session because that can lead to lots of errors and problems. But that explains why it crashes if you somehow find a way to delete the blank window when it's still assigned to the session.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Jun 12, 2008 8:06 am   
 
I had a nice long reply typed out and somehow it didn't get posted. Okay, I'll try to summarize here:

1) I can e-mail you the xml if you want, but I think you already diagnosed it.
2) I'm 100% confident I'm in a clean session/package. I rename the Cmud directory under "program files" and my data is under there as well so it all gets put out of the way when I rename.
3) I think you nailed it on the head with your diagnosis. When I export with the old package there is going to be a different UID from when I reinstall. It makes perfect sense how you explained it with the UID determining whether to create another window or whether to use the existing one.

What is the reason why it would want to use the UID to determine whether to create another window of the same name? It seems like if there is a window of exactly the same name then it should put it in that same window. But I'll admit that the only time I import is importing to a new version... so my usage may be skewed from how others use import.
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Jun 12, 2008 5:07 pm   
 
No, it can't use the window name because there are too many cases where there are windows with duplicate names. For example, generic window names like "Tells", "Chat", etc.

I'm not sure I can do anything about this in v2.27, but one solution that I can think about is a way to more easily mark a window as the "primary session window". Then you could more easily set the new window as the primary and then delete the old, blank window. Or, maybe it could even be smart enough to detect that you only have a single window and that it is empty, so when importing it could automatically replace the current empty window.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Thu Jun 12, 2008 10:20 pm   
 
I think it would be more intuitive if when it saw a single empty window of the same name it imported into that window. I think that's what most people would expect and they would be puzzled like I was, if it didn't happen.
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Jun 12, 2008 10:36 pm   
 
Yep, I agree.
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