Modify

Opened 2 years ago

Closed 2 years ago

#13232 closed defect (fixed)

Can't properly copy objects with optimized jar

Reported by: naoliv Owned by: Don-vip
Priority: normal Milestone: 16.08
Component: Core Version:
Keywords: regression gsoc-core proguard Cc: michael2402

Description

Open the example file, select the building, Ctrl+C and then Ctrl+V
JOSM is pasting only the nodes (thus creating a new and incomplete object)

JOSM

Build-Date:2016-07-28 02:01:45
Revision:10662
Is-Local-Build:true

Identification: JOSM/1.5 (10662 SVN pt_BR) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 904 MB / 4029 MB (390 MB allocated, but free)
Java version: 1.8.0_102-8u102-b14-2-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-8-jre:amd64-8u102-b14-2
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugins:
- AddrInterpolation (32584)
- Create_grid_of_ways (32440)
- FastDraw (32639)
- FixAddresses (32445)
- ImportImagePlugin (32584)
- OpeningHoursEditor (32583)
- PicLayer (32495)
- SimplifyArea (32517)
- apache-commons (32584)
- buildings_tools (32728)
- download_along (32730)
- editgpx (32485)
- ejml (32639)
- geotools (32584)
- graphview (32620)
- jogl (1.0.46)
- jts (32539)
- kendzi3d (1.0.190.1)
- kendzi3d-resources (0.0.1)
- log4j (32309)
- measurement (32732)
- merge-overlap (32471)
- opendata (32584)
- pdfimport (32584)
- photo_geotagging (32392)
- poly (32584)
- reverter (32584)
- tagging-preset-tester (32584)
- todo (29154)
- turnlanes-tagging (1468266519)
- turnrestrictions (32629)
- undelete (32584)
- utilsplugin2 (32725)

Attachments (2)

example.osm (701 bytes) - added by naoliv 2 years ago.
compat_report.html (634.5 KB) - added by Don-vip 2 years ago.

Download all attachments as: .zip

Change History (34)

Changed 2 years ago by naoliv

Attachment: example.osm added

comment:1 Changed 2 years ago by Don-vip

Cc: michael2402 added
Keywords: gsoc-core added
Milestone: 16.07

comment:2 Changed 2 years ago by michael2402

I am unable to reproduce this, even with the list of plugins.

When I open the example file and copy the building way, that way also appears when pasting. Did you notice anything else? Can you save the osm file after copy+pasting and see if the new way is in it - this will allow us to track if it is a rendering or a data problem.

comment:3 Changed 2 years ago by naoliv

Resolution: worksforme
Status: newclosed

Indeed I also can't reproduce it anymore (while I was able when I reported).
Sorry for the noise.

comment:4 Changed 2 years ago by michael2402

You don't have to be sorry.

Feel free to report more bugs, if there is an issue that is rarely triggered it will help us find it.

comment:5 Changed 2 years ago by Don-vip

Milestone: 16.07

comment:6 Changed 2 years ago by naoliv

Resolution: worksforme
Status: closedreopened

I guess I found it.

With the latest JOSM from http://josm.openstreetmap.de/josm-latest.jar (version 10819) it is working as expected.

But with https://josm.openstreetmap.de/jenkins/job/JOSM/jdk=JDK8/lastSuccessfulBuild/artifact/dist/josm-custom-optimized.jar (also version 10819) I see the problem.

See the new attached example paste-error.osm
I did create the left way, Ctrl+C and then Ctrl+V. It pasted only the nodes and created an empty way (without any nodes)

comment:7 Changed 2 years ago by Don-vip

Sounds like flavor classes must be excluded from proguard optimization in build.xml

comment:8 Changed 2 years ago by Don-vip

Keywords: proguard added
Milestone: 16.08
Summary: Can't properly copy objectsCan't properly copy objects with optimized jar

Confirmed. There's a lot of missing class files, I fear there are other bugs.

Last edited 2 years ago by Don-vip (previous) (diff)

comment:9 Changed 2 years ago by Don-vip

Owner: changed from team to Don-vip
Status: reopenednew

comment:10 Changed 2 years ago by Don-vip

Status: newassigned

comment:11 Changed 2 years ago by Don-vip

In 10831/josm:

see #13232 - cleanup OAuth signpost code:

  • remove classes unused by JOSM
  • add missing @Override annotations

comment:12 Changed 2 years ago by Don-vip

In 10832/josm:

see #13232 - cleanup classpath/build: exclude unneeded Commons Compress classes

comment:13 Changed 2 years ago by Don-vip

In 10833/josm:

see #13232 - cleanup classpath/build: exclude unneeded Commons JCS classes

comment:14 Changed 2 years ago by Don-vip

In 10845/josm:

see #13232 - use JAPICC to generate a compatibility report between optimized jar and normal one

Changed 2 years ago by Don-vip

Attachment: compat_report.html added

comment:15 Changed 2 years ago by naoliv

(Only now I am seeing that I forgot to attach the other example file)

And while at it, is it possible to differentiate the optimized version in the status report?
We can only see Is-Local-Build:true there, but there is no way to tell if it's the optimized version or not.
I guess that it would be an important information when reporting a bug, like this one, right?

comment:16 Changed 2 years ago by Don-vip

In 10846/josm:

see #13232 - move class DatasetFactory to unit tests folder

comment:17 Changed 2 years ago by Don-vip

The compatibility report is now automated: jenkins/job/JOSM/jdk=JDK8/API_compatibility_report/

comment:18 Changed 2 years ago by Don-vip

In 10865/josm:

see #13232 - remove unused classes from metadata-extractor and SvgSalamander

comment:19 Changed 2 years ago by Don-vip

In 10866/josm:

see #13232 - remove unused classes from JCS and SvgSalamander

comment:20 Changed 2 years ago by Don-vip

In 10895/josm:

see #13232 - remove/exclude unused classes

comment:21 Changed 2 years ago by Don-vip

@Michael: is the class SingleLayerTransferable needed?

comment:22 Changed 2 years ago by michael2402

It once was during the CCP rewrite. I now changed it to store the layer in the primitive transferable object. We don't need it anywhere any more, the layer dialog supports drag+drop for multiple layers.

comment:23 Changed 2 years ago by Don-vip

In 10905/josm:

see #13232 - remove SingleLayerTransferable

comment:24 Changed 2 years ago by Don-vip

OK. Well I still don't see what difference between normal and optimized jars is causing this bug.

comment:25 Changed 2 years ago by Klumbumbus

What is the advantage of optimzed jar compared to the normal jar?

comment:26 Changed 2 years ago by Don-vip

Smaller size.

comment:27 Changed 2 years ago by Klumbumbus

It is 70kb smaller (0.6%). Is this worth the effort?

comment:28 Changed 2 years ago by Don-vip

In 10908/josm:

see #13232 - ignore package org.openstreetmap.gui.jmapviewer.checkBoxTree

comment:29 Changed 2 years ago by Don-vip

It helps greatly to detect unused code, some distributions rely on it, and we should understand what's going on :)

comment:30 Changed 2 years ago by Klumbumbus

OK :)

comment:31 Changed 2 years ago by Don-vip

In 10912/josm:

see #13232 - fix jmapviewer build

comment:32 Changed 2 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 10949/josm:

fix #13232 - fix proguard configuration with serialization methods

Modify Ticket

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