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


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Jan 16, 2008 3:23 pm   

[2.18 Pro] Data record variable with one key/value pair is ignored
 
Unfortunately, I'm unable to reproduce this with a simple set of steps, but here's what's happening to me:

I noticed that my healing queue wasn't taking care of my last affliction. If I use my "affs" alias, which relies on %dbkeys, to show my current afflictions, I get none listed. If I use #SHOWDB, however, there is one there. Likewise, my healing queue alias, which relies on #LOOPDB to iterate over all my afflictions, does not find this last affliction key. If I add a second affliction, it will cure one of them, but the last one is left alone again. It's not a visibility issue because #SHOWDB works and #LOOPDB doesn't, not even on the command line.

Has anyone else experienced this exact problem?
Reply with quote
ReedN
Wizard


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

PostPosted: Wed Jan 16, 2008 3:35 pm   
 
http://forums.zuggsoft.com/forums/viewtopic.php?t=29390

Known issue, I posted on it before. The function %dbkeys is corrupting that variable which is why the last item isn't seen.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Jan 16, 2008 3:39 pm   
 
I haven't but it sounds to me to be Lua related. Why?

In Lua as I have already stated elsewhere if a table does not contain two keys it is not a table.
That being the case functions that rely on Lua to deal with hash tables will fail if they only contain a single value.

You could fix this yourself by creating a dummy value that you add to each layer. Duh, you know that or you wouldn't have made this post...

I'm pretty certain that Zugg implemented Database variables using Lua in the background and they could use a little tweaking.
To better understand the concept have a look at my HashSet package in the Library. Ask yourself why I had to do things the way I did.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Jan 16, 2008 3:54 pm   
 
I don't always use %dbkeys to cause this to happen, though, so I'm not sure if that function is actually causing the "corruption" of the variable. I only use %dbkeys as a way to view the data record variable contents, and my #LOOPDB breaks all by itself.

It may be related to the Lua tables implementation, causing the memory contents to now be incompatible with the standard CMUD commands and functions.

I only wish there was a simple way to reproduce the issue.
Reply with quote
ReedN
Wizard


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

PostPosted: Wed Jan 16, 2008 4:05 pm   
 
Perhaps there are more ways to corrupt the db variable, that's certainly possible. What I saw in my bug was that even just viewing the contents of the db variable with %dbkeys caused it to become corrupt. You had mentioned that you use %dbkeys so I suspected it was the same type of issue.
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