Maps and Map Overlays - ConcurrentModificationException and OutOfMemoryError

by Sripati » Thu, 02 Sep 2010 02:00:25 GMT


Sponsored Links
 i,

If i happen to be moving the map, or zooming the map when update
occurs I got the exceptions. Sometimes getting 1)
ConcurrentModificationException and sometimes getting 2)
OutOfMemoryError. Please anybody have any solution let me know. This
is very critical position.

Logcat : ConcurrentModificationException
________________________________________

09-01 10:38:38.466: ERROR/AndroidRuntime(1840):
java.util.ConcurrentModificationException
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at java.util.ArrayList
$ArrayListIterator.next(ArrayList.java:573)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:44)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
com.google.android.maps.MapView.onDraw(MapView.java:494)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.View.draw(View.java:6740)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.drawChild(ViewGroup.java:1640)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.drawChild(ViewGroup.java:1638)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.View.draw(View.java:6743)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.drawChild(ViewGroup.java:1640)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.View.draw(View.java:6743)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.drawChild(ViewGroup.java:1640)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.View.draw(View.java:6743)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.draw(PhoneWindow.java:1842)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewRoot.draw(ViewRoot.java:1407)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewRoot.performTraversals(ViewRoot.java:1163)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.os.Handler.dispatchMessage(Handler.java:99)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.os.Looper.loop(Looper.java:123)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
android.app.ActivityThread.main(ActivityThread.java:4627)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
java.lang.reflect.Method.invokeNative(Native Method)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
java.lang.reflect.Method.invoke(Method.java:521)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-01 10:38:38.466:



Maps and Map Overlays - ConcurrentModificationException and OutOfMemoryError

by TreKing » Thu, 02 Sep 2010 02:08:22 GMT


 





java.util.ConcurrentModificationException

09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at java.util.ArrayList

$ArrayListIterator.next(ArrayList.java:573)

09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at

com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:44)

09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at

com.google.android.maps.MapView.onDraw(MapView.java:494)

09-01 10:38:38.466: ERROR/AndroidRuntime(1840): at

android.view.View.draw(View.java:6740)


You're trying to modify the contents of an ArrayList concurrently ... don't
do that. Synchronize the access to the list. Somewhere you have a thread
that is trying to update the list at the same time the draw method is
iterating over the items.





You're running out of memory trying to create a bitmap. Looks like this is
in the bowels of the maps library and is not surprising - it's horribly
buggy. Not sure what you can do about that one. If you can reproduce the
issue reliably, submit a bug report.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

--


Sponsored Links


Other Threads

1. handwriting input methods?

Hi All,
  I am postgraduate student in Computer science at Addis Ababa University, 
Addis Ababa, Ethiopia.
   
  on my thesis project, I am designing and developing a multi-ligual(Ethiopic 
and Latin) based online handwriting recognition text entry system.I was trying 
to implement it on Palm OS PDA.However, I couldn't.
   
  Is there any possibility that I can Implement it on the Android Paltform? 
does the Android platform has a built in Latin character recognition 
system(like Graffiti)?
   
   
    

       
---------------------------------
You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.
--~--~---------~--~----~------------~-------~--~----~

2. Layout Animation response to Touch event

How could I accomplish interpreting the touch event with an activity
that I want to do one thing if one area is clicked and another thing
if a different area is clicked? I have a ViewGroup (container) and two
child views that are the same. One is visible: the other is not. I
think I need the touch events to be interpreted by the ViewGroup
(container). Should I make my own custom ViewGroup or can I accomplish
this in a similar manner like the API sample rotating 3d image.
--~--~---------~--~----~------------~-------~--~----~

3. Eclipse stuck at 19%

4. Error when Accessing webservice -

5. Listview non-clickable row - possible bug?

6. anyone know how to integrate the Wimax drvier, GSM driver, CDMA2000 modem driver

7. deploy android application