Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Sogou, Yandex, DotBot, Google, Bing

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Alias snippet
Forum Rules | Mark all | Recent Posts

Alias snippet
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 23, 2008, 8:59 pm
Go to the top of the page
Go to the bottom of the page

rendo
Fledgling
GroupMembers
Posts5
JoinedSep 10, 2006

Alias.c is used in my codebase. It's a DBSC derivative and I know that code is bugged out a lot to begin with. Anyways, I'm not sure if this is a bug, or if it's just an issue directly related to my codebase.

If you make an alias that uses another alias, it causes an infinite loop and crashes. IE alias one two, alias two one and type one. Now, I noticed there's code to stop it at 50, but it doesn't seem to function as required. Now, running in GDB to try and determine the error, HOLY JESUS it doesn't crash. :( and it spews out the unable to process recurses too much. I'm not too familiar with GDB, hell I'm not even a decent coder, so a little help in figuring this out would be great as I'd rather not have to strip the code from the codebase.
       
Post is unread #2 Feb 23, 2008, 9:38 pm
Go to the top of the page
Go to the bottom of the page

Darwin
Fledgling
GroupMembers
Posts37
JoinedOct 10, 2007

I can't say that I can help you out with this problem, but I have had similar experiences with GDB in that it wouldn't crash while I had it running, but would crash if I stopped running the code through GDB.

I also had the alias code in my codebase, however it did function as it was intended. If an alias called another alias, it would loop through and stop at 50.

There wasn't anything wrong with the version I was using, but I scrapped it all and recoded it using Lua to allow for more flexibility. ie: The aliases could use pre-defined or user-defined variables. I have explicitly prevented the use of an alias trying to execute another alias to prevent an infinite loop issue.
       
Post is unread #3 Feb 24, 2008, 7:09 am
Go to the top of the page
Go to the bottom of the page

rendo
Fledgling
GroupMembers
Posts5
JoinedSep 10, 2006

I found a simple solution. I just set the recursive check from 50 down to 25 and it worked. Don't really see the need to have an alias fire 50 times in a row. Thanks for your help anyways, it gave me the idea. :D
       
Pages:<< prev 1 next >>