Long text in the editor can crash the game, and builders' edits leak memory
Maintainers usually reply within 1 day
@drelidan7 is already working on this.
Since Oct 28, 2026.
Assessment
This issue has not been assessed yet.
Description
What could go wrong for players?
The game's text editor is used for letters, board posts, character descriptions, notes and everything builders write in the mob, room, zone and script editors. It reads or writes memory it doesn't own in several places:
- Each time a text grows past the space set aside for it, the editor reads past the end of the old space.
- Replacing words with
%sbuilds the new text in a fixed space of about 8,000 characters without checking that it fits, so a replacement that makes the text longer than that writes past it. - Typing
%r,%lor%fbefore the first line of a letter, after something else was written earlier on the same connection, reads text that isn't there. - A page of text too long for the space the game uses to show it writes past that space.
Any of these can crash the game, restarting it and disconnecting everyone.
Notes and letters also ignore their length limits. A note is meant to hold up to 1,000 characters and a letter up to 4,000, but both can run to almost 8,000. write tells the writer to end the note with @, which the editor adds as text instead, and a missing pen is reported as missing paper.
In the builders' editors, every edit of a mob's, room's, zone's or script's text leaves the old text behind in the server's memory. Saving a room into the world, removing an exit, and closing the room or zone editor leave more behind. None of it is reused, so the server's memory grows with every edit until the next restart.
When can it happen?
- A player writes a letter, a board post or their description long enough to need more room.
- A player, immortal or builder uses
%son a long text. - A player starting a letter types
%r,%lor%fbefore the first line. - A player is shown a very long page of text.
- A builder edits mob, room, zone or script text, saves a room, removes an exit, or closes the room or zone editor.
Has it been seen on the live game?
Not seen yet, found by testing tools or code review
What will players notice once it is fixed?
- A note holds at most 1,000 characters and a letter at most 4,000. A line or
%sthat would go past the limit is refused with a message, and the text is kept as it was. - Any other text is refused in the same way once it would pass about 7,900 characters, the most the editor keeps, instead of being cut off when it is finished.
writesays to end the note with%e, and a missing pen is named as the pen.%sno longer adds a blank line to the text.- A very long page is shown in parts.
- Builders edit, save and close as before.
Anything else?
This is one of several issues under the effort to remove every memory error from the game.
- Dominant language
- C++
- Stars
- 3
- Forks
- 4
- Avg merge
- 18h 36m
- Merged PRs (30d)
- 87
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from returnoftheshadow/RotS_Live
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
returnoftheshadow/RotS_Live#521 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
returnoftheshadow/RotS_Live#485 ·
Maintainers usually reply within 1 day
-
Remove dead object refresh code (check_inventory_proto and friends)Possibly taken @drelidan7 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
returnoftheshadow/RotS_Live#414 ·
Maintainers usually reply within 1 day
-
purge <player> idle-saves the immortal instead of the playerPossibly taken @bskalpavrukshab25-sketch claimed this 13 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
returnoftheshadow/RotS_Live#411 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
returnoftheshadow/RotS_Live#410 · 2 comments ·
Maintainers usually reply within 1 day
All issues in returnoftheshadow/RotS_Live
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jellyfin/jellyfin-desktop#1290 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nasa/fprime#6301 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
godotengine/godot#125035 ·
Maintainers usually reply within 1 day
-
agent:WSL bug LOW security
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mgradwohl/tasksmack#3290 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mw00/project-maya#743 ·
Maintainers usually reply within 1 day