waar19 / osmdroid

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

Exception when closing the application, which uses OpenStreetMapView. #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
09-22 20:15:09.584: ERROR/ActivityThread(2724): Activity 
com.my_test_app.MapActivity has leaked IntentReceiver 
org.andnav.osm.tileprovider.OpenStreetMapTileFilesystemProvider$MyBroadcastRecei
ver@43836470 that was originally registered here. Are you missing a call to 
unregisterReceiver()?
09-22 20:15:09.584: ERROR/ActivityThread(2724): 
android.app.IntentReceiverLeaked: Activity com.my_test_app.MapActivity has 
leaked IntentReceiver 
org.andnav.osm.tileprovider.OpenStreetMapTileFilesystemProvider$MyBroadcastRecei
ver@43836470 that was originally registered here. Are you missing a call to 
unregisterReceiver()?
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ActivityThread$PackageInfo$ReceiverDispatcher.<init>(ActivityThread.
java:748)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ActivityThread$PackageInfo.getReceiverDispatcher(ActivityThread.java
:576)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ApplicationContext.registerReceiverInternal(ApplicationContext.java:
770)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ApplicationContext.registerReceiver(ApplicationContext.java:757)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ApplicationContext.registerReceiver(ApplicationContext.java:751)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.content.ContextWrapper.registerReceiver(ContextWrapper.java:290)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
org.andnav.osm.views.OpenStreetMapView$1.registerReceiver(OpenStreetMapView.java
:137)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
org.andnav.osm.tileprovider.OpenStreetMapTileFilesystemProvider.<init>(OpenStree
tMapTileFilesystemProvider.java:78)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
org.andnav.osm.views.util.OpenStreetMapTileProviderDirect.<init>(OpenStreetMapTi
leProviderDirect.java:23)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
org.andnav.osm.views.OpenStreetMapView.<init>(OpenStreetMapView.java:140)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
org.andnav.osm.views.OpenStreetMapView.<init>(OpenStreetMapView.java:163)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
java.lang.reflect.Constructor.constructNative(Native Method)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
java.lang.reflect.Constructor.newInstance(Constructor.java:446)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.view.LayoutInflater.createView(LayoutInflater.java:499)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:564)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.view.LayoutInflater.inflate(LayoutInflater.java:407)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:313
)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.Activity.setContentView(Activity.java:1620)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
com.my_test_app.MapActivity.onCreate(MapActivity.java:141)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ActivityThread.access$2100(ActivityThread.java:116)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.os.Looper.loop(Looper.java:123)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
android.app.ActivityThread.main(ActivityThread.java:4203)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
java.lang.reflect.Method.invokeNative(Native Method)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
java.lang.reflect.Method.invoke(Method.java:521)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
09-22 20:15:09.584: ERROR/ActivityThread(2724):     at 
dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by vitaliy....@gmail.com on 22 Sep 2010 at 5:21

GoogleCodeExporter commented 9 years ago
Does anyone have an idea why it appears?

Original comment by vitaliy....@gmail.com on 29 Sep 2010 at 4:56

GoogleCodeExporter commented 9 years ago
See the TODO in OpenStreetMapTileFilesystemProvider constructor.

Original comment by neilboyd on 30 Sep 2010 at 6:41

GoogleCodeExporter commented 9 years ago
See also issue 97.

Original comment by neilboyd on 2 Oct 2010 at 8:26

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r400.

Original comment by neilboyd on 5 Oct 2010 at 7:21

GoogleCodeExporter commented 9 years ago
I'm using current version (4.0/r???) and still (or again) have this issue?
Was it really fixed in r400?
Am I using the correct Version?

Original comment by Will.Fre...@web.de on 10 Dec 2013 at 1:18

GoogleCodeExporter commented 9 years ago
Today I got the same exception. I'm using org.osmdroid:osmdroid-android:4.1.

Original comment by ziem1...@gmail.com on 20 Feb 2014 at 1:49

GoogleCodeExporter commented 9 years ago
Getting this exception using osmdroid 4.1. I have a mapview in a fragment 
inside another fragment (nested fragments). I'm getting the exception after 
couple of orientation changes.

Original comment by skgwa...@gmail.com on 29 Apr 2014 at 6:57

GoogleCodeExporter commented 9 years ago
Also getting this error, OsmDroid 4.0

Original comment by zoefz...@gmail.com on 5 May 2014 at 3:33

GoogleCodeExporter commented 9 years ago
Using osmdroid 4.2 - I am using MapView in fragment and i call:

mapView.getTileProvider().detach();

in my onDetach() fragment's method to fix this issue

Original comment by cabala.m...@gmail.com on 3 Sep 2014 at 5:52