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 , 3 days ago
comment:2 by , 3 days ago
So it seems, it stopped rendering texts entirely.
My dev machine is a Ubuntu 22.04.
comment:3 by , 3 days ago
comment:4 by , 3 days ago
| Cc: | 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
1428 1428 @Override 1429 1429 public void getSettings(boolean virtual) { 1430 1430 super.getSettings(virtual); 1431 if (paintSettings == null) { 1432 paintSettings = MapPaintSettings.INSTANCE; 1433 } 1431 paintSettings = MapPaintSettings.INSTANCE; 1434 1432 1435 1433 circum = nc.getDist100Pixel(); 1436 1434 scale = nc.getScale();
comment:5 by , 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.
comment:6 by , 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 , 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 , 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.



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