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.

Nom du fichier	Répertoire
annotations	com\drew\lang
NullOutputStream.class	com\drew\lang
NotNull.class	com\drew\lang\annotations
Nullable.class	com\drew\lang\annotations
SuppressWarnings.class	com\drew\lang\annotations
DefaultTagDescriptor.class	com\drew\metadata
MetadataReader.class	com\drew\metadata
CanonMakernoteDirectory$AFInfo.class	com\drew\metadata\exif\makernotes
CanonMakernoteDirectory$CameraSettings.class	com\drew\metadata\exif\makernotes
CanonMakernoteDirectory$FocalLength.class	com\drew\metadata\exif\makernotes
CanonMakernoteDirectory$Panorama.class	com\drew\metadata\exif\makernotes
CanonMakernoteDirectory$ShotInfo.class	com\drew\metadata\exif\makernotes
OlympusMakernoteDirectory$CameraSettings.class	com\drew\metadata\exif\makernotes
Escaper.class	com\google\gdata\util\common\base
composite	com\kitfox\svg
FeDistantLight.class	com\kitfox\svg
FeLight.class	com\kitfox\svg
FePointLight.class	com\kitfox\svg
FeSpotLight.class	com\kitfox\svg
SVGConst.class	com\kitfox\svg
AdobeComposite.class	com\kitfox\svg\composite
AdobeCompositeContext.class	com\kitfox\svg\composite
PathUtil.class	com\kitfox\svg\pathcmd
TextBuilder.class	com\kitfox\svg\util
cpx	com\kitfox\svg\xml
WritableXMLElement.class	com\kitfox\svg\xml
CPXConsts.class	com\kitfox\svg\xml\cpx
CPXInputStream.class	com\kitfox\svg\xml\cpx
CPXOutputStream.class	com\kitfox\svg\xml\cpx
CPXTest.class	com\kitfox\svg\xml\cpx
styles	images
DefaultOAuthConsumer.class	oauth\signpost\basic
DefaultOAuthProvider.class	oauth\signpost\basic
HttpURLConnectionRequestAdapter.class	oauth\signpost\basic
HttpURLConnectionResponseAdapter.class	oauth\signpost\basic
PlainTextMessageSigner.class	oauth\signpost\signature
CompressorException.class	org\apache\commons\compress\compressors
FileNameUtil.class	org\apache\commons\compress\compressors
BZip2Constants.class	org\apache\commons\compress\compressors\bzip2
BZip2Utils.class	org\apache\commons\compress\compressors\bzip2
JCS.class	org\apache\commons\jcs
GroupCacheAccess.class	org\apache\commons\jcs\access
PartitionedCacheAccess.class	org\apache\commons\jcs\access
IGroupCacheAccess.class	org\apache\commons\jcs\access\behavior
ConfigurationException.class	org\apache\commons\jcs\access\exception
InvalidGroupException.class	org\apache\commons\jcs\access\exception
JCSJMXBean.class	org\apache\commons\jcs\admin
lateral	org\apache\commons\jcs\auxiliary
AbstractAuxiliaryCacheMonitor.class	org\apache\commons\jcs\auxiliary
IndexedDiskDumper.class	org\apache\commons\jcs\auxiliary\disk\indexed
behavior	org\apache\commons\jcs\auxiliary\lateral
socket	org\apache\commons\jcs\auxiliary\lateral
LateralCache.class	org\apache\commons\jcs\auxiliary\lateral
LateralCacheAttributes.class	org\apache\commons\jcs\auxiliary\lateral
LateralCacheMonitor.class	org\apache\commons\jcs\auxiliary\lateral
LateralCacheNoWait.class	org\apache\commons\jcs\auxiliary\lateral
LateralCacheNoWaitFacade.class	org\apache\commons\jcs\auxiliary\lateral
LateralCommand.class	org\apache\commons\jcs\auxiliary\lateral
LateralElementDescriptor.class	org\apache\commons\jcs\auxiliary\lateral
ILateralCacheAttributes$Type.class	org\apache\commons\jcs\auxiliary\lateral\behavior
ILateralCacheAttributes.class	org\apache\commons\jcs\auxiliary\lateral\behavior
ILateralCacheListener.class	org\apache\commons\jcs\auxiliary\lateral\behavior
tcp	org\apache\commons\jcs\auxiliary\lateral\socket
behavior	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPCacheFactory.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPDiscoveryListener.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPListener$1.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPListener$ConnectionHandler.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPListener$ListenerThread.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPListener.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPSender.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
LateralTCPService.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
TCPLateralCacheAttributes.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp
ITCPLateralCacheAttributes.class	org\apache\commons\jcs\auxiliary\lateral\socket\tcp\behavior
CacheAdaptor.class	org\apache\commons\jcs\engine
CacheConstants.class	org\apache\commons\jcs\engine
CacheGroup.class	org\apache\commons\jcs\engine
CacheWatchRepairable.class	org\apache\commons\jcs\engine
ZombieCacheService.class	org\apache\commons\jcs\engine
ZombieCacheServiceNonLocal$PutEvent.class	org\apache\commons\jcs\engine
ZombieCacheServiceNonLocal$RemoveAllEvent.class	org\apache\commons\jcs\engine
ZombieCacheServiceNonLocal$RemoveEvent.class	org\apache\commons\jcs\engine
ZombieCacheServiceNonLocal$ZombieEvent.class	org\apache\commons\jcs\engine
ZombieCacheServiceNonLocal.class	org\apache\commons\jcs\engine
ZombieCacheWatch.class	org\apache\commons\jcs\engine
ICacheObserver.class	org\apache\commons\jcs\engine\behavior
ICacheService.class	org\apache\commons\jcs\engine\behavior
IProvideScheduler.class	org\apache\commons\jcs\engine\behavior
IShutdownObservable.class	org\apache\commons\jcs\engine\behavior
IZombie.class	org\apache\commons\jcs\engine\behavior
CacheEventLoggerDebugLogger.class	org\apache\commons\jcs\engine\logging
fifo	org\apache\commons\jcs\engine\memory
mru	org\apache\commons\jcs\engine\memory
soft	org\apache\commons\jcs\engine\memory
FIFOMemoryCache.class	org\apache\commons\jcs\engine\memory\fifo
LHMLRUMemoryCache$LHMSpooler.class	org\apache\commons\jcs\engine\memory\lru
LHMLRUMemoryCache.class	org\apache\commons\jcs\engine\memory\lru
MRUMemoryCache.class	org\apache\commons\jcs\engine\memory\mru
SoftReferenceMemoryCache.class	org\apache\commons\jcs\engine\memory\soft
SoftReferenceElementDescriptor.class	org\apache\commons\jcs\engine\memory\util
access	org\apache\commons\jcs\utils
discovery	org\apache\commons\jcs\utils
net	org\apache\commons\jcs\utils
props	org\apache\commons\jcs\utils
zip	org\apache\commons\jcs\utils
AbstractJCSWorkerHelper.class	org\apache\commons\jcs\utils\access
JCSWorker.class	org\apache\commons\jcs\utils\access
JCSWorkerHelper.class	org\apache\commons\jcs\utils\access
behavior	org\apache\commons\jcs\utils\discovery
DiscoveredService.class	org\apache\commons\jcs\utils\discovery
MyByteArrayOutputStream.class	org\apache\commons\jcs\utils\discovery
UDPCleanupRunner.class	org\apache\commons\jcs\utils\discovery
UDPDiscoveryAttributes.class	org\apache\commons\jcs\utils\discovery
UDPDiscoveryManager.class	org\apache\commons\jcs\utils\discovery
UDPDiscoveryMessage$BroadcastType.class	org\apache\commons\jcs\utils\discovery
UDPDiscoveryMessage.class	org\apache\commons\jcs\utils\discovery
UDPDiscoveryReceiver$MessageHandler.class	org\apache\commons\jcs\utils\discovery
UDPDiscoveryReceiver.class	org\apache\commons\jcs\utils\discovery
UDPDiscoverySender.class	org\apache\commons\jcs\utils\discovery
UDPDiscoverySenderThread.class	org\apache\commons\jcs\utils\discovery
UDPDiscoveryService.class	org\apache\commons\jcs\utils\discovery
IDiscoveryListener.class	org\apache\commons\jcs\utils\discovery\behavior
HostNameUtil.class	org\apache\commons\jcs\utils\net
AbstractPropertyContainer.class	org\apache\commons\jcs\utils\props
PropertiesFactory.class	org\apache\commons\jcs\utils\props
PropertiesFactoryFileImpl.class	org\apache\commons\jcs\utils\props
PropertyLoader.class	org\apache\commons\jcs\utils\props
CompressingSerializer.class	org\apache\commons\jcs\utils\serialization
SerializationConversionUtil.class	org\apache\commons\jcs\utils\serialization
CompressionUtil.class	org\apache\commons\jcs\utils\zip
LogSource.class	org\apache\commons\logging
checkBoxTree	org\openstreetmap\gui\jmapviewer
JMapViewerTree$1.class	org\openstreetmap\gui\jmapviewer
JMapViewerTree$2.class	org\openstreetmap\gui\jmapviewer
JMapViewerTree$3.class	org\openstreetmap\gui\jmapviewer
JMapViewerTree$4.class	org\openstreetmap\gui\jmapviewer
JMapViewerTree.class	org\openstreetmap\gui\jmapviewer
CheckBoxNodeData.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
CheckBoxNodeEditor$1.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
CheckBoxNodeEditor.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
CheckBoxNodePanel.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
CheckBoxNodeRenderer.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
CheckBoxTree$1.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
CheckBoxTree$2.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
CheckBoxTree.class	org\openstreetmap\gui\jmapviewer\checkBoxTree
TileClearController.class	org\openstreetmap\gui\jmapviewer\interfaces
ActionParameter$StringActionParameter.class	org\openstreetmap\josm\actions
SearchAction$DescriptionTextBuilder.class	org\openstreetmap\josm\actions\search
Data.class	org\openstreetmap\josm\data
Correction.class	org\openstreetmap\josm\data\correction
DatasetFactory.class	org\openstreetmap\josm\data\osm
SingleLayerTransferable.class	org\openstreetmap\josm\gui\datatransfer
SaveToFile.class	org\openstreetmap\josm\gui\layer
UploadToServer.class	org\openstreetmap\josm\gui\layer
FullyAutomaticPropertiesPanel.class	org\openstreetmap\josm\gui\oauth
HistoryChangedListener.class	org\openstreetmap\josm\gui\widgets
NmeaReader$NMEA_TYPE.class	org\openstreetmap\josm\io
I18n$QuirkyPluralString.class	org\openstreetmap\josm\tools
ImageProvider$OverlayPosition.class	org\openstreetmap\josm\tools
Predicates.class	org\openstreetmap\josm\tools
Property.class	org\openstreetmap\josm\tools
Version 1, edited 2 years ago by Don-vip (previous) (next) (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.