Modify

Opened 3 days ago

Last modified 3 days ago

#24699 new defect

MapCSS Render tests with text fail on the JOSM server

Reported by: stoecker Owned by: team
Priority: normal Milestone: 26.05
Component: Core Version:
Keywords: Cc: zkir

Description

Since a few days the MapCSS render tests fail on the JOSM server, but work flawless on GitHub and also my machine.

The rendered images don't contain the rendered text.

Attachments (0)

Change History (8)

comment:1 by gaben, 3 days ago

Fails with the same messages on my dev machine. I'll try look into it.

comment:2 by gaben, 3 days ago

So it seems, it stopped rendering texts entirely.

My dev machine is a Ubuntu 22.04.

comment:3 by stoecker, 3 days ago

Started between r19547 and r19550 and on 2026-03-19. Maybe you can find a reason?

In normal use JOSM still renders texts I hope?

comment:4 by gaben, 3 days ago

Cc: zkir added

Found it in r19549. This fixes it for me, haven't looked more deeply into it why.

  • src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

     
    14281428    @Override
    14291429    public void getSettings(boolean virtual) {
    14301430        super.getSettings(virtual);
    1431         if (paintSettings == null) {
    1432             paintSettings = MapPaintSettings.INSTANCE;
    1433         }
     1431        paintSettings = MapPaintSettings.INSTANCE;
    14341432
    14351433        circum = nc.getDist100Pixel();
    14361434        scale = nc.getScale();

comment:5 by gaben, 3 days ago

So there is a neutralSettings.showNamesDistance int property in MapPaintSettings.java, which is currently set to 0. If I change it to 10_000_000 (the old(?) default), the tests are passing.

In normal use JOSM still renders texts I hope?

I would assume the CLI render module is not printing texts.

Last edited 3 days ago by gaben (previous) (diff)

comment:6 by zkir, 3 days ago

Guys,

What are the tests you are talking about, and how it could happen that we missed them that time (https://josm.openstreetmap.de/ticket/24678) ? Please forgive me my ignorance, I am pretty new in JOSM development.

I could prepare a more proper patch for RenderingHelper, to pass "neutral settings" (or mandate it's usage) from the outside.

In my defense, I can say that the original code wasn't 100% correct either -- it applied settings specified by the user via the UI, which makes no sense at all in command line mode.

comment:7 by gaben, 3 days ago

Don't worry, automated tests are there for a reason. To view them, go to Jenkins (e.g. https://josm.openstreetmap.de/jenkins/job/JOSM/8741/#showFailuresLink). You can also run the same test suite locally.

Regarding the tests, they assume that text rendering is possible, which is not always the case due to the property I mentioned in comment:5. I would assume that the showNamesDistance setting should be provided with the tests, as well as when someone runs the CLI module in a standalone JAR setting if they want to see text. I'm not sure if this is desired.

On the other hand, if I get it right, it is required to make plugins work correctly.

comment:8 by stoecker, 3 days ago

I'd expect we have a "parallel processing" problem here. So probably the JOSM code is ok in principle, but somehow the tests are executed wrong in some environments. The slight change in the initialisation of paintSettings probably triggers the issue now.

In r19515 I fixed something similar.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to stoecker.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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