Modify

Opened 3 years ago

Closed 15 months ago

Last modified 15 months ago

#5369 closed defect (duplicate)

cancel-Button below download progressbar does nothing, but the 'x' closes window

Reported by: jstein Owned by: team
Priority: major Component: Core
Version: Keywords:
Cc:

Description (last modified by simon04)

cancel-Button below download progressbar does nothing, but the 'x' closes window

Attachments (1)

josm_cancel_1.png (7.4 KB) - added by jstein 3 years ago.

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by jstein

comment:1 Changed 2 years ago by skyper

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

comment:2 Changed 2 years ago by skyper

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

comment:3 Changed 22 months ago by richlv

in some cases download gets stuck. pressing "cancel" is possible, but only marks the button as "pushed", the download itself is not canceled. download dialog can not be closed even with the "x" window button - it just sits there.

that is pretty sad with some unsaved data.

Revision: 4223
Memory Usage: 101 MB / 682 MB (51 MB allocated, but free)
Java version: 1.6.0_22, Sun Microsystems Inc., OpenJDK Server VM
Operating system: Linux
Last edited 22 months ago by richlv (previous) (diff)

comment:4 Changed 18 months ago by ernestjw

I can confirm this with current tested version 4550. Here in Ghana I have a very slow connection. canceling is something that must happen whenever my connection stops responding. This currently always hangs JOSM (no exception). Currently this simply mean I don't even cancel anymore, I directly kill the process. This saves me loads of time.

When I try to download something I must always wait for the download to finish before continuing (download popup is modal). It would had been very nice to have a download work asynchronously, to be able to continue to work while a download continues in the background

comment:5 Changed 18 months ago by simon04

  • Description modified (diff)

See also #5246 and #5291 for issues with Cancel buttons.

comment:6 Changed 15 months ago by simon04

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

comment:7 Changed 15 months ago by simon04

  • Priority changed from normal to major

Apparently, the cancel operation is generally broken for all OsmConnections.


To reproduce:

  1. Run a TCP server that never handles incoming connections, e.g. in Python:
    import SocketServer, time
    
    class ForeverHandler(SocketServer.BaseRequestHandler):
        def handle(self):
            time.sleep(10000)
    
    if __name__ == "__main__":
        HOST, PORT = "localhost", 9996
        server = SocketServer.TCPServer((HOST, PORT), ForeverHandler)
        server.serve_forever()
    
  2. Change the OSM server URL in JOSM to http://localhost.com:9996/api
  3. Do anything involving the API (e.g., download an bbox or fetch the history of an object)
  4. Try to cancel the operation – fail.

The connection hangs somewhere inside Java's AbstractPlainSocketImpl, thus hard to change. I see the following two possibilities:

  1. Switch to Apache's HttpClient library
  2. Perform OsmConnections in separate Threads, but how to reliably kill the thread (see http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html)

What do you think? As this is a very annoying bug which affects editing efficiency, I increase the priority.

comment:8 Changed 15 months ago by simon04

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

comment:9 Changed 15 months ago by simon04

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

comment:10 Changed 15 months ago by simon04

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

comment:11 Changed 15 months ago by simon04

  • Resolution set to duplicate
  • Status changed from new to closed

comment:12 Changed 15 months ago by simon04

Closed as duplicate of #4216.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.