Modify

Opened 14 years ago

Closed 12 years ago

Last modified 12 years 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 Milestone:
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 14 years ago.

Download all attachments as: .zip

Change History (13)

by jstein, 14 years ago

Attachment: josm_cancel_1.png added

comment:1 by skyper, 13 years ago

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

comment:2 by skyper, 13 years ago

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

comment:3 by richlv, 13 years ago

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 13 years ago by richlv (previous) (diff)

comment:4 by ernestjw, 12 years ago

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 by simon04, 12 years ago

Description: modified (diff)

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

comment:6 by simon04, 12 years ago

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

comment:7 by simon04, 12 years ago

Priority: normalmajor

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 by simon04, 12 years ago

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

comment:9 by simon04, 12 years ago

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

comment:10 by simon04, 12 years ago

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

comment:11 by simon04, 12 years ago

Resolution: duplicate
Status: newclosed

comment:12 by simon04, 12 years ago

Closed as duplicate of #4216.

Modify Ticket

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