Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#21387 closed defect (othersoftware)

Upload dialog does not refresh

Reported by: mvexel@… Owned by: mvexel@…
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report upload kde Cc: taylor.smock

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Open JOSM on Kubuntu 21.04 using OpenWebStart
  2. Download some data
  3. Make an edit
  4. Open upload dialog using the keyboard shortcut and upload changes
  5. Make another edit
  6. Open upload dialog again using the keyboard shortcut

What is the expected result?

The left panel showing the modifications to commit should represent the edits made.

What happens instead?

The left panel shows a previous set of modifications

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-09-03 03:12:33 +0200 (Fri, 03 Sep 2021)
Revision:18193
Build-Date:2021-09-03 01:31:19
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18193 en) Linux Ubuntu 21.04
Memory Usage: 676 MB / 3806 MB (85 MB allocated, but free)
Java version: 11.0.10+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: KDE
libcommons-compress-java: libcommons-compress-java:all-1.20-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20201225-1build1
liboauth-signpost-java: liboauth-signpost-java:all-1.2.1.2-3
VM arguments: [-Dicedtea-web.bin.location=/opt/OpenWebStart/javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]
Dataset consistency test: No problems found

Plugins:
+ KartaView (374)
+ Mapillary (2.0.0-alpha.36-dirty)
+ apache-commons (35524)
+ apache-http (35589)
+ jna (35662)
+ photo_geotagging (35783)
+ reltoolbox (35640)
+ tageditor (35640)
+ todo (30306)
+ turnlanes-tagging (288)
+ utilsplugin2 (35792)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/TigerReviewedNo&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- ${HOME}/Desktop/modified.mapcss

Last errors/warnings:
- 00027.684 E: Failed to locate image 'preference.png'

Attachments (2)

21387.patch (1.3 KB ) - added by taylor.smock 4 years ago.
Functionally the same as attachment:19319.patch:ticket:19319 (unknown providence)
josm-custom.jar (15.9 MB ) - added by taylor.smock 4 years ago.
Build with attachment:21387.patch

Change History (46)

comment:1 by Don-vip, 4 years ago

Owner: changed from team to mvexel@…
Status: newneedinfo

Can't reproduce. Are some steps missing?

comment:2 by anonymous, 4 years ago

I don't think so.. Here's a short video of what happens when I perform this sequence of actions:

  1. move a bus stop by a tiny amount (for demo purposes)
  2. Upload, notice the right name for the bus stop in the left pane on the upload panel
  3. move a different bus stop by a tiny amount (for demo purposes)
  4. Upload, notice the name of the previous bus stop node displayed in the left pane instead of the correct name of the node I edited.

Please let me know if this helped?

comment:3 by mvexel@…, 4 years ago

It would help if I actually pasted the link to the video:

https://www.flickr.com/gp/rhodes/2o3vF6

comment:4 by mvexel@…, 4 years ago

Little additional discovery: if I use the menu File>Upload Data the behavior does not occur. It only happens if I upload using Ctrl-Shift-Up.

comment:5 by GerdP, 4 years ago

Does it depend on OpenWebStart?

comment:6 by Don-vip, 4 years ago

Keywords: upload added
Owner: changed from mvexel@… to team
Status: needinfonew

comment:7 by mvexel@…, 4 years ago

GerdP -- it doesn't seem to depend on OpenWebStart, I just started the same jar cached by OWS from the command line and could reproduce the behavior.

in reply to:  7 comment:8 by anonymous, 4 years ago

Replying to mvexel@…:

GerdP -- it doesn't seem to depend on OpenWebStart, I just started the same jar cached by OWS from the command line and could reproduce the behavior.

To be clear, I also used the same JVM cached by OWS.

comment:9 by Don-vip, 4 years ago

Description: modified (diff)

The original description did not mention you effectively uploaded the changes, I thought you cancelled the upload dialog. I have updated it.

comment:10 by marcello@…, 4 years ago

Works for me. How do you submit the upload dialog? Use the mouse or ctrl+enter?

comment:11 by Don-vip, 4 years ago

Owner: changed from team to mvexel@…
Status: newneedinfo

comment:12 by mvexel@…, 4 years ago

I use the keyboard to confirm the upload dialog.

comment:13 by skyper, 4 years ago

Do you close the changeset after the first upload or do you leave it open and upload to the same changeset multiple times?

comment:14 by mvexel@…, 4 years ago

Yes, I believe that is the default and I did not change it.

comment:15 by GerdP, 4 years ago

Can you reproduce the problem with a clean installation? You can use a command like this to test:

java -Djosm.home=/home/user/.josm_dev -jar josm-tested.jar

Does it happen with other data, too, or just with these two nodes? (Found the nodes 4195870640 and 8927886076, both were only changed once by you)

Last edited 4 years ago by GerdP (previous) (diff)

comment:16 by GerdP, 4 years ago

Cc: taylor.smock added

Just found #19319 which might be a duplicate.

comment:17 by marcello@…, 4 years ago

According to #19319, can you please uninstall the mapillary plugin and see if the bug still happens?

Last edited 4 years ago by skyper (previous) (diff)

comment:18 by taylor.smock, 4 years ago

From comment:7:ticket:19319, probably not soley the Mapillary plugin. But I'm not touching anything with the upload dialog there (AFAIK) -- I do have some implemented methods for returning source information, which is just returning a String, and is called from the upload dialog.

Fun thing is I haven't noticed this at home on Arch Linux. Which isn't Ubuntu.

So this may be an Ubuntu specific bug.

Last edited 4 years ago by taylor.smock (previous) (diff)

comment:19 by skyper, 4 years ago

Does the "automatically obtain source" option come into play here?

Have not noticed it on GNU Debian but I use new java versions, 11.0.12 or 17ea. Plus, I do not obtain the source automatically.

Last edited 4 years ago by skyper (previous) (diff)

comment:20 by mvexel@…, 4 years ago

I tried uninstalling all plugins and the behavior is still the same.

comment:21 by taylor.smock, 4 years ago

This bug report uses Java 11 (Azul) while #19319 uses Java 13 (probably Ubuntu packaged version). Both were on Ubuntu, but #19319 was on 20.04 while this one is on 21.04.

@mvexel: can you reproduce with snap and/or flatpak? comment:7:ticket:19319 indicated that they were able to reproduce with a snap. If yes, it is probably going to be something specific to Ubuntu and its packages. I'll see if I can repro with Ubuntu 21.04 sometime, but it might be a specific configuration value that is no longer set by default, especially if you gone through several Ubuntu upgrade cycles.

There was also an attached patch for #19319. I'll dust it off and make a build for you to test with. It may or may not work. Please let us know.

by taylor.smock, 4 years ago

Attachment: 21387.patch added

Functionally the same as attachment:19319.patch:ticket:19319 (unknown providence)

by taylor.smock, 4 years ago

Attachment: josm-custom.jar added

comment:22 by skyper, 4 years ago

I find KDE mentioned in both tickets. Is this a problem with only some Desktop Environments?

in reply to:  22 comment:23 by taylor.smock, 4 years ago

Replying to skyper:

I find KDE mentioned in both tickets. Is this a problem with only some Desktop Environments?

That is actually a good question. I don't use KDE, I use GNOME. Or i3 if I'm feeling like I want a lightweight environment.

This reporter and the other reporter are probably using Kubuntu. I think I used Ubuntu (with the default desktop) for my initial repro testing in #19319.

comment:24 by mvexel@…, 4 years ago

Yes, I use Kubuntu. Apologies, I assumed that this information was collected automatically when I filed the ticket from JOSM.

I will try installing the JOSM snap and see if the behavior persists.

comment:25 by mvexel@…, 4 years ago

Confirming that the behavior persists with JOSM (same version) installed from snap.

in reply to:  24 comment:26 by taylor.smock, 4 years ago

Keywords: kde added

Replying to mvexel@…:

Yes, I use Kubuntu. Apologies, I assumed that this information was collected automatically when I filed the ticket from JOSM.

I will try installing the JOSM snap and see if the behavior persists.

Partially.

...
Identification: JOSM/1.5 (18193 en) Linux Ubuntu 21.04
...
Desktop environment: KDE
...

I didn't know exactly what you were using, but I had a semi-good idea.
Part of the problem with KDE is that there is KDE Neon (Ubuntu based) and Kubuntu (also Ubuntu based). But I would have guessed Kubuntu, since Neon is more niche/advanced.

Anyway, for stuff that is desktop-environment specific (which is what this appears to be), I've got to spin up virtual machines, since installing KDE tends to change some of the defaults, and I dislike having to reset them. And debugging in virtual machines, while technically possible, is a PITA.

Anyway, thank you for confirming that the behavior persists in the snap.

in reply to:  24 comment:27 by skyper, 4 years ago

Keywords: kde removed

Replying to mvexel@…:

Java version: 11.0.10+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM

Is Azul java up-to-date? I see 11.0.12 was released for some architectures.
Could you try it with "clean" openjdk from ubuntu?

comment:28 by mvexel@…, 4 years ago

Keywords: kde added

The patched version provided by taylor.smock eliminates the bahvior!

comment:29 by mvexel@…, 4 years ago

Sorry I re-added the kde keyword by accident, I think.

skyper -- do you still want me to try with another Java version? I am not sure how to do this with OWS but I am sure I can find out.

in reply to:  29 ; comment:30 by skyper, 4 years ago

Replying to mvexel@…:

Sorry I re-added the kde keyword by accident, I think.

Nop, I removed it by accident. Everything is fine

skyper -- do you still want me to try with another Java version? I am not sure how to do this with OWS but I am sure I can find out.

I guess not anymore but better ask Taylor about it.

comment:31 by mvexel@…, 4 years ago

I noticed that the related ticket https://josm.openstreetmap.de/ticket/19319 where the patched JOSM version that made the problem go away came from, is a year old. Since the behavior exists in today's production version, is this patch still awaiting merging? Can we expect to see this issue go away in a future JOSM production version or will I need to patch JOSM myself?

Thanks for all your help with this.

comment:32 by Don-vip, 4 years ago

Mmm this patch looks strange and made by an anonymous user. I think there should be a better way to fix this.

in reply to:  30 comment:33 by taylor.smock, 4 years ago

Replying to skyper:

Replying to mvexel@…:

skyper -- do you still want me to try with another Java version? I am not sure how to do this with OWS but I am sure I can find out.

I guess not anymore but better ask Taylor about it.

I'd like to see if it exists on a newer version of Java 11, but I hope the snap uses the latest version of Java 11. I'll have to check that (I avoid snap since it is pretty much Ubuntu specific).

Replying to Don-vip:

Mmm this patch looks strange and made by an anonymous user. I think there should be a better way to fix this.

I agree. It is why I specified "unknown providence" in the note. Pretty much the only reason I posted it was (a) to update it, (b) so that other people knew what was in the test jar, and (c) to see if this a duplicate of #19319 (I think we can conclusively say it is a duplicate of #19319 at this point).

comment:34 by taylor.smock, 4 years ago

I was able to reproduce with the snap (Java version 11.0.11+9-Ubuntu-0ubuntu2.18.04, Ubuntu, OpenJDK 64-Bit Server VM, Revision:18193) in a Kubuntu VM. This was a fresh install, so probably not due to configuration stuff.

EDIT: And now I cannot reproduce with OpenWebStart (Java version: 11.0.10+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM). With and without the plugins installed for this ticket. But I did reproduce with flatpak. And was unable to reproduce under flatpak with a debugger. And was then unable to reproduce with flatpak.

I hate bugs like this. Where the bug is always reproducible with a specific technology (snap), reporter originally saw it in another (OpenWebStart), and cannot be reproduced in an environment similar to the reporters by a developer with a debugger attached.

TBH, I suspect this is either a KDE bug and/or a Java bug. I was able to click on the "old" data which then updated the clicked area to have the appropriate text.

Last edited 4 years ago by taylor.smock (previous) (diff)

comment:36 by taylor.smock, 4 years ago

@anonymous: This is one of those bugs that is going to be really hard to track down.

For example, in order to debug this problem, we need to do the following:

  1. Install Kubuntu (I don't know what other developers run -- I use Mac and Linux, but not Windows)
  2. Run JOSM under a debugger and see if the behavior occurs. I think I indicated that it was not the case in comment:34. I'm going to try again running on real hardware over the weekend sometime.
  3. Figure out where the bug actually is. I suspect it is most likely a KDE backend specific problem.

What I will probably end up doing is finding some kind of java call trace instrumentation agent, and comparing the traces between KUbuntu (KDE), Ubuntu (GNOME 3), Arch (GNOME 3), Fedora (GNOME 3), (possibly) Mac, and (possibly) Windows. All with the same Java version and vendor (probably OpenJDK to avoid vendor differences). Of those, I think I've got Ubuntu, Arch, Fedora, and Windows installed. And I use a Mac at work.

Again, as noted in comment:34, I suspect this is a KDE specific Java bug. And the patch is really hacky -- we shouldn't have to get the parent component of the dialog, and force that to revalidate/repaint. The code, as is, works on every other platform that we have tested on. It would be better to fix it upstream than to hack around it here.

comment:37 by mvexel@…, 4 years ago

TBH, I suspect this is either a KDE bug and/or a Java bug. I was able to click on the "old" data which then updated the clicked area to have the appropriate text.

My hunch is that you are right. That would make it difficult to debug.. I'm waiting for Kubuntu 21.10 which comes with Plasma 5.22, although I have no idea if the problem can be traced to Plasma. Let me know if I can be of more help debugging this, and thanks for your time looking into this.

comment:38 by skyper, 4 years ago

@those with problems:
Is it possible to try, a different Desktop Environment instead of KDE? Installing LXDE or Xfce in parallel should work. If it is working with the other environment we probably are one step further.

Last edited 4 years ago by skyper (previous) (diff)

comment:39 by anonymous, 4 years ago

I'm waiting for Kubuntu 21.10

It was released 4 days ago: https://kubuntu.org/news/kubuntu-21-10-impish-indri-released/

(JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, this)

returns

MainApplication.getMainFrame()

Thus

JFrame frame = (JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, this);
frame.revalidate();
frame.repaint();

could be replaced with

MainApplication.getMainFrame().revalidate();
MainApplication.getMainFrame().repaint();

I don't know if this makes any difference.

Is it possible to try, a different Desktop Environment instead of KDE?

I will try.

comment:40 by marcello@…, 4 years ago

Well that anon patch surely fixes things but it does so by redrawing everything: the map, the panels, the menu, the toolbars, ... you get it.

Can you try this custom build and see if the problem is still there? The https://josm.openstreetmap.de/attachment/ticket/21227/josm-custom.jar

comment:41 by anonymous, 4 years ago

Kubuntu 21.10 with OpenJDK 18 doesn't have this bug.
Xubuntu 20.04 also doesn't have this bug.
It seems to be a KDE only issue, which doesn't occur in latest Kubuntu.

comment:42 by Don-vip, 4 years ago

Resolution: othersoftware
Status: needinfoclosed

comment:43 by Don-vip, 4 years ago

Ticket #19319 has been marked as a duplicate of this ticket.

comment:44 by mvexel@…, 4 years ago

Thanks for all the work put into investigating this. I know it can be frustrating dealing with upstream bugs.

Modify Ticket

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