Modify

Opened 4 weeks ago

Closed 3 days ago

#24659 closed defect (fixed)

[macOS 15 Sequoia] plbuildings plugin: "Cursor is outside the map area" error on ARM64

Reported by: olo81 Owned by: stoecker
Priority: normal Milestone:
Component: Plugin plbuildings Version:
Keywords: macos, sequoia, arm64, plbuildings, retina Cc:

Description

Environment:

OS: macOS 15.x (Sequoia / Tahoe)

Architecture: Apple Silicon (ARM64)

JOSM Version: 190xx (installed via Homebrew: JOSM_24_arm64.app)

Java Version: OpenJDK 21/23 (ARM64)

Plugin: plbuildings (https://josm.openstreetmap.de/wiki/Plugins/PLBuildings)

The Issue:
After updating to macOS 15 (Sequoia), the plbuildings plugin has stopped functioning correctly. When attempting to click on the map to import buildings, the plugin throws an error message: "Cursor is outside the map area" (Polish: "Kursor jest poza obszarem mapy").

This happens even when the cursor is clearly within the active data layer and at a high zoom level.

Technical Context & Suspected Cause:
The issue seems to be related to a coordinate mapping regression in Java on macOS Sequoia, specifically regarding HiDPI (Retina) screens and the new Window Tiling features. There is a known issue in OpenJDK where mouse event coordinates are reported incorrectly if the window is scaled or moved within the new macOS windowing system.

Related OpenJDK / External issues:

JDK-8333241 / PR #21153: [macos] Mouse events coordinates are wrong on macOS Sequoia.

JDK-8158776: Incorrect coordinate transformation on HiDPI screens in certain macOS versions.

It appears that plbuildings uses getMousePosition() or similar AWT methods that, under macOS 15, return logical points that are not correctly translated to the physical pixel grid used by the JOSM map canvas, resulting in a "Factor 2x" offset or a global coordinate shift.

Steps to Reproduce:

Open JOSM (ARM64 version) on macOS Sequoia.

Download any OSM data in Poland.

Activate the plbuildings plugin.

Zoom in to a building level.

Click on the map to fetch a building.

Result: Error "Cursor is outside the map area" appears.

Workarounds attempted (none resolved the issue):

Toggling mappaint.use-niddpi in advanced preferences.

Adjusting gui.scale.

Disabling macOS Window Tiling.

Running with -Dsun.java2d.uiScale=1.0.

Reinstalling JOSM and the plugin.

Requested Action:
Could the developers check if the plugin's coordinate retrieval method needs to be updated for better compatibility with macOS 15's coordinate space, or if there is a JOSM-wide fix for mouse event mapping on Sequoia?

Attachments (0)

Change History (7)

comment:2 by stoecker, 4 weeks ago

Component: PluginPlugin plbuildings
Owner: changed from team to NieWnen

comment:3 by NieWnen, 4 days ago

Resolved in #6 (v2.2.3) by using SwingUtilities instead of JOSM getMousePosition() method call: https://github.com/praszuk/josm-plbuildings-plugin/commit/d9bc38710db18d82ddcb876b52cae800d7c22cba

comment:4 by NieWnen, 4 days ago

Owner: changed from NieWnen to stoecker

comment:5 by stoecker, 4 days ago

Why do you think I should be responsible now? If you closed the bug, close the report...

comment:6 by NieWnen, 3 days ago

@stoecker
Sorry for the unclear intention.

The issue contains a question that is still unanswered ("Requested Action"), so I assigned the ticket to you. You may want to check whether the JOSM method works as intended (see the linked commit) or if it requires any changes. Additionally, other actions or plugins in this repo might by affected by a similar bug.

If everything is already resolved, the ticket can be closed.

comment:7 by stoecker, 3 days ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain stoecker.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.