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
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Oct 27, 2007 7:07 am   

[2.09] Odd Class Quirk (maybe a bug)
 
Borrow a page out of Vijilante's book I tried the follow.

Open CMUD
Hit Esc to get blank session
Run this from the command line.
Code:
#LOOP 99999999999999999999999999999999999 {#CLASS %concat(Fool,%i)}

Type Ctrl-G to open Package Editor.

The class structure generated is

Fool1
|-----> Fool0
|----------> Fool-1


Now I suspect it's because my number is too large to be processed accurately. As a matter of fact I'm not sure if this can be handled a better way but thought I would note it.
_________________
Asati di tempari!
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Oct 27, 2007 7:10 am   
 
An addendum bug. If you delete the classes created in the above test case and then run the code again, you get a CMUD error.
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Oct 27, 2007 8:18 am   
 
I don't thing this is a bug - not only does your number overflow 32-bit integers (which I think commands like #loop still use) but it overflows 64-bit integers as well. Try it again with a smaller number.

Perhaps CMUD should raise an error in this case rather than creating a load of classes in the wrong places?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Oct 27, 2007 3:04 pm   
 
Yes I realized that, that's why I said I wasn't sure if it's a bug. While someone shouldn't be doing that that response was unexpected. I thought about suggesting raising an error, but if I used a variable instead of the number there's no way CMUD could do a compile time check. The class deletion does cause a bug.

I had a slight variation using the number 30 that causes a display problem if you run it. (I was trying to mimic something Vijilante suggested in another and submitted the bug report already.) But if you deleted the classes in that situation as well when you tried to the code with 999999999999999999999999999999999999999 you get a CMUD error.

Since Zugg is hoping for this to be close to a stable release (and I think it is), I'm trying to torture-test the system to see if it uncovers anything.

********

I first did Test1 and then deleted the folder structure, I then ran a Test2 and the error occured.

Test1:
I ran this to test vijilante's post from a while back.
#LOOP 30 {#CLASS %concat(Fool,%i)}
Expand classes, scroll down to right and bottom.
Scrol back to left, notice display issue.


Test2:
Delete classes created in test one.
#LOOP 99999999999999999999999999999999999 {#CLASS %concat(Fool,%i)}
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Oct 29, 2007 7:12 pm   
 
I'm not to concerned about the #LOOP 99999999999999999999999999999999999 causing the Fool-1 class. In fact, I think it's actually good that it doesn't loop this many times and cause essentially an infinite loop in the background. Yes, the #LOOP is limited to 32-bit integers, which should be larger than anyone would ever loop.

But the crash generated when you delete the class was a bit more serious, and I have that fixed now in 2.10.
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