cgeo/c-geo-opensource — Issue #1111: NPE in live-map while scrolling
Author: SammysHP
Created: 2012-02-12 09:33:49+00:00
State: open
Labels: bug

Fast scrolling through the live-map, hard to reproduce (for me).

```
I/cgeo ( 5368): Starting cgeo.geocaching 20120104 a.k.a 04.01.2012...
I/cgeo ( 5368): Using last location from network
I/cgeo ( 5368): Location service started
D/cgeo ( 5368): GET https://www.geocaching.com/login/default.aspx
D/cgeo ( 5368): Database clean: started
D/cgeo ( 5368): Database clean: 8 geocaches remaining for listId=0
D/cgeo ( 5368): Database clean: finished
I/System.out( 347): [INFO:140092472]: LogSource: Running flush
I/System.out( 347): [INFO:140092481]: LogSource: Sending payload [bytes=246]
I/ActivityManager( 227): Displayed cgeo.geocaching/.cgeo: +574ms
I/System.out( 347): [INFO:140092908]: LogSource: Response [http=200,length=211]
I/System.out( 347): [INFO:140092910]: LogSource: Read id 40, status code 200
I/ActivityManager( 227): Starting: Intent { cmp=cgeo.geocaching/.maps.mapsforge.MapsforgeMapActivity } from pid 5368
D/dalvikvm( 5368): GC_EXTERNAL_ALLOC freed 1655K, 50% free 4704K/9351K, external 9219K/9244K, paused 50ms
I/cgeo ( 5368): Direction service started
D/cgeo ( 5368): 200 (1892 ms) GET https://www.geocaching.com/login/default.aspx
D/dalvikvm( 5368): GC_EXTERNAL_ALLOC freed 1152K, 52% free 4548K/9351K, external 3981K/4068K, paused 42ms
D/dalvikvm( 5368): GC_EXTERNAL_ALLOC freed 116K, 52% free 4577K/9351K, external 4636K/5785K, paused 45ms
D/dalvikvm( 5368): GC_EXTERNAL_ALLOC freed 108K, 52% free 4545K/9351K, external 7241K/7415K, paused 41ms
D/dalvikvm( 5368): GC_EXTERNAL_ALLOC freed <1K, 52% free 4545K/9351K, external 9843K/10590K, paused 48ms
D/dalvikvm( 5368): GC_EXTERNAL_ALLOC freed <1K, 52% free 4544K/9351K, external 12446K/13193K, paused 40ms
D/cgeo ( 5368): cgData.loadCaches([GC2Y7GX]) from DB
D/cgeo ( 5368): POST http://api.go4cache.com/get.php
D/cgeo ( 5368): Loading GC2Y7GX bei den pferden (0) from DB
D/cgeo ( 5368): GET http://www.geocaching.com/map/default.aspx
D/cgeo ( 5368): 200 (78 ms) POST http://api.go4cache.com/get.php
I/ActivityManager( 227): Displayed cgeo.geocaching/.maps.mapsforge.MapsforgeMapActivity: +1s17ms
D/dalvikvm( 5368): GC_FOR_MALLOC freed 1255K, 50% free 4829K/9607K, external 15171K/15795K, paused 44ms
D/cgeo ( 5368): 200 (398 ms) GET http://www.geocaching.com/map/default.aspx
I/cgeo ( 5368): Already logged in Geocaching.com as SammysHP
I/cgeo ( 5368): Geocaching.com language already set to English
D/cgeo ( 5368): GET http://www.geocaching.com/account/ManagePreferences.aspx
D/cgeo ( 5368): 200 (455 ms) GET http://www.geocaching.com/account/ManagePreferences.aspx
D/cgeo ( 5368): POST http://www.geocaching.com/map/default.aspx/MapAction
D/cgeo ( 5368): POST http://api.go4cache.com/get.php
D/cgeo ( 5368): POST http://www.geocaching.com/map/default.aspx/MapAction
D/cgeo ( 5368): 200 (515 ms) POST http://www.geocaching.com/map/default.aspx/MapAction
D/cgeo ( 5368): 200 (69 ms) POST http://api.go4cache.com/get.php
D/WifiService( 227): releaseWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.BinderProxy@40986e10}
D/cgeo ( 5368): 200 (553 ms) POST http://www.geocaching.com/map/default.aspx/MapAction
D/dalvikvm( 5368): GC_CONCURRENT freed 1769K, 47% free 5107K/9607K, external 15081K/15795K, paused 3ms+5ms
D/cgeo ( 5368): POST http://api.go4cache.com/get.php
D/cgeo ( 5368): cgData.loadCaches([GC2Y7GX, GC39TJ7, GC37VDN, GC3AA4J]) from DB
D/cgeo ( 5368): Loading GC2Y7GX bei den pferden (0) from DB
D/cgeo ( 5368): Loading GC37VDN 3rd Nighty - The Wall (NC) (0) from DB
D/cgeo ( 5368): 200 (74 ms) POST http://api.go4cache.com/get.php
D/cgeo ( 5368): Loading GC39TJ7 Im Grund (0) from DB
D/cgeo ( 5368): Loading GC3AA4J 16. Celler Stammtisch (1) from DB
D/cgeo ( 5368): POST http://www.geocaching.com/map/default.aspx/MapAction
D/cgeo ( 5368): 200 (881 ms) POST http://www.geocaching.com/map/default.aspx/MapAction
D/cgeo ( 5368): POST http://api.go4cache.com/get.php
D/cgeo ( 5368): cgData.loadCaches([GC308MW, GC2Y7GX, GC39TJ7, GC3C48K, GC3AA4J]) from DB
D/cgeo ( 5368): Loading GC2Y7GX bei den pferden (0) from DB
D/cgeo ( 5368): Loading GC308MW Alter Spielplatz No. 2553 (0) from DB
D/cgeo ( 5368): Loading GC39TJ7 Im Grund (0) from DB
D/cgeo ( 5368): Loading GC3AA4J 16. Celler Stammtisch (1) from DB
D/cgeo ( 5368): Loading GC3C48K SUCH MICH ! (0) from DB
D/cgeo ( 5368): 200 (63 ms) POST http://api.go4cache.com/get.php
D/cgeo ( 5368): POST http://www.geocaching.com/map/default.aspx/MapAction
D/cgeo ( 5368): 200 (705 ms) POST http://www.geocaching.com/map/default.aspx/MapAction
D/dalvikvm( 227): GC_FOR_MALLOC freed 1814K, 42% free 7008K/11975K, external 2425K/2990K, paused 169ms
D/dalvikvm( 5368): GC_CONCURRENT freed 1885K, 46% free 5303K/9671K, external 15092K/15795K, paused 3ms+28ms
D/cgeo ( 5368): POST http://api.go4cache.com/get.php
D/cgeo ( 5368): cgData.loadCaches([GC308MW, GC3C48K]) from DB
D/cgeo ( 5368): Loading GC308MW Alter Spielplatz No. 2553 (0) from DB
D/cgeo ( 5368): Loading GC3C48K SUCH MICH ! (0) from DB
D/cgeo ( 5368): 200 (68 ms) POST http://api.go4cache.com/get.php
D/cgeo ( 5368): POST http://www.geocaching.com/map/default.aspx/MapAction
D/cgeo ( 5368): cgData.loadCaches([GC1HH93]) from DB
E/cgeo ( 5368): cgData.loadCaches([GC1HH93] failed
W/dalvikvm( 5368): threadid=29: thread exiting with uncaught exception (group=0x40131560)
E/AndroidRuntime( 5368): FATAL EXCEPTION: Download Caches
E/AndroidRuntime( 5368): java.lang.NullPointerException
E/AndroidRuntime( 5368):	at cgeo.geocaching.SearchResult.filterSearchResults(SearchResult.java:150)
E/AndroidRuntime( 5368):	at cgeo.geocaching.cgBase.searchByViewport(cgBase.java:1966)
E/AndroidRuntime( 5368):	at cgeo.geocaching.maps.CGeoMap$DownloadThread.run(CGeoMap.java:1274)
W/ActivityManager( 227): Force finishing activity cgeo.geocaching/.maps.mapsforge.MapsforgeMapActivity
D/cgeo ( 5368): 200 (669 ms) POST http://www.geocaching.com/map/default.aspx/MapAction
W/ActivityManager( 227): Activity pause timeout for HistoryRecord{409f2518 cgeo.geocaching/.maps.mapsforge.MapsforgeMapActivity}
D/dalvikvm( 5368): GC_CONCURRENT freed 2437K, 51% free 4817K/9799K, external 6877K/8588K, paused 5ms+6ms
D/AndroidRuntime( 5368): Shutting down VM
W/dalvikvm( 5368): threadid=1: thread exiting with uncaught exception (group=0x40131560)
I/Process ( 5368): Sending signal. PID: 5368 SIG: 9
I/ActivityManager( 227): Process cgeo.geocaching (pid 5368) has died.
I/WindowManager( 227): WIN DEATH: Window{40b16858 cgeo.geocaching/cgeo.geocaching.cgeo paused=false}
I/WindowManager( 227): WIN DEATH: Window{40b63780 cgeo.geocaching/cgeo.geocaching.maps.mapsforge.MapsforgeMapActivity paused=false}
```

Btw: There are a lot of debug messages like:

```
Loading GC39TJ7 Im Grund (0) from DB
```

Are they really necessary?