PATRIK27 / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

NullPointerException in MapTileModuleProviderBase.loadMapTileAsync call to ThreadGroup.activeCount #223

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
A user report the call to get active count on the thread group throwing a NPE 
on an Asus EeePad. Attached simple diff to catch the exception.

java.lang.NullPointerException
at java.lang.ThreadGroup.activeCount(ThreadGroup.java:135)
at
org.osmdroid.tileprovider.modules.MapTileModuleProviderBase.loadMapTileAsync(Map
TileModuleProviderBase.java:102)
at
org.osmdroid.tileprovider.MapTileProviderArray.getMapTile(MapTileProviderArray.j
ava:113)
at org.osmdroid.views.overlay.TilesOverlay.drawTiles(TilesOverlay.java:164)
at org.osmdroid.views.overlay.TilesOverlay.draw(TilesOverlay.java:134)
at org.osmdroid.views.overlay.OverlayManager.onDraw(OverlayManager.java:112)
at org.osmdroid.views.MapView.dispatchDraw(MapView.java:827)
at android.view.ViewGroup.drawChild(ViewGroup.java:2506)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2123)
at android.view.ViewGroup.drawChild(ViewGroup.java:2506)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2123)
at android.view.ViewGroup.drawChild(ViewGroup.java:2506)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2123)
at android.view.ViewGroup.drawChild(ViewGroup.java:2506)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2123)
at android.view.ViewGroup.drawChild(ViewGroup.java:2506)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2123)
at android.view.View.draw(View.java:9032)
at android.widget.FrameLayout.draw(FrameLayout.java:419)
at
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:191
0)
at android.view.ViewRoot.draw(ViewRoot.java:1614)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1335)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1950)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:126)
at android.app.ActivityThread.main(ActivityThread.java:3997)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by bobzill...@gmail.com on 28 May 2011 at 6:24

Attachments:

GoogleCodeExporter commented 8 years ago
We recently switched to an ExecutorService, so this issue is no longer present. 
Thank you for the report!

Original comment by kurtzm...@gmail.com on 3 Jun 2011 at 9:34

GoogleCodeExporter commented 8 years ago
To be clearer - we no longer use a ThreadGroup which is what this issue is 
caused by.

Original comment by kurtzm...@gmail.com on 3 Jun 2011 at 9:35