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


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

PostPosted: Mon Jul 21, 2008 8:29 pm   

Found *serious* problem in converting zMUD *.MUD files into CMUD packages
 
Thanks to a *.MUD file sent to me by Zhiroc, I have uncovered a very serious bug in the CMUD conversion of *.MUD files into *.PKG files.

The bug happens if you have a complex subclass structure and the subclass record gets stored in the *.MUD file *before* the parent class record. This can happen pretty easily if you create the subclass first in zMUD, then create the main class, then drag the subclass into the main class. Since zMUD saves the class records in the order created, this creates a *.MUD file with the subclass record coming before the parent class record.

When CMUD tries to import this *.MUD file, it gets very confused and actually creates duplicate class records. In some cases (like in Zhiroc's file), you can get a corrupted case where Class A has Class B as it's parent, but then Class B has Class A as it's parent...an infinite loop in the class hierarchy. This causes CMUD to freeze/hang.

This is serious enough that I'm going to release v2.33 later today or tomorrow to fix this. It's hard to believe that nobody else has encountered this problem since it exists in *ALL* versions of CMUD.

Thanks Zhiroc for sending me your files!
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Tue Jul 22, 2008 12:45 am   Re: Found *serious* problem in converting zMUD *.MUD files into CMUD packages
 
Zugg wrote:
It's hard to believe that nobody else has encountered this problem since it exists in *ALL* versions of CMUD.

Hmm, well I think I had this problem in some (early 1.x) beta versions of CMUD (many duplicate class records, although it never caused a hang - I think there must have been a maximum recursion level limit), but these versions didn't tend to be around long (a week or less) before a new version was released that imported *.MUD files without duplicates... I haven't tried the most recent 2.x versions yet (since 2.18), but I'd intended to install v2.32 this evening (but didn't get round to it). Want me to test v2.32 to verify that I get a hang? (I downloaded it earlier.)
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Jul 22, 2008 3:52 am   
 
Yeah, if you want to try 2.32 to see if it fails and then 2.33 to see if it works, that would be cool.

But you are probably correct about the general issue here...older versions of CMUD had *so* many other various problems that it was probably hard to tell exactly what was causing the hanging. It's even possible that there are still problems to be found. But this could certainly explain why some people were getting some corrupted settings files when importing their zMUD files.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Jul 23, 2008 1:46 am   
 
Well, I had some difficulty getting CMUD to convert my *.MUD file automatically like it used to, but I finally managed it: not sure why it was looking in the wrong place originally: maybe as I moved my chardb.db over after I opened CMUD for the first time and had to rerun it (deleting sessions.db). I also found, both in 2.32 and 2.33 that the first time it converted my MUD file, I couldn't see any MUD windows - I just got a grey screen. Closing all windows and trying again didn't help - I had to exit and reopen and choose Connect (not Offline - that didn't create the windows either): I'll post a proper bug report on this when I have time since I did find it quite frustrating and it did give me a bad first impression and I was almost on the point of giving up when I suddenly got it to work. It may have been something to do with trying to find my *.lay file too. (Also, it kept asking me if I wanted to Import from zMUD the first time, but that's minor and has been in dozens of versions.)

But both 2.32 and 2.33 seemed to import my *.MUD file OK in the end as far as I can tell easily: there are not duplicates and no hang. I really would have expected my *.MUD file to suffer from the problem you posted about as I'm sure I would have made some settings in the root and then moved them into class folders I created later. My *.MUD file has stuff in from probably 10 years ago! Oh, or are we only talking about moving subclasses into classes? My bad! Ah, in that case it is possible I don't have any subclasses created before the parent class. (Wow, I must be so logical and organised! Wink)
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 23, 2008 3:26 am   
 
Quote:
Also, it kept asking me if I wanted to Import from zMUD the first time

That means CMUD isn't able to save anything to it's CMUD.INI file, or else you keep deleting the cmudstartup.ini file. In either case it sounds like it might be time for a fresh install to a new directory. You might have some files messed up from previous beta versions and/or partial conversions of your old zMUD files.

Anyway, if you want me to try and reproduce the problem with converting your MUD file, email it to me at sales@zuggsoft.com. It also sounds like you might have had an existing and corrupted *.XLY or *.TBZ layout file for the session, maybe left over from a previous conversion. That could explain why you had a hard time getting the windows to be created.

Moving files around (like chardb.db) could definitely have an effect too. If you are willing, it would be interesting to see how it works if you install CMUD 2.33 into a completely new directory and then run it from there and point it to your existing zMUD files.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Jul 23, 2008 10:17 am   
 
This was a completely fresh install for 2.32 and 2.33 (side by side). I meant that it kept asking me if I wanted to Import from zMUD the first time I ran CMUD. After that it didn't. I'm pretty sure there were no existing *.PKG, *.XLY or *.TBZ files, but I will try and verify these issues and come up with a replicatable procedure (at least with my *.MUD file).
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 23, 2008 4:48 pm   
 
Ah, ok, thanks for the clarification. And yes, it will always ask you to Import from zMUD if it detects that zMUD was installed on your system in the past (via the zMUD registry key) the first time you run CMUD, or anytime you delete the CMUD.INI file.

Definitely send me the files and procedure if you can come up with something.
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