Page 1 of 1

[Bug]

Posted: Sun Jul 24, 2011 7:03 am
by Rakon
OS: Ubuntu 10.10 x64
Build: 2.0-rc5
Function: feedTriggers

feedTriggers crashes mudlet with a segfault, for some reason. I can reproduce the error with the code below, but haven't been able to pin point the reason.

The segfault ONLY happens, when the code below is run from a trigger. It executes properly; as expected, from an alias.
Code: [show] | [select all] lua
local enlist = {"Shallam","Sentaari","Sentinels","Blacklotus","Druids","Templars","Empyreal","Vastar","Oakstone","Crystalline","Pentharian","Cyrene","Melantha","Eleusis","Sylvans","Mithraea","Tybeirdd","Kastalia","Artemis"}

table.sort(enlist)

local chkstr = table.concat(enlist,", " )
feedTriggers(chkstr .. ".\n")

Re: [Bug]

Posted: Sun Jul 24, 2011 11:21 am
by Vadi
While the crash definitely should not happen, having to call feedTriggers inside a trigger is signalling poor design.

Re: [Bug]

Posted: Sun Jul 24, 2011 4:15 pm
by Rakon
Heh, was testing different options, to echo/parse actually. Its not needed, was just run across.
But thanks for insulting my coding practices; yet again.

Re: [Bug]

Posted: Sun Jul 24, 2011 4:38 pm
by Vadi
Wow, relax. Just pointed out that it would be a bad thing to do (and for anyone else reading it).