Opened 2 months ago

Last modified 3 weeks ago

#17184 reopened defect

Memory Leaks

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


What steps will reproduce the problem?

  1. Ctrl+N : Open new data layer
  2. Alt+Shift+V: Make sure Validator Panel is visible
  3. Draw a way without adding tags
  4. Upload (a popup shows that you have a way without tags)
  5. Press continue
  6. Press cancel in the following dialog
  7. Close all layers to get back to the "Getting Started" dialog
  8. Repeat steps 1-7
  9. Create heap dump with e.g. VisualVM and look at instances of ValidatorTreePanel

What is the expected result?

No or maybe 1 instance

What happens instead?

2 instances

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

Working on a patch...

Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-12-31 15:09:58 +0100 (Mon, 31 Dec 2018)
Build-Date:2018-12-31 14:24:10
Relative:URL: ^/trunk

Identification: JOSM/1.5 (14620 de) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 707 MB / 1820 MB (560 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080

+ OpeningHoursEditor (34535)
+ apache-commons (34506)
+ buildings_tools (34807)
+ download_along (34503)
+ ejml (34389)
+ geotools (34513)
+ jaxb (34506)
+ jts (34524)
+ o5m (34405)
+ opendata (34805)
+ pbf (34576)
+ poly (34546)
+ reltoolbox (34788)
+ reverter (34552)
+ utilsplugin2 (34793)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Region [TMS_BLOCK_v2] Resetting cache
- W: Cannot start IPv4 remotecontrol https server on port 8112: Keystore was tampered with, or password was incorrect
- W: Cannot start IPv6 remotecontrol https server on port 8112: Keystore was tampered with, or password was incorrect

Attachments (1)

17184.patch (5.8 KB) - added by GerdP 2 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 2 months ago by GerdP

Owner: changed from team to GerdP
Status: assignednew

comment:2 Changed 2 months ago by GerdP

Resolution: fixed
Status: newclosed

In 14672/josm:

fix #17184: fix leaks in ValidateUploadHook and ValidatorTreePanel.destroy()

comment:3 Changed 2 months ago by simon04

Milestone: 19.01

comment:4 Changed 2 months ago by GerdP

Resolution: fixed
Status: closedreopened

I've now learned that I have to watch the mouse cursor position when doing my tests. I see very different results in the heap dumps depending on the panels that the mouse cursor was in. So, some of the leaks which I found in #17040 still exist, esp. those in the preferences dialog. Many elements of that dialog are only freed when a new Preference Dialog is created, so they are never reused but kept for as long as JOSM runs. Still trying to find the cause...

Changed 2 months ago by GerdP

Attachment: 17184.patch added

comment:5 Changed 2 months ago by GerdP

Attached patch is work in progress. Maybe not all changes are needed.

comment:6 Changed 8 weeks ago by GerdP

This patch seems to make it more likely that the add tag dialog "forgets" the keyboard. When I edit with this patch I often see
cases where the OK button is enabled but pressing enter has no effect.

comment:7 Changed 7 weeks ago by Don-vip

Milestone: 19.0119.02

comment:8 Changed 3 weeks ago by Don-vip

Milestone: 19.0219.03

Modify Ticket

Change Properties
Set your email in Preferences
as reopened The owner will remain GerdP.
as The resolution will be set.
to The owner will be changed from GerdP to the specified user.
The owner will change to GerdP
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment

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

Note: See TracTickets for help on using tickets.