Ghost exits left in the Exits dialog when a room is deleted

Bug #1413435 reported by Vadim Peretokin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mudlet
Fix Released
Critical
Stephen Lyons

Bug Description

"When I make a link between two rooms and then delete one of them the link from the existing room to the deleted room (it's ID) is remembered in "exits". To avoid problems with a connection to a non-existent room I want to remove it manually. To do this I need to right-click on the map, select "exits" and delete one of the IDs, but exactly when I click on "exits" Mudlet crashes :("

Originally reported at: http://forums.mudlet.org/viewtopic.php?f=5&t=4695&p=22335#p22332

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

Steps to reproduce:

1) delete room A that connects to room B by right-clicking on it and selecting 'delete'
2) right-click on room B and select Exits. Mudlet will crash.

Stacktrace:

0 QString::trimmed qstring.cpp 4470 0x7ffff54080f1
1 dlgRoomExits::initExit dlgRoomExits.cpp 1471 0x4c5ed7
2 dlgRoomExits::init dlgRoomExits.cpp 1538 0x4c694f
3 T2DMap::slot_setExits T2DMap.cpp 3192 0x5b6ca2
4 T2DMap::qt_static_metacall moc_T2DMap.cpp 233 0x6b31d1
5 QMetaObject::activate qobject.cpp 3569 0x7ffff557d2a6
6 QMetaObject::activate qobject.cpp 3444 0x7ffff557d7d7
7 QAction::triggered moc_qaction.cpp 356 0x7ffff6458a52
8 QAction::activate qaction.cpp 1175 0x7ffff645af38
9 QMenuPrivate::activateCausedStack qmenu.cpp 977 0x7ffff65cba7a
10 QMenuPrivate::activateAction qmenu.cpp 1054 0x7ffff65d0b54
11 QMenu::mouseReleaseEvent qmenu.cpp 2359 0x7ffff65d4eaa
12 QWidget::event qwidget.cpp 7946 0x7ffff649aea5
13 QMenu::event qmenu.cpp 2472 0x7ffff65d564b
14 QApplicationPrivate::notify_helper qapplication.cpp 3486 0x7ffff645fc8c
15 QApplication::notify qapplication.cpp 3020 0x7ffff6465b61
16 QCoreApplication::notifyInternal qcoreapplication.cpp 881 0x7ffff5555c2d
17 sendSpontaneousEvent qcoreapplication.h 235 0x7ffff64639e1
18 QApplicationPrivate::sendMouseEvent qapplication.cpp 2507 0x7ffff64639e1
19 QWidgetWindow::handleMouseEvent qwidgetwindow.cpp 404 0x7ffff64b796a
20 QWidgetWindow::event qwidgetwindow.cpp 173 0x7ffff64b99bb
... <More>

Changed in mudlet:
status: New → Confirmed
Revision history for this message
Stephen Lyons (slysven) wrote :

Determined that commit 94c5066613e97705a65ec215208609ef35a2f6e8 "Speed up room deletion" uses a new TRoomDB::reverseExitMap to work out which rooms have exits into a room being deleted. This is supposed to short-cut the need to iterating thought every exit for every room to find the exit that leads to a room being deleted so they can be reset to -1 "no exit". Unfortunately NO ATTEMPT IS MADE TO MAINTAIN THE DATA IN TRoomDB::reverseExitMap, except for when a room is added or removed. The data is NOT saved (that would require a change in the map file format!) and NOT regenerated when a map is loaded. The consequence is clear - rooms that had exits TO a room being deleted are not having the exit cleared, and calling up the room exit dialog is just one place where this WILL cause a crash.

I will look to fix the underlying issue to (re)generated this data on loading and also make the dlgRoomExits class more robust.

As this causes a terminal crash on the current release 3.0 preview (delta) I think it merits elevation to "Critical" status. 8-(

Changed in mudlet:
assignee: nobody → Stephen Lyons (slysven)
importance: Medium → Critical
status: Confirmed → Triaged
Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Bug 1413435] Re: Ghost exits left in the Exits dialog when a room is deleted

Yeah okay. What what issue fixed was super-slow room deletion, it took
forever to delete rooms before it.

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

Pull Requests up for testing / review for both development https://github.com/Mudlet/Mudlet/pull/247 and release_30 https://github.com/Mudlet/Mudlet/pull/246 branches.

Changed in mudlet:
status: Triaged → In Progress
Revision history for this message
Stephen Lyons (slysven) wrote :

Fixes committed to release_30 branch by https://github.com/Mudlet/Mudlet/pull/250 and https://github.com/Mudlet/Mudlet/pull/255, back-port of commits to development branch still to be done...

Changed in mudlet:
status: In Progress → Fix Committed
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.