Modify

Opened 18 months ago

Closed 10 months ago

Last modified 10 months ago

#20134 closed defect (fixed)

[Patch] Bug with Source-Dropdown in Upload-dialog

Reported by: casiosmu@… Owned by: GerdP
Priority: normal Milestone: 21.02
Component: Core Version:
Keywords: template_report upload source Cc:

Description

What steps will reproduce the problem?

  1. open upload dialog
  2. have something entered in the "source" field
  3. open dropdown of "source" field
  4. select the first! item

What is the expected result?

the selected (first) item is entered in the field

What happens instead?

the field gets empty

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

if "Source" field was not empty it gets empty, only if it was empty the first item is entered. No problem with the second (or up) entry

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-10-03 13:42:38 +0200 (Sat, 03 Oct 2020)
Revision:17084
Build-Date:2020-10-04 01:30:47
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17084 de) Linux openSUSE Tumbleweed
Memory Usage: 1597 MB / 3641 MB (1060 MB allocated, but free)
Java version: 11.0.9+11-suse-1.1-x8664, Oracle Corporation, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920x1080 (scaling 1.0x1.0), :0.1 1920x1080 (scaling 1.0x1.0)
Maximum Screen Size: 1920x1080
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
Desktop environment: KDE
Java package: java-11-openjdk:x86_64-11.0.9.0
apache-commons-compress: apache-commons-compress:noarch-1.19
apache-commons-logging: apache-commons-logging:noarch-1.2
Dataset consistency test: No problems found

Plugins:
+ changeset-viewer (22)
+ notesolver (0.3.2)
+ undelete (35640)

Tagging presets:
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/DE.zip

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
+ https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1
- https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1

Validator rules:
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/MissingWeekdays&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/IndoorRules&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/KeepRight&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Rules/QAToolInspiredValidations&zip=1

Last errors/warnings:
- 02289,749 W: java.net.SocketTimeoutException: Read timed out. Ursache: java.net.SocketTimeoutException: Read timed out
- 02289,772 W: java.net.SocketTimeoutException: Read timed out. Ursache: java.net.SocketTimeoutException: Read timed out
- 02634,701 W: java.net.SocketTimeoutException: Read timed out. Ursache: java.net.SocketTimeoutException: Read timed out
- 02737,889 W: javax.net.ssl.SSLException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed). Ursache: javax.net.ssl.SSLException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed). Ursache: java.net.SocketException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed)
- 03365,325 W: java.net.SocketTimeoutException: Read timed out
- 03780,377 W: java.net.SocketTimeoutException: Read timed out
- 03807,489 W: java.net.SocketTimeoutException: Read timed out
- 04699,874 W: javax.net.ssl.SSLException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed). Ursache: javax.net.ssl.SSLException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed). Ursache: java.net.SocketException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed)
- 04703,969 W: javax.net.ssl.SSLException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed). Ursache: javax.net.ssl.SSLException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed). Ursache: java.net.SocketException: Die Wartezeit für die Verbindung ist abgelaufen (Read failed)
- 05669,294 W: java.net.SocketTimeoutException: Read timed out

Attachments (1)

20134.patch (1.3 KB) - added by marcello@… 10 months ago.
Tentative patch

Download all attachments as: .zip

Change History (23)

comment:1 Changed 18 months ago by Don-vip

Keywords: upload source added

comment:2 Changed 18 months ago by DavidHubert

I can confirm that issue on 3 different Windows 10 computers, all of them with JOSM 17329 and Java 8 Update 271.

comment:3 Changed 18 months ago by GerdP

@Vincent:
In my preferences.xml I see an empty first entry for upload.comment.history and also for upload.source.history. Not sure if this is intended?

comment:4 Changed 16 months ago by GerdP

These empty entries are created when you use start an upload but cancel the dialog which asks for the upload comment. If this comment is empty - which is normal for the first edit session of the day since we have preference upload.comment.max-age which empties it - the empty value is also stored in the history list. This empty value is very confusing and I think the easiest solution is to remove it from the history dropdown list.

comment:5 Changed 16 months ago by skyper

I have seen this empty line in dropdown menus in several dialogs.

Last edited 16 months ago by skyper (previous) (diff)

comment:6 Changed 16 months ago by casiosmu@…

In my preferencey.xml only the upload.source.history has an empty entry, but not at first position. Not sure if its related that upload.source.obtainautomatically is set to true. (I'm the TO)

comment:7 Changed 16 months ago by skyper

In my search history I find an empty line.

comment:8 Changed 16 months ago by skyper

Aah, the reverter plugin dialog has the empty line in history, too.

comment:9 Changed 16 months ago by GerdP

Owner: changed from team to GerdP
Status: newassigned

It's quite tricky. I think we want to allow e.g. empty strings as input for the upload comment. If that is wanted it is also wanted that the dialog shows this empty string next time when you open the upload dialog and not a non-empty comment that was used before.
We have other dialogs where an empty string makes no sense, like search history or reverter.
I'm not yet sure where to fix this.

comment:10 Changed 16 months ago by GerdP

@casiosmu@: Sorry, I confused source with comment above. I assume you use the dropdown list with the "down" key. I think it is normal in this case that the existing text is replaced by the first entry in the list once you press "down" again. I think this happens in all dialogs with a history.
So, I am not sure if you have a problem that is caused by the empty entries in the history or if this ticket is about something else. I cannot reproduce your problem (also with upload.source.obtainautomatically set to true) unless the first entry is empty.
You can easily try this: Create a new object e.g. a natural=tree and start upload. Clear the source field and cancel the upload. Now you have the empty entry at the top of the list when you upload again.

comment:11 Changed 16 months ago by casiosmu@…

Hi, after some testing I think I have a pointer what is going wrong here:

  1. for the upload.source.history dropdown there is an internal parameter for the currently selected value INDEX
  2. on opening the Upload dialog this index value is set to the first entry, INDEPENDENT of the actual input field and dropdown entry values (I have upload.source.obtainautomatically true, so the field often has a different value than the first dropdown entry)
  3. if in the dropdown the current index is reselected, the field is cleared (applies for all index values).

So when I select the first entry to correct the automatically generated field value, I clear the field.

Suggested solution:

If upload.source.obtainautomatically is activated, the generated value should be added as first entry to the dropdown list.

comment:12 Changed 16 months ago by GerdP

Resolution: fixed
Status: assignedclosed

In 17475/josm:

fix #20134: Bug with Source-Dropdown in Upload-dialog

  • make sure that no item is selected before setting a new text. Without this the code in BasicComboPopup assumes that the editor field is equal to the selected entry.

comment:13 Changed 16 months ago by GerdP

Resolution: fixed
Status: closedreopened

I've just noticed that it doesn't work when upload.source.obtainautomatically isn't set.

comment:14 Changed 16 months ago by GerdP

Resolution: fixed
Status: reopenedclosed

Hm, I cannot reproduce the problem. So I guess I made a mistake and selected the empty entry.

comment:15 Changed 16 months ago by skyper

Do I have to manually delete the empty entry in the list to get rid of it?

comment:16 Changed 16 months ago by GerdP

You can do that but it's likely to reappear: If you close the dialog with an emtpy value this empty value is stored in the history. It's a bit confusing but it wasn't causing the error described in this ticket.

comment:17 Changed 15 months ago by GerdP

Milestone: 21.02

comment:18 Changed 10 months ago by marcello@…

Resolution: fixed
Status: closedreopened

This is not fixed and it concerns the upload comment combobox too.

Steps: to reproduce

  1. Open the upload dialog.
  2. Open the upload comment history dropdown and select any item.
  3. Open the upload comment history dropdown and select the same item again.

Expected outcome: the comment editor box does not change.

Outcome: the comment editor box becomes empty.

comment:19 Changed 10 months ago by marcello@…

This also concerns the two comboboxes in the "edit tag" dialog. The error is in AutoCompletingComboBox.java.

Last edited 10 months ago by marcello@… (previous) (diff)

Changed 10 months ago by marcello@…

Attachment: 20134.patch added

Tentative patch

comment:20 Changed 10 months ago by skyper

Summary: Bug with Source-Dropdown in Upload-dialog[Patch] Bug with Source-Dropdown in Upload-dialog

@marcello:
It is usually better to create a new ticket with links to the older ticket instead of reopening a ticket with a milestone from the past.

comment:21 Changed 10 months ago by Don-vip

Resolution: fixed
Status: reopenedclosed

In 18098/josm:

fix #20134 - hopefully fix #20690 too - fix AutoCompletingComboBox selection (patch by marcello)

comment:22 Changed 10 months ago by Don-vip

Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.