Modify

Opened 9 months ago

Closed 8 months ago

#17517 closed defect (fixed)

[Patch] Changeset ID is not always pasted in ChangesetCacheManager dialog

Reported by: GerdP Owned by: team
Priority: normal Milestone: 19.04
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Start JOSM
  2. Have a changeset ID (11111) in clipboard and press Alt+Ctrl+C to open the ChangesetCacheManager
  3. See that the ID is automatically pasted into the ChangesetID field.
  4. Close the dialog
  5. Copy a different id (22222) into the clipboard.
  6. Press Alt+Ctrl+C again and see that the old id (11111) is still in the field.
  7. While the dialog is still open copy a new id (33333) into the clipboard
  8. Close the dialog.
  9. Copy again another id (44444) into clipboard
  10. Press Alt+Ctrl+C again and see that now the id (33333) is in the field.
  11. Close the dialog and open it again. Now 44444 is in the field.

What is the expected result?

The current clipboard content should be in the field

What happens instead?

Sometimes the field is filled with older content

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

Problem is caused by calls to ChangesetCacheManager.getInstance() which creates the dialog if it doesn't exist and pastes the content of the clipboard. The method is also called when the dialog was just closed
and thus it is created with the wrong clipboard content. This is also a memory leak.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-03-03 00:16:03 +0100 (Sun, 03 Mar 2019)
Build-Date:2019-03-02 23:16:53
Revision:14824
Relative:URL: ^/trunk

Identification: JOSM/1.5 (14824 de) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 605 MB / 1820 MB (395 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc, -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_20190325_113131.jfr]

Plugins:
+ OpeningHoursEditor (34867)
+ apache-commons (34506)
+ buildings_tools (34904)
+ continuosDownload (82)
+ download_along (34869)
+ ejml (34389)
+ geotools (34513)
+ jaxb (34678)
+ jts (34524)
+ o5m (34867)
+ opendata (34911)
+ pbf (34867)
+ poly (34867)
+ reltoolbox (34867)
+ reverter (34944)
+ undelete (34919)
+ utilsplugin2 (34932)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (1)

17517.patch (3.2 KB) - added by GerdP 9 months ago.

Download all attachments as: .zip

Change History (4)

Changed 9 months ago by GerdP

Attachment: 17517.patch added

comment:1 Changed 9 months ago by GerdP

Milestone: 19.04

The attached patch fixes the problem and also fixes the memory leak.
While testing this I also noticed that the dialog could not be clsoed with "Esc" when it is opened from the toggle dialog ChangesetDialog. The patch fixes this as well. Let me know if I should better create a 2nd ticket for that.

comment:2 Changed 9 months ago by GerdP

In 14938/josm:

see #17517: Shortcut "Esc" doesnt'work in ChangesetCacheManager dialog when opened by ChangesetDialog

comment:3 Changed 8 months ago by GerdP

Resolution: fixed
Status: newclosed

In 14951/josm:

fix #17517: Memory leak in ChangesetCacheManager

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.