ID:2838693
 
Resolved
Mouse coordinates were not properly sanitized to stay within the map editor's bounds if the map was wider than it was tall, resulting in really strange bugs with the rectangular selection tool.
BYOND Version:515.1596
Operating System:Windows 10 Home 64-bit
Web Browser:Firefox 107.0
Applies to:Dream Maker
Status: Resolved (515.1597)

This issue has been resolved.
Descriptive Problem Summary: When using the Select Rectangle tool in the map editor, selections beyond the map editor bounds can cause Dream Maker to hang (or cause unusual positioning behavior, if it doesn’t hang.)

Numbered Steps to Reproduce Problem:
1) Download the following test project: https://files.byondhome.com/Higoten/Tests/ Area%20Image%20Test.zip (same as from ID:2838689)
2) Navigate to Map.dmm and use the Select Rectangle Tool.
3) From the bottom-right corner of the map (a red turf in the above project) click and drag the mouse to the upper left position of the Dream Maker’s title bar.
4) Attempt to move or interact with the selection. Observe that Dream Maker has hung (about 2/3rds of the time) or causes the selected turfs to move at unusual offsets.
5) Alternatively, attempting to delete the selection can also result in a hang (if it doesn't hang, attempting to undo the deletion results in the selection being undone into the wrong positions).

Expected Results: For Dream Maker to remain responsive when the Select Rectangle tool is used outside of the map editor’s bounds.

Actual Results: Dream Maker can hang or exhibit unexpected behavior when following the steps above.

Does the problem occur:
Every time? Or how often? The issue is somewhat inconsistent, resulting in a hang about 2/3rd of the time. Positioning appears to be incorrectly handled if Dream Maker does not hang.

When does the problem NOT occur? The issue only seems to occur when out-of-bounds selections are made above the map. Out of bounds selection below the map, only to the left of the map, or only to the right of the map do not seem to produce the issue.

Workarounds: Keep rectangular selections within the bounds of the map editor.

Lummox JR resolved issue with message:
Mouse coordinates were not properly sanitized to stay within the map editor's bounds if the map was wider than it was tall, resulting in really strange bugs with the rectangular selection tool.