Mapview ConcurrentModification Exception

by Necroline » Mon, 28 Jun 2010 22:01:55 GMT

Sponsored Links
 ello everyone,

As the title suggest i have (sometimes) a
concurrentmodificationexception while trying to create a route between
two locations ...
Here is my code (and in case you're wondering MyOverlay does not try
to access the other Overlays in the map)

private class fillRouteTask extends AsyncTask<Void, GeoPoint,
Void> {

* create the url to call to get the route
* @param src
* @param dest
* @return
private StringBuilder createUrl(GeoPoint src, GeoPoint dest) {
// connect to map web service
StringBuilder urlString = new StringBuilder();

urlString.append("&saddr=");// from
.toString((double) src.getLatitudeE6()
/ 1.0E6));
.toString((double) src.getLongitudeE6()
/ 1.0E6));
urlString.append("&daddr=");// to
.toString((double) dest.getLatitudeE6()
/ 1.0E6));
dest.getLongitudeE6() / 1.0E6));
Log.d("xxx", "URL=" + urlString.toString());

return urlString;

* create the connection to google url
* @param src
* @param dest
* @return
private String connectToUrl(GeoPoint src, GeoPoint dest) {

// get the kml (XML) doc. And parse it to get the
// coordinates(direction
// route).
Document doc = null;
HttpURLConnection urlConnection = null;
URL url = null;
try {
url = new URL(createUrl(src, dest).toString());
urlConnection = (HttpURLConnection)

DocumentBuilderFactory dbf =
DocumentBuilder db = dbf.newDocumentBuilder();
doc = db.parse(urlConnection.getInputStream());

(doc.getElementsByTagName("GeometryCollection") != null

Mapview ConcurrentModification Exception

by Necroline » Mon, 28 Jun 2010 23:42:56 GMT

 ixed it, i removed the Overlays reference from the mapview and it
worked :)

On 28 juin, 16:01, Necroline <> wrote:


Sponsored Links

Other Threads

1. rebooting programatically / platform certificate


I read that, to be able to reboot programatically, you have to:

1. Sign your app with the "platform certificate"
2. Do this:
Intent i = new Intent(Intent.ACTION_REBOOT);
 i.putExtra("nowait", 1);
 i.putExtra("interval", 1);
 i.putExtra("window", 0);

Questions: can any app be signed with such certificate? Can we install
it in non-development devices? Can such app be published in the

In case the answer is NO, i'll like to propose Android developers to
let the app issue this and then the system would ask the user "do you
want to reboot?". This would make us happy.




2. (currently nonworking) attempt at USB host mode for MSM720

Ok, I've just discovered that I had the D+/D- lines the wrong way round to
my hacky device. Its still not working, but its not working better :)

I'm 99% certain the D+/D- lines are correct now because on connection:

[  682.849304] hub 1-0:1.0: port 1, status 0101, change 0001, 12
[  683.003051] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms
status 0x101
[  683.003509] msm_hsusb msm_hsusb: port 1
[  683.058837] msm_hsusb msm_hsusb: irq status 0004
[  683.062591] msm_hsusb msm_hsusb: GetStatus port 1 status 88001205 POWER
sig=se0 PE CONNECT
[  683.122497] usb 1-1: new high speed USB device using msm_hsusb and
address 2

This is a (for certain) USB 2.0 (High Speed) hub I'm attaching. With the
D+/D- lines the wrong way round, it was reported as a low speed device.
According to the USB specs, the (electrical) difference between low and full
speed devices is which of the D lines a 15k pulldown resistor is on. Since
its now registering as a 12Mb/s device initially, this means I have the
lines correct.

The important part is the last line: its going further and detecting it as a
high speed device post reset. This means the the low level USB protocol
signalling and negotiation is working prefectly fine, so all the necessary
clocks, data line setup etc *must* be fine.

However, I'm still getting errors when it tries to actually send USB

[  683.122985] msm_hsusb msm_hsusb: submit_async 1 urb cb67e8a0 ep0out len
64, qtd ffc4b060 [qh 00000000]
[  683.123748] msm_hsusb msm_hsusb: irq status 0002
[  683.124023] msm_hsusb msm_hsusb: dev0 ep0in qtd token 80400d40 --> status
[  683.124420] msm_hsusb msm_hsusb: ehci_urb_done 1 urb cb67e8a0 ep0in
status -32 len 0/64
[  683.124694] msm_hsusb msm_hsusb: irq status 0020 IAA

I'm feeing more hopeful now that I'm certain the D+/D- lines are working ok.
Investigation continues....


3. Auto image fit into TableRow

4. Make a filter on an adapter which is not of String type...

5. Background Intent

6. Image+TextView+radiobutton in spinner

7. Does APK always include all classes of a referenced project in build path?