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


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Dec 21, 2009 3:15 am   

[3.12] Variable bleeding bug reproduced
 
So, I've been having an issue with variable bleeding that I really hope gets fixed for the next version, and I'm really hoping the next version comes out soon. Either way, here's the situation/bug.

I work with several different modules in a package, and a lot of them refer to another in some form or fashion. There is one alias I run constantly that always seems to provide a duplicate variable, no matter what I do. Did quite a bit of testing, and finally made it reproducible.

1. Open CMUD, escape to Untitled.
2. Open Package Editor, copy/paste the code below:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<module name="TestModule" copy="yes">
  <uid>{15ECEAFD-FC38-4A14-A1A7-72771BECD355}</uid>
  <event event="onTest" priority="1940" copy="yes">
    <value>loaddata</value>
  </event>
</module>
<module name="TestMod2" copy="yes">
  <uid>{E6C6E51B-90D6-4735-8F66-78F9E82166F9}</uid>
  <alias name="loaddata" copy="yes">
    <value>#VAR TestVar 1</value>
  </alias>
</module>
</cmud>

3. Type 'loaddata' on the command line. This will create a variable called TestVar under Untitled.
4. Type '#RAISE onTest' on the command line. This creates a duplicate variable under the same module the event is in.

It appears to be more scoping issues. Instead of checking to see if the variable exists anywhere in the same package, it looks to see if it exists in its own module. If it doesn't, it creates a new variable in said module.

Charneus
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Mon Dec 21, 2009 7:24 am   
 
I've had huge issues with something very similar to this... The only difference is that for me, variables were created/modified/read from other windows (capture windows). I haven't been able to reproduce it though...
Reply with quote
Zugg
MASTER


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

PostPosted: Mon Dec 21, 2009 5:31 pm   
 
Confirmed. It looks like the context for the Event isn't getting set to the window raising the event. Added to bug list.
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Wed Dec 23, 2009 3:26 pm   
 
Zugg, please check the same for other commands such as #VAR, #ALIAS and #ALARM also.
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