Modify

Opened 8 months ago

Closed 7 months ago

Last modified 2 months ago

#23187 closed defect (fixed)

[PATCH] "Validation results" panel keeps maximising upon uploading even when empty

Reported by: Pontiac_CZ Owned by: team
Priority: normal Milestone: 23.11
Component: Core validator Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Do a slight change in your data layer that should not trigger a validation warning or error
  2. Click "Upload changes" button

What is the expected result?

The expected result would be not maximising the "Validation results" panel when there is nothing to display.

What happens instead?

"Validation results" panel maximises ALWAYS. Usually it is empty and just takes space from more useful panels such as "Layers" or "Tags/Memberships". One needs to always minimize it.

I've been observing this annoying behavior for a couple of months.

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-08-29 13:38:40 +0200 (Tue, 29 Aug 2023)
Revision:18822
Build-Date:2023-08-30 01:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18822 en_GB) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19045)
Memory Usage: 3184 MB / 3554 MB (1434 MB allocated, but free)
Java version: 17.0.7+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1200 (scaling 1.00×1.00) \Display1 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1200
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1250
System property sun.jnu.encoding: Cp1250
Locale info: en_GB
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Dicedtea-web.bin.location=C:\Program Files\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]
Dataset consistency test: No problems found

Plugins:
+ DirectUpload (36126)
+ contourmerge (v0.1.9)
+ undelete (36126)

Map paint styles:
- https://pasharm.github.io/New_basic_style_for_JOSM/New_basic_style.mapcss

Last errors/warnings:
- 00000.544 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.548 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00010.269 W: java.nio.file.FileSystemException: %UserProfile%\AppData\Local\Temp\josm_exec_powershell_12147271232737732935.txt: The process cannot access the file because it is being used by another process
- 00010.270 W: Unable to request certificate of https://grca.nat.gov.tw

Attachments (0)

Change History (18)

comment:1 by taylor.smock, 8 months ago

Milestone: 23.10
Summary: "Validation results" panel keeps maximising upon uploading even when empty[PATCH] "Validation results" panel keeps maximising upon uploading even when empty

I think I've got a fix; I won't merge it this cycle (I feel that we are too close to the next monthly release).

comment:2 by taylor.smock, 8 months ago

  • src/org/openstreetmap/josm/data/validation/ValidationTask.java

    diff --git a/src/org/openstreetmap/josm/data/validation/ValidationTask.java b/src/org/openstreetmap/josm/data/validation/ValidationTask.java
    a b  
    9393    protected void finish() {
    9494        if (canceled) return;
    9595
    96         if (!GraphicsEnvironment.isHeadless() && MainApplication.getMap() != null) {
     96        // Remove any low severity issues if they are not desired.
     97        if (!(Boolean.TRUE.equals(ValidatorPrefHelper.PREF_OTHER.get()) &&
     98                (!this.beforeUpload || Boolean.TRUE.equals(ValidatorPrefHelper.PREF_OTHER_UPLOAD.get())))) {
     99            // Use >= just in case we add additional levels.
     100            this.errors.removeIf(error -> error.getSeverity().getLevel() >= Severity.OTHER.getLevel());
     101        }
     102
     103        if (!GraphicsEnvironment.isHeadless() && MainApplication.getMap() != null && (!beforeUpload || !errors.isEmpty())) {
    97104            // update GUI on Swing EDT
    98105            GuiHelper.runInEDT(() -> {
    99106                MapFrame map = MainApplication.getMap();
     
    107114            });
    108115        }
    109116        if (this.onFinish != null) {
    110             // Remove any low severity issues if they are not desired.
    111             if (!(Boolean.TRUE.equals(ValidatorPrefHelper.PREF_OTHER.get()) &&
    112                     (!this.beforeUpload || Boolean.TRUE.equals(ValidatorPrefHelper.PREF_OTHER_UPLOAD.get())))) {
    113                 // Use >= just in case we add additional levels.
    114                 this.errors.removeIf(error -> error.getSeverity().getLevel() >= Severity.OTHER.getLevel());
    115             }
    116117            this.onFinish.accept(this.errors);
    117118        }
    118119    }

comment:3 by Pontiac_CZ, 8 months ago

OK, sounds good, thank you for letting me know. I sure can wait till the following version. :-)

comment:4 by taylor.smock, 8 months ago

I'll try to merge this on October 6th. If I forget, feel free to poke me.

comment:5 by taylor.smock, 7 months ago

Resolution: fixed
Status: newclosed

In 18850/josm:

Fix #23187: Don't show validation results panel when no issues will be shown

comment:6 by Pontiac_CZ, 7 months ago

When can I expect version 18850 to be ready for download? Only 18822 available so far.

comment:7 by GerdP, 7 months ago

You can download the development version: https://josm.openstreetmap.de/josm-latest.jar

comment:8 by taylor.smock, 7 months ago

I ordinarily do a release every month. Unfortunately, I'm currently waiting on #23107 (code signing certificate).

We do a nightly release (josm-latest), which has several different distribution methods. You use openwebstart, so you probably want download/josm-latest.jnlp.

comment:9 by Pontiac_CZ, 7 months ago

OK, I downloaded josm-latest.jnlp, but I'm struggling with it a bit. First I had to put an exception for https://josm.openstreetmap.de to my Java panel due to signing issue which is OK. After that I get a weird "You are running an Oracle implementation of Java WebStart" window which the tested version have never complained about. (I have OpenWebStart 1.8.0 installed on my computer).

I continue with "Okay" and then get another pop-up: "Plugin countourmerge requires Java version 17. The current Java version is 8. You have to update Jave in order to use this plugin". I don't understand this either. Latest Java according to Java.com is Version 8 Update 391 (I have 381). And plugin contourmerge works as a charm within this Java version in tested JOSM.

I'm getting pretty much confused...

comment:10 by taylor.smock, 7 months ago

You are running an Oracle implementation of Java WebStart

You probably still have Oracle Java installed on your machine; you may need to use the Open with right-click option. I'll ignore the rest of your post since that will be fixed if you are using OpenWebStart for the JNLP. See https://openwebstart.com/docs/OWSGuide.html#_jnlp_file_association for instructions. Alternatively, you can rename josm-latest.jnlp to josm-latest.jnlpx.

I cannot think of any major consumer applications that use Java 8 (the last "major" consumer application that I know of that used Java 8 was Minecraft, and they use Java 17 now). You can probably safely uninstall Oracle Java if you cannot think of anything that currently uses it.

Latest Java according to Java.com is Version 8 Update 391 (I have 381).

That is the latest version of Java that Oracle is producing an installer for the Java Runtime Environment.

comment:11 by Pontiac_CZ, 7 months ago

The development version 18874 works as intended, the "Validation results" panel no longer opens during upload (when there are no validation issues). Thank you!

Thanks you as well for guiding me through the Java mess which is SOOO confusing! I unistalled the Oracle Java version and reassociated .jnlp with OpenWebStart 1.8.0. JOSM starts up great so far.

(geez, how many other Java producers besides Oracle are there??? :-))

comment:12 by taylor.smock, 7 months ago

(geez, how many other Java producers besides Oracle are there??? :-))

Amazon, Bell Software, and Azul to name a few.

OpenWebStart is a replacement for something that Oracle decided to remove from the Java feature set (starting in Java 9). OpenWebStart is vendor agnostic, but our JNLP files request the Azul Java distribution.

Thanks you as well for guiding me through the Java mess which is SOOO confusing.

Is there anything we can do/document somewhere that would help other people like you, with respect to updating Java for JOSM?

in reply to:  12 comment:13 by Pontiac_CZ, 7 months ago

Replying to taylor.smock:

Is there anything we can do/document somewhere that would help other people like you, with respect to updating Java for JOSM?

Well, maybe it is already documented but from what I know now there could be clearly and briefly stated for those interested in running JOSM on Windows:

  • all you need is OpenWebStart - install it from website xxx (it contains the required Azul Java which you actually don't have to care about)
  • .jnlp must be associated with c:\Program Files\OpenWebStart\javaws.exe
  • that's it, just run josm.jnlp or josm-latest.jnlp :-)

But those are just my 2 cents...

comment:14 by taylor.smock, 6 months ago

Milestone: 23.1023.11

Ticket retargeted after milestone deleted

comment:15 by skyper, 5 months ago

Component: CoreCore validator

comment:16 by GerdP, 4 months ago

reg. r18850:
I wonder if it was intended that an existing validation results dialog showing possibly multiple problems is not updated when there are no errors with the current test?
I often have the situation that a first attempt to upload shows a simple problem like a node without tags, I fix it by deleting the node and start upload again. JOSM doesn't warn about the problem but it is still shown in the validator dialog. This can be quite confusing.

comment:17 by GerdP, 3 months ago

I've openend #23440 for this regression.

comment:18 by GerdP, 2 months ago

In 19005/josm:

fix #23519: Don't automatically enlarge "Validation Results" panel

  • show and unfurl "Validation Results" panel if not yet visible unless the tree is empty and the validation was triggered by an upload (see #23187)

Modify Ticket

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