changing room area doeas not remove it from previous area rooms list

Bug #1238339 reported by aTah
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mudlet
Fix Released
High
Chris

Bug Description

version: Mudlet 3.0-rc1 compiled from repo
OS: Arch Linux, newest.

I think script and output will tell everything:

lua script
=====
local newroomid = createRoomID();
addRoom(newroomid);

echo("Before adding new room to area\n");
echo("Area 7 rooms:\n");
display(getAreaRooms(7));
echo("Area 8 rooms:\n");
display(getAreaRooms(8));

setRoomArea(newroomid,7);
echo("\n\nAfter adding new room to area 7\n");
echo("Area 7 rooms:\n");
display(getAreaRooms(7));
echo("Area 8 rooms:\n");
display(getAreaRooms(8));

setRoomArea(newroomid,8);
echo("\n\nAfter adding new room to area 8\n");
echo("Area 7 rooms:\n");
display(getAreaRooms(7));
echo("Area 8 rooms:\n");
display(getAreaRooms(8));
echo("^^^^^ I think this is bug, area 7 shoudn't have room "..newroomid.."\n");

echo("\n\nDeleting room "..newroomid.."\n");
deleteRoom(newroomid);
echo("Area 7 rooms now:\n");
display(getAreaRooms(7));
echo("Area 8 rooms now:\n");
display(getAreaRooms(8));
echo("^^^^^ this is even more serious bug, room is removed only from the last area, non existing room still exist in previous area");
=====

OUTPUT:
Before adding new room to area
Area 7 rooms:
{}
Area 8 rooms:
{}

After adding new room to area 7
Area 7 rooms:
{
  [0] = 43
}
Area 8 rooms:
{}

After adding new room to area 8
Area 7 rooms:
{
  [0] = 43
}
Area 8 rooms:
{
  [0] = 43
}
^^^^^ I think this is bug, area 7 shoudn't have room 43

Deleting room 43
Area 7 rooms now:
{
  [0] = 43
}
Area 8 rooms now:
{}
^^^^^ this is even more serious bug, room is removed only from the last area, non existing room still exist in previous area

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

This has been discussed in https://bugs.launchpad.net/mudlet/+bug/1226558 and would likely be fixed as a result of fixing that.

Revision history for this message
Stephen Lyons (slysven) wrote :

I can confirm that existing TArea.cpp code will cause this. It should be addressed by work on code that I am currently wrangling that should impact on the bug that Vadim mentions.

Changed in mudlet:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Stephen Lyons (slysven)
Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Mudlet-makers] [Bug 1238339] Re: changing room area doeas not remove it from previous area rooms list

Someone else in IRC is running into this:

(07:28:03) Barastor: anyway to hand edit a mapper .dat file?
(07:30:54) Barastor: i've got 1000 or so rooms that exist with -1 for
areaid. I just want to delete them at this point, but deleting them
individually crashes mudlet, moving them all to a new area and deleteing
the area crashes mudlet, etc

Revision history for this message
Chris (chrismudlet) wrote :

Fixed in mudlet/development

Changed in mudlet:
assignee: Stephen Lyons (slysven) → Chris (chrismudlet)
status: Confirmed → Fix Committed
Chris (chrismudlet)
Changed in mudlet:
milestone: none → 3.0
Changed in mudlet:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.