Modify

Opened 3 years ago

Closed 3 years ago

#22086 closed defect (irreproducible)

Filters stopped working after upgrading to v18427

Reported by: GOwin Owned by: GOwin
Priority: normal Milestone: 22.06
Component: Core Version:
Keywords: template_report filter regression Cc:

Description

What steps will reproduce the problem?

  1. Add or enable filters for a given layer
  2. Filters don't take effect

What is the expected result?

Filter should work with the data layer

What happens instead?

Nothing.

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-04-04 22:26:00 +0200 (Mon, 04 Apr 2022)
Revision:18427
Build-Date:2022-04-05 01:30:55
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18427 en) Linux Pop!_OS 20.04 LTS
Memory Usage: 774 MB / 6144 MB (366 MB allocated, but free)
Java version: 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, Private Build, OpenJDK 64-Bit Server VM
Look and Feel: com.formdev.flatlaf.FlatIntelliJLaf
Screen: :0.0 1600×900 (scaling 1.00×1.00)
Maximum Screen Size: 1600×900
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: XFCE
Java package: openjdk-11-jre:amd64-11.0.15+10-0ubuntu0.20.04.1
fonts-noto: fonts-noto:all-20200323-1build1~ubuntu20.04.1

Plugins:
+ Lanes (${version.entry.commit.revision})
+ Mapillary (2.0.0-beta.9)
+ OpeningHoursEditor (35924)
+ RoadSigns (35935)
+ apache-commons (35924)
+ apache-http (35924)
+ buildings_tools (35951)
+ centernode (v1.0.4)
+ comfort0 (35893)
+ contourmerge (v0.1.8)
+ easypresets (1623509627)
+ ejml (35924)
+ flatlaf (35862)
+ geotools (35959)
+ imagery_offset_db (35893)
+ intersection (0.0.7)
+ jackson (35958)
+ jaxb (35952)
+ jna (35924)
+ josm-batch-downloader (1.0.4)
+ jts (35924)
+ log4j (35924)
+ mapwithai (1.9.13)
+ mbtiles (v2.6.1)
+ measurement (35893)
+ merge-overlap (35893)
+ namemanager (35893)
+ opendata (35910)
+ reverter (35893)
+ routing (35893)
+ shrinkwrap (v1.0.4)
+ tageditor (35893)
+ terracer (35893)
+ todo (30306)
+ turnlanes-tagging (v0.0.5)
+ turnrestrictions (35893)
+ undelete (35893)
+ utilsplugin2 (35951)
+ waydownloader (35893)

Tagging presets:
+ ${HOME}/Documents/Projects/#Kaart/JOSM/Reviewed_Features/reviewed_preset.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/PhilippinesAddresses&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist/presets/nsi-josm-presets.min.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ <josm.userdata>/EasyPresets.xml

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- ${HOME}/Documents/Projects/#Kaart/JOSM/Kaart Styles 3.1.1.mapcss
- ${HOME}/Documents/Projects/#Kaart/JOSM/geometry_adjusted_paint.mapcss.css
- ${HOME}/Documents/Projects/#Kaart/JOSM/Reviewed_Features/reviewed_features.mapcss
- https://raw.githubusercontent.com/govvin/JOSM-styles/master/age.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&zip=1
- ${HOME}/Documents/Projects/#Kaart/resources/data_age.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1
- https://raw.githubusercontent.com/KaartGroup/Kaart-Styles/master/Overlapping%20Ways.mapcss
- https://raw.githubusercontent.com/KaartGroup/Kaart-Styles/master/Kaart_QC.mapcss
- https://raw.githubusercontent.com/KaartGroup/Kaart-Styles/master/Kaart-Styles.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
- https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LessObtrusiveNodes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- resource://mapcss/Mapillary.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/LitObjects&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
- ${HOME}/Documents/Projects/OpenStreetMap/MapCSS/MapCSS-JOSM-Bicycle-master/cycleway.mapcss
- https://pasharm.github.io/New_basic_style_for_JOSM/New_basic_style.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_PAC.zip
+ ${HOME}/Downloads/JOSM Custom Paint Styles/OSMaPaaralan_Schools-style.mapcss

Validator rules:
+ https://josm.openstreetmap.de/josmfile?page=Rules/OsmoseValidations&zip=1
+ https://github.com/KaartGroup/KaartValidator/raw/master/kaart.validator.mapcss
- https://josm.openstreetmap.de/josmfile?page=Rules/KeepRight&zip=1
- https://josm.openstreetmap.de/josmfile?page=Rules/QAToolInspiredValidations&zip=1

Last errors/warnings:
- 00024.951 W: java.io.IOException: The requested URL https://josm.openstreetmap.de/josmfile?page=Rules/OsmoseValidations&zip=1 was not found
- 00025.052 W: Failed to add https://josm.openstreetmap.de/josmfile?page=Rules/OsmoseValidations&zip=1 to tag checker
- 00025.052 W: java.io.IOException: No file found for: https://josm.openstreetmap.de/josmfile?page=Rules/OsmoseValidations&zip=1
- 00026.688 E: Failed to locate image 'PHadrr.png'
- 00026.688 W:  null: Could not get presets icon PHadrr.png
- 00026.704 E: Failed to locate image 'PHadrr.png'
- 00026.704 W:  Sangguniang Barangay: Could not get presets icon PHadrr.png
- 00026.871 E: Failed to locate image 'MapWithAI'
- 00027.708 W: Cannot start IPv4 remotecontrol server on port 8111: Address already in use (Bind failed)
- 00027.709 W: Cannot start IPv6 remotecontrol server on port 8111: Address already in use (Bind failed)

Attachments (2)

Screenshot_2022-05-24_08-47-52.png (196.9 KB ) - added by GOwin 3 years ago.
Screenshot demonstrates a filter to only show highways, and hide everything else, but does nothing instead.
filters.entries (8.6 KB ) - added by GOwin 3 years ago.
filter.entries -- after the workaround described in https://josm.openstreetmap.de/ticket/22086#comment:8

Download all attachments as: .zip

Change History (18)

by GOwin, 3 years ago

Screenshot demonstrates a filter to only show highways, and hide everything else, but does nothing instead.

comment:1 by taylor.smock, 3 years ago

@GOwin: Can you copy-paste the filter into the ticket?

EDIT: Can you do that for all your filters (specifically, all the enabled filters). Also, it seems that the specific filter you are using for your example should be inverted.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:2 by taylor.smock, 3 years ago

Keywords: filter added

comment:3 by taylor.smock, 3 years ago

Owner: changed from team to GOwin
Status: newneedinfo

comment:4 by GOwin, 3 years ago

Some of older stored filters that doesn't work now are:

  • "highway=* | traffic_sign=* | barrier=*| version:0 | man_made | landuse=industrial | route=ferry | place"
  • "(type:node place=*) | amenity=school"

but when I revise them as follows, they kinda work

  • "highway | traffic_sign | barrier| version:0 | man_made | landuse=industrial | route=ferry | place"
  • "(type:node place) | amenity=school"

It seems that it had to do with the use of "=*", but by leaving that out, it catches matching strings that I don't want included in the filter.

Last edited 3 years ago by GOwin (previous) (diff)

comment:5 by stoecker, 3 years ago

Keywords: regression added
Milestone: 22.05

comment:6 by taylor.smock, 3 years ago

@GOwin: Do you remember what JOSM version you were using previously? It seems to work when creating the filters in r14291 and then moving to r18453.

Also, can you go to Advanced Preferences and export the filters.entries preference (when you have the non-working filters added and enabled as you expect them to work)?

EDIT:
In attachment:Screenshot_2022-05-24_08-47-52.png, it looks like you have highway=* | traffic_sign=* | barrier=*| version:0 | man_made | landuse=industrial | route=ferry | place set to mode=replace (UI text was previously replace selection, it is currently select). If you additionally have (type:node place=*) | amenity=school set to replace selection/select, then whichever comes last will override the other, if both are enabled, as the one that comes later in the filter list will override the one that comes first in the filter list.

If this is not the desired behavior, change them to add to selection (mode=add)

EDIT2: Would it be worthwhile to grey out any filters that come prior to an enabled mode=replace filter, maybe adding a tooltip like Overridden by a later filter?

EDIT3: As a side note, I have discovered what I believe to be a different bug. Add both of GOwin's filters as 'mode=replace', order them (highway, then type:node), enable both, then hide both. On hiding the filter with type:node, the previous filter no longer takes effect. This is the behavior that should be happening with mode=replace, if I understand the mode properly (see wiki:Help/Dialog/Filter#Columns).

EDIT4: It looks like the problematic code for the above problem (mode=replace not replacing when not hiding) is in source:trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java@18453:145#L145 . It appears to be functionally unchanged since r3367.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:7 by GOwin, 3 years ago

Thank you @taylor.smock for looking into this, but I don't think it has anything to do with the modes since they were working as expected in the previous versions of JOSM, and I've been using those filters for years. :/ Was I using them incorrectly until now?

Usually, I update to the latest stable as soon as I can so the last version I had is most likely r18387.

Anyway, I observed another interesting behavior in this version: If I copy the "non-working" filters to a new entry, they work as expected without any modifications!

So,it appears that a tedious work-around to this bug, is to re-copy all previous filters to a new one, then remove them (old ones.)

Last edited 3 years ago by GOwin (previous) (diff)

comment:8 by GOwin, 3 years ago

Additional information:

I usually keep my most often used filters on top of the list. After copying the older filters to a new entry, they're usually a bottom of the list. If I move them up, without removing the older entry, the new filter will also not work as expected.

So, for the work-around to work, copy the new filter to a new entry, and make sure that you remove the old one, too, if you have to re-sort them, otherwise it doesn't work.

EDIT: it appears that as soon as the first, oldest entry is removed, all the following entries in the filter list now works as expected.

Last edited 3 years ago by GOwin (previous) (diff)

comment:9 by anonymous, 3 years ago

Can you give us the preference setting mentioned in comment:6?

by GOwin, 3 years ago

Attachment: filters.entries added

filter.entries -- after the workaround described in https://josm.openstreetmap.de/ticket/22086#comment:8

in reply to:  6 comment:10 by taylor.smock, 3 years ago

Replying to taylor.smock:

Also, can you go to Advanced Preferences and export the filters.entries preference (when you have the non-working filters added and enabled as you expect them to work)?

Unfortunately, since attachment:filters.entries was exported after the workaround in comment:8, I won't be able to ascertain what the actual problem was. At this point, I'll only be able to guess. Unless you (GOwin) have a backup somewhere.

Anyway, in attachment:filters.entries, the (type:node place=*) | amenity=school filter comes before the highway=* | traffic_sign=* | barrier=*| version:0 | man_made | landuse=industrial | route=ferry | place filter (which is inverted -- in the original screenshot, it was not -- this does make a difference).

comment:11 by stoecker, 3 years ago

Milestone: 22.0522.06

comment:12 by taylor.smock, 3 years ago

@GOwin: Do you happen to have a backup of your preferences file? If so, can you backup your current preferences file and restore the old one, and export the filter.entries preference?

I'd like to be able to fix this, but without a way to reproduce, I'll probably end up closing this as irreproducible or needsinfo.

comment:13 by anonymous, 3 years ago

That would've been nice, @taylor.smock, but unfortunately, no back-up of that file.

comment:14 by GOwin, 3 years ago

Above comment is mine. Didn't realize I wasn't logged in.

comment:15 by taylor.smock, 3 years ago

No worries. Unfortunately, I'm probably going to have to close this ticket as irreproducible, since I haven't been able to reproduce.

Looking at the revisions between r18387 and r18453 ( https://josm.openstreetmap.de/log/josm/?rev=18453&stop_rev=18387 )

The only change I saw that was marginally related is r18451, and that should not be causing anything to fail. If anything, previously non-working filters should now be working properly.

comment:16 by taylor.smock, 3 years ago

Resolution: irreproducible
Status: needinfoclosed

As noted in comment:6, I was unable to reproduce. As such, without having the problematic filter.entries preference to test against, I'm going to have to close this as irreproducible.

@GOwin: if you are able to find a backup somewhere of the preferences.xml, feel free to reopen this ticket. If someone else encounters this issue, feel free to point them at this ticket, but please encourage them to make a backup of their preferences.xml file before they follow the workaround in comment:8 (and maybe attach their filter.entries preference entry as well).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GOwin.
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.