[G1 Android Development] linuxluver:
FastTest Breaks "Wifi Tracker" app

HTC Magic 32B

I really like Wifi Tracker. It's combines Maps, GPS and wifi scanning to produce *.csv and *.kml (Google earth) output files of wifi APs it has seen while scanning.

It crashes in FastTest. I've tried FastTest 2.4 and 2.4.1. If you touch "Toggle scanning" the app appears to respond....but it's dead and will produce an FC after 30-60 seconds. If you touch "Toggle Map"...it accents the button, but nothing is happening and the app is dead..

I use this app a lot, so have had to revert to Cyanogen Mod 4.2.14.1 for now.

There also seems to be a disconnect between the Power Control widget and the wifi components. The widget will say things are on that aren't and vice versa. GPS seems to "get "stuck" on the widget and won't turn off (on the widget).

These issues may be connected the crashing interation between wifi and GPS as seen in Wifi Tracker.

If I get a chance I'll connect to the PC and do a logcat via adb when performing these tasks.

Update: OK...I've caught the crash via logcat. It doesn't even appear to start the app.

Background: Fresh FastTest v2.4.1 install onto wiped HTC Magic 32B phone. The only app installed after the first boot is "Wifi Tracker". Here is the crash:

I/ActivityManager( 89): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.prowl.wifiscanner/.WifiScanner }

I/ActivityManager( 89): Start proc org.prowl.wifiscanner for activity org.prowl.wifiscanner/.WifiScanner: pid=774 uid=10041 gids={3003, 1015}

I/ActivityThread( 774): Publishing provider org.prowl.wifiscanner.fileprovider: org.prowl.wifiscanner.FileProvider

D/LocationManager( 774): Constructor: service = android.location.ILocationManager$Stub$Proxy@43a5d6d0

I/NotificationService( 89): enqueueToast pkg=org.prowl.wifiscanner callback=android.app.ITransientNotification$Stub$Proxy@43c84c80 duration=1

I/dalvikvm( 774): Could not find method android.view.ScaleGestureDetector.onTouchEvent, referenced from method com.google.android.maps.MapView.onTouchEvent

W/dalvikvm( 774): VFY: unable to resolve virtual method 231: Landroid/view/ScaleGestureDetector;.onTouchEvent (Landroid/view/MotionEvent;)Z

D/dalvikvm( 774): VFY: replacing opcode 0x6e at 0x001e

D/dalvikvm( 774): Making a copy of Lcom/google/android/maps/MapView;.onTouchEvent code (96 bytes)

E/dalvikvm( 774): Could not find class 'android.view.ScaleGestureDetector', referenced from method com.google.android.maps.MapView.setup

W/dalvikvm( 774): VFY: unable to resolve new-instance 84 (Landroid/view/ScaleGestureDetector;) in Lcom/google/android/maps/MapView;

D/dalvikvm( 774): VFY: replacing opcode 0x22 at 0x0065

D/dalvikvm( 774): Making a copy of Lcom/google/android/maps/MapView;.setup code (272 bytes)

W/System.err( 774): java.lang.NoClassDefFoundError: android.view.ScaleGestureDetector

W/System.err( 774):	at com.google.android.maps.MapView.setup(MapView.java:368)

W/System.err( 774):	at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:187)

W/System.err( 774):	at com.google.android.maps.MapView.<init>(MapView.java:280)

W/System.err( 774):	at com.google.android.maps.MapView.<init>(MapView.java:226)

W/System.err( 774):	at org.prowl.wifiscanner.WifiScanner.onCreate(WifiScanner.java:187)

W/System.err( 774):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)

W/System.err( 774):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2427)

W/System.err( 774):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2480)

W/System.err( 774):	at android.app.ActivityThread.access$2200(ActivityThread.java:118)

W/System.err( 774):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1834)

W/System.err( 774):	at android.os.Handler.dispatchMessage(Handler.java:99)

W/System.err( 774):	at android.os.Looper.loop(Looper.java:123)

W/System.err( 774):	at android.app.ActivityThread.main(ActivityThread.java:4320)

W/System.err( 774):	at java.lang.reflect.Method.invokeNative(Native Method)

W/System.err( 774):	at java.lang.reflect.Method.invoke(Method.java:521)

W/System.err( 774):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)

W/System.err( 774):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)

W/System.err( 774):	at dalvik.system.NativeStart.main(Native Method)

D/WifiTracker( 774): OnStart service called

I/MapActivity( 774): Handling network change notification:CONNECTED

E/MapActivity( 774): Couldn't get connection factory client

D/Smack ( 235): [XMPPConn] close connection, notifyClosed=false

I/MediaUploader( 352): No need to wake up

W/Smack/Packet( 235): notify conn break (IOEx), close connection

D/libgps ( 89): PDSM_PD_EVENT_COMM_CONNECTED

D/libgps ( 89): PDSM_PD_EVENT_COMM_DONE

D/libgps ( 89): calling sAGpsStatusCallback GPS_RELEASE_AGPS_DATA_CONN

D/libgps ( 89): qct_agps_data_conn_closed

D/dalvikvm( 227): GC freed 8911 objects / 486528 bytes in 182ms

D/NetworkLocationProvider( 89): onDataConnectionStateChanged 3

D/GpsLocationProvider( 89): state: DISCONNECTED apnName: www.vodafone.net.nz reason: dataDisabled

I/MapActivity( 774): Handling network change notification:CONNECTED

E/MapActivity( 774): Couldn't get connection factory client

D/GpsLocationProvider( 89): updateNetworkState available

D/GpsLocationProvider( 89): NetworkThread wait for 14061337ms

I/MapActivity( 774): Handling network change notification:CONNECTED

E/MapActivity( 774): Couldn't get connection factory client

D/Smack ( 235): [XMPPConn] close connection, notifyClosed=false

D/GpsLocationProvider( 89): updateNetworkState available

D/GpsLocationProvider( 89): NetworkThread wait for 14061200ms

I/MediaUploader( 352): No need to wake up

I/MediaUploader( 352): No need to wake up

W/Smack/Packet( 235): notify conn break (IOEx), close connection

D/GpsLocationProvider( 89): TTFF: 14565

D/AndroidRuntime( 774): Shutting down VM

W/dalvikvm( 774): threadid=3: thread exiting with uncaught exception (group=0x4001e190)

E/WIFITracker( 774): null

E/WIFITracker( 774): java.lang.NullPointerException

E/WIFITracker( 774):	at org.prowl.wifiscanner.WifiScanner$GPSListener.onLocationChanged(WifiScanner.java:1159)

E/WIFITracker( 774):	at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:180)

E/WIFITracker( 774):	at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:113)

E/WIFITracker( 774):	at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:129)

E/WIFITracker( 774):	at android.os.Handler.dispatchMessage(Handler.java:99)

E/WIFITracker( 774):	at android.os.Looper.loop(Looper.java:123)

E/WIFITracker( 774):	at android.app.ActivityThread.main(ActivityThread.java:4320)

E/WIFITracker( 774):	at java.lang.reflect.Method.invokeNative(Native Method)

E/WIFITracker( 774):	at java.lang.reflect.Method.invoke(Method.java:521)

E/WIFITracker( 774):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)

E/WIFITracker( 774):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)

E/WIFITracker( 774):	at dalvik.system.NativeStart.main(Native Method)

D/dalvikvm( 774): DestroyJavaVM waiting for non-daemon threads to exit

D/dalvikvm( 363): GC freed 4273 objects / 201560 bytes in 120ms

D/dalvikvm( 327): GC freed 479 objects / 22672 bytes in 88ms

**********************************************************************************************************

Done....all over. App dead. Completely unresponsive. Compared to the properly functioning app launch below, it doesn't look like Wifi Scanner even started.

Wifi Tracker works fine on Super D v1.8. By comparison, this is what exactly the same action (starting Wifi Tracker) looks like on SuperD v1.8:

*****************************************************************************************************************

I/ActivityManager( 92): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.prowl.wifiscanner/.WifiScanner }

I/ActivityManager( 92): Start proc org.prowl.wifiscanner for activity org.prowl.wifiscanner/.WifiScanner: pid=1024 uid=10042 gids={3003, 1015}

I/ActivityThread( 1024): Publishing provider org.prowl.wifiscanner.fileprovider: org.prowl.wifiscanner.FileProvider

D/LocationManager( 1024): Constructor: service = android.location.ILocationManager$Stub$Proxy@43a7e968

I/NotificationService( 92): enqueueToast pkg=org.prowl.wifiscanner callback=android.app.ITransientNotification$Stub$Proxy@43a33138 duration=0

D/WifiTracker( 1024): OnStart service called

I/MapActivity( 1024): Handling network change notification:CONNECTED

E/MapActivity( 1024): Couldn't get connection factory client

D/dalvikvm( 1024): GC freed 4048 objects / 236016 bytes in 93ms

D/dalvikvm( 1024): GC freed 6689 objects / 404480 bytes in 99ms

I/ActivityManager( 92): Displayed activity org.prowl.wifiscanner/.WifiScanner: 2166 ms (total 2166 ms)

D/dalvikvm( 1024): GC freed 5647 objects / 449408 bytes in 93ms

D/dalvikvm( 1024): GC freed 590 objects / 65080 bytes in 91ms

D/dalvikvm( 1024): GC freed 541 objects / 88728 bytes in 93ms

D/wifis ( 1024): startScan

I/NotificationService( 92): enqueueToast pkg=org.prowl.wifiscanner callback=android.app.ITransientNotification$Stub$Proxy@439d87e0 duration=1

W/InputManagerService( 92): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4394c880

D/GpsLocationProvider( 92): setMinTime 500

D/GpsLocationProvider( 92): startNavigating

D/libgps ( 92): qct_gps_set_position_mode = 1, fix_frequency = 1

D/libgps ( 92): qct_gps_start

D/GpsLocationProvider( 92): Acquiring wakelock

D/libgps ( 92): PDSM_PD_EVENT_GPS_BEGIN

D/dalvikvm( 1024): GC freed 388 objects / 58200 bytes in 90ms

D/dalvikvm( 1024): GC freed 2609 objects / 163424 bytes in 95ms

D/dalvikvm( 1024): GC freed 728 objects / 90584 bytes in 98ms

D/GpsLocationProvider( 92): TTFF: 6172

D/dalvikvm( 1024): GC freed 576 objects / 149032 bytes in 92ms

I/NotificationService( 92): enqueueToast pkg=org.prowl.wifiscanner callback=android.app.ITransientNotification$Stub$Proxy@43b31250 duration=1

I/global ( 1024): Default buffer size used in BufferedOutputStream constructor. It would be better to be explicit if an 8k buffer is required.