#10498 closed defect (fixed)
Remote Control applies tags incorrectly
Reported by: | alex73 | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | 14.11 |
Component: | Core remotecontrol | Version: | |
Keywords: | template_report | Cc: |
Description
Remote Control applies tags incorrectly(i.e. breaks data) in some situation:
I'm trying to call remote control by /load_Object?...&addtags=... more than once from my html page using ajax(but not in parallel - I'm using synchronous mode):
http://127.0.0.1:8111/load_object?objects=n2753693557&addtags=name:be=test1
http://127.0.0.1:8111/load_object?objects=n2795746644&addtags=name:be=test2
If these requests executed without delay, then 'test2' value will be applied to n2753693557.
Looks like it happen because object loading executed asynchronously, but tag values applied synchronously in the LoadObjectHandler.java.
Also, if I load non-exist object, like http://127.0.0.1:8111/load_object?objects=r59195000&addtags=name:be=test, JOSM always returns "OK". It would be great if JOSM returns real status of project loading, i.e. 404 or "ERROR".
Probably, "load_object" should be changed for processing in the synchronous mode. It will allow to return real status of operation, and will allow to apply tags into specified object.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2014-08-31 21:55:55 Last Changed Author: Don-vip Revision: 7480 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2014-08-31 23:51:24 +0200 (Sun, 31 Aug 2014) Last Changed Rev: 7480 Identification: JOSM/1.5 (7480 en) Linux Ubuntu 14.04.1 LTS Memory Usage: 207 MB / 1747 MB (67 MB allocated, but free) Java version: 1.7.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM VM arguments: [-Djava.security.policy=file:/opt/jdk1.7.0_45/jre/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djnlpx.origFilenameArg=/home/alex/.java/deployment/cache/6.0/56/1ee8cfb8-250259f0, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=33604, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp, -Djnlpx.jvm=<java.home>/bin/java, -Djnlpx.vmargs="-Djava.util.Arrays.useLegacyMergeSort=true -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp"] Dataset consistency test: No problems found Last errors/warnings: - E: sun.awt.X11.XException: Cannot write XdndAware property
Attachments (0)
Change History (13)
comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Milestone: | → 14.09 |
---|
follow-up: 4 comment:3 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It works better in the 7521. But still there is issue when dialog "Add tags to selected objects" displayed.
Scenario is:
- Start JOSM 7521.
- Send more than one /load_object?...&addtags=... requests
- JOSM loads specified object first, then display dialog "Add tags to selected objects" for all objects starting from latest. After I click on "Accept all tags" and "Add all tags", Command Stack displays that all tags applied to latest object.
follow-up: 5 comment:4 by , 10 years ago
Replying to alex73:
It works better in the 7521. But still there is issue when dialog "Add tags to selected objects" displayed.
Scenario is:
- Start JOSM 7521.
- Send more than one /load_object?...&addtags=... requests
Do you have a link for testing?
- JOSM loads specified object first, then display dialog "Add tags to selected objects" for all objects starting from latest. After I click on "Accept all tags" and "Add all tags", Command Stack displays that all tags applied to latest object.
I guess the idea is to allow the user to check and change the selection while the add tags dialog is open. This means you'd have to wait for the user to close the first add tags dialog. Only then process the next remotecontrol request, and pop up the next add tags dialog. Is this what you would expect?
comment:5 by , 10 years ago
Replying to bastiK:
Do you have a link for testing?
You can send urls:
http://127.0.0.1:8111/load_object?objects=n2715028079&addtags=name:be=%D0%94%D0%B0%D0%BB%D1%96%D0%BD%D0%B0%20%D0%9F%D1%80%D0%B0%D0%BC%D0%B0%D1%8F
http://127.0.0.1:8111/load_object?objects=n2715025606&addtags=name:be=%D0%9A%D1%80%D1%8B%D1%88%D1%8B%D0%BB%D0%BA%D1%96
http://127.0.0.1:8111/load_object?objects=n2715027085&addtags=name:be=%D0%9C%D0%B0%D0%BA%D0%B5%D0%B5%D1%9E%D1%86%D1%8B
http://127.0.0.1:8111/load_object?objects=n2715029563&addtags=name:be=%D0%9F%D0%B0%D0%B4%D0%B7%D0%B0%D0%BC%D1%87%D0%B0
http://127.0.0.1:8111/load_object?objects=n2726525466&addtags=name:be=%D0%A1%D1%82%D0%B0%D1%80%D0%B0%D1%8F%20%D0%94%D1%83%D0%B1%D1%80%D0%B0%D1%9E%D0%BA%D0%B0
http://127.0.0.1:8111/load_object?objects=n2726525249&addtags=name:be=%D0%9F%D0%BE%D0%BF%D0%BB%D0%B0%D0%B2%D0%B0
or, use my test page: http://latlon.org/~alex73/1.html
As you can see, it opens six "Add tags to selected objects" dialogs.
- JOSM loads specified object first, then display dialog "Add tags to selected objects" for all objects starting from latest. After I click on "Accept all tags" and "Add all tags", Command Stack displays that all tags applied to latest object.
I guess the idea is to allow the user to check and change the selection while the add tags dialog is open. This means you'd have to wait for the user to close the first add tags dialog. Only then process the next remotecontrol request, and pop up the next add tags dialog. Is this what you would expect?
Well, it will be okay for me to send next request only after user will choose something for previous request. But in this case, JOSM should return HTTP answer only after /load_object will be processed, i.e. in synchronous mode. But currently, JOSM returns "OK" asap, without real processing. That means my html page can't detect when first add tags dialog is processed.
I prefer synchronous mode, as I wrote, but it's not so important. It it will be synchronous mode, then it will be task for caller to wait before dialog will be closed, i.e. to wait for HTTP response will be returned.
Or, if it will be asynchronous mode, IMHO dialog should be "Add tags to ... object".
comment:8 by , 10 years ago
Milestone: | 14.09 → 14.10 |
---|
Moving to next milestone then I won't have time neither until the release.
comment:9 by , 10 years ago
Priority: | critical → major |
---|
comment:10 by , 10 years ago
Milestone: | 14.10 → 14.11 |
---|
comment:12 by , 10 years ago
Could anybody please to increase version number in the GET /version protocolversion for prevent script working with JOSM without this bug fixed.
In 7521/josm: