char.Char.sendaround() crashes when other characters in room
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NakedMud |
New
|
Undecided
|
Unassigned |
Bug Description
Simple to reproduce: exec ch.sendaround(
Arose when attempt to use the function in a pymodule.
backtrace:
#0 0xb7d94153 in PyDict_SetItem () from /usr/lib/
#1 0xb7d943bf in PyDict_
#2 0x0809edf7 in PyChar_sendaround (self=0xb79f01b0, args=0x8298a8c, kwds=0x0)
at scripts/
#3 0xb7d95ca8 in PyCFunction_Call () from /usr/lib/
#4 0xb7df645e in PyEval_EvalFrameEx () from /usr/lib/
#5 0xb7df7cbd in PyEval_EvalCodeEx () from /usr/lib/
#6 0xb7df7dd3 in PyEval_EvalCode () from /usr/lib/
#7 0xb7e159be in PyRun_StringFlags () from /usr/lib/
#8 0xb7df737f in PyEval_EvalFrameEx () from /usr/lib/
#9 0xb7df7cbd in PyEval_EvalCodeEx () from /usr/lib/
#10 0xb7d7fe97 in ?? () from /usr/lib/
#11 0xb7d50edc in PyObject_Call () from /usr/lib/
#12 0xb7df0c24 in PyEval_
from /usr/lib/
#13 0x08085945 in charTryCmd (ch=0x82e3558, cmd=0xb7f1eff4, arg=0x0)
at command.c:312
#14 0x080692c4 in do_cmd (ch=0x82e3558,
arg=0x82aa06c "exec ch.sendaround(
at interpret.c:343
#15 0x080693fc in handle_cmd_input (dsock=0x82de8f0,
arg=0x82aa06c "exec ch.sendaround(
#16 0x080a6ea6 in mudsys_
at scripts/
#17 0xb7d95c92 in PyCFunction_Call () from /usr/lib/
#18 0xb7d50edc in PyObject_Call () from /usr/lib/
#19 0xb7df0c24 in PyEval_
from /usr/lib/
#20 0x08071e83 in input_handler () at socket.c:874
#21 0x080643ec in game_loop (control=5) at gameloop.c:417
#22 0x0806499a in main (argc=1, argv=0xbffff804) at gameloop.c:320
Main reason why this error appear: in function PyChar_sendaround in pychar.c during iteration via list there no check if dict isn't NULL. This bug should be fixed by replacing line 843:
PyDict_ SetItemString( dict, "ch", charGetPyFormBo rrowed( ch));
on
if (dict != NULL) SetItemString( dict, "ch", charGetPyFormBo rrowed( ch));
{
PyDict_
}