#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 )
cancel-Button below download progressbar does nothing, but the 'x' closes window
Attachments (1)
Change History (13)
by , 15 years ago
Attachment: | josm_cancel_1.png added |
---|
comment:1 by , 14 years ago
comment:3 by , 14 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
comment:4 by , 13 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 , 13 years ago
Description: | modified (diff) |
---|
comment:7 by , 13 years ago
Priority: | normal → major |
---|
Apparently, the cancel operation is generally broken for all OsmConnection
s.
To reproduce:
- 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()
- Change the OSM server URL in JOSM to
http://localhost.com:9996/api
- Do anything involving the API (e.g., download an bbox or fetch the history of an object)
- Try to cancel the operation – fail.
The connection hangs somewhere inside Java's AbstractPlainSocketImpl
, thus hard to change. I see the following two possibilities:
- Switch to Apache's HttpClient library
- Perform
OsmConnection
s in separateThread
s, 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:11 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Ticket #5667 has been marked as a duplicate of this ticket.