Modify

Opened 8 years ago

Closed 7 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 8 years ago.
compat_report.html (634.5 KB ) - added by Don-vip 8 years ago.

Download all attachments as: .zip

Change History (34)

by naoliv, 8 years ago

Attachment: example.osm added

comment:1 by Don-vip, 8 years ago

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

comment:2 by michael2402, 8 years ago

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 by naoliv, 8 years ago

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 by michael2402, 8 years ago

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 by Don-vip, 8 years ago

Milestone: 16.07

comment:6 by naoliv, 8 years ago

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 by Don-vip, 8 years ago

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

comment:8 by Don-vip, 8 years ago

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 8 years ago by Don-vip (previous) (diff)

comment:9 by Don-vip, 8 years ago

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

comment:10 by Don-vip, 8 years ago

Status: newassigned

comment:11 by Don-vip, 8 years ago

In 10831/josm:

see #13232 - cleanup OAuth signpost code:

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

comment:12 by Don-vip, 8 years ago

In 10832/josm:

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

comment:13 by Don-vip, 8 years ago

In 10833/josm:

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

comment:14 by Don-vip, 8 years ago

In 10845/josm:

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

by Don-vip, 8 years ago

Attachment: compat_report.html added

comment:15 by naoliv, 8 years ago

(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 by Don-vip, 8 years ago

In 10846/josm:

see #13232 - move class DatasetFactory to unit tests folder

comment:17 by Don-vip, 8 years ago

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

comment:18 by Don-vip, 8 years ago

In 10865/josm:

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

comment:19 by Don-vip, 8 years ago

In 10866/josm:

see #13232 - remove unused classes from JCS and SvgSalamander

comment:20 by Don-vip, 8 years ago

In 10895/josm:

see #13232 - remove/exclude unused classes

comment:21 by Don-vip, 7 years ago

@Michael: is the class SingleLayerTransferable needed?

comment:22 by michael2402, 7 years ago

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 by Don-vip, 7 years ago

In 10905/josm:

see #13232 - remove SingleLayerTransferable

comment:24 by Don-vip, 7 years ago

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

comment:25 by Klumbumbus, 7 years ago

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

comment:26 by Don-vip, 7 years ago

Smaller size.

comment:27 by Klumbumbus, 7 years ago

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

comment:28 by Don-vip, 7 years ago

In 10908/josm:

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

comment:29 by Don-vip, 7 years ago

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

comment:30 by Klumbumbus, 7 years ago

OK :)

comment:31 by Don-vip, 7 years ago

In 10912/josm:

see #13232 - fix jmapviewer build

comment:32 by Don-vip, 7 years ago

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. 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.