Q:

Android force closes util after screen capture

do anyone know how to read logs?  Well I have my logs using adb logcat but I don't know how to trace which cause the program to force close.  Well the problem happened to my phone when I use screen capture.  My phone model is LG Optimus Black.  Here's my log:
0
D/LGESensors( 1721): ======   ACCELERATION on 0
D/LGESensors( 1721): skykrkrk _sensorEnable SENSORS_ACCELERATION on aa(0)
D/LGESensors( 1721): skykrkrk control__wake
D/SurfaceFlinger( 1721): triggering block screen
D/SurfaceFlinger( 1721): threadLoop before usleep(1000000)
I/VibratorService( 1721): vibratorOff
D/GsmDataConnectionTracker( 1798): LGE_Fast_Dormancy) screen off when current PD
Pstate=(INACTIVE) and DataTransfer=false
D/ActivityManager( 1721): ACTION_SCREEN_OFF received
D/ActivityManager( 1721): There are 44 processes in LRU list
D/ActivityManager( 1721): Free: 194 MB
D/ActivityManager( 1721): Threshold: 100 MB
D/ActivityManager( 1721): There is enough memory! 
D/SurfaceFlinger( 1721): DisplayEventThread About to give-up screen, flinger = 0
x140a48
D/SurfaceFlinger( 1721): DisplayHardwareBase::releaseScreen() screen given-up
D/WAKEUP_LOG( 1721): Triggering ELAPSED_REALTIME_WAKEUP by pid = 1721
E/LockPatternKeyguardView( 1721): stuckOnLockScreenBecauseSimMissing()
E/LockPatternKeyguardView( 1721): createLockScreen()
V/Andy_LockScreen2( 1721): Creation orientation = 1
E/Lockscreen( 1721): LED ON
I/Andy_LockScreen2( 1721): Sim state is READY
D/Andy_LockScreen2( 1721): updateLayout: status=Normal
D/Andy_LockScreen2( 1721): >> refreshMusicPlayerDisplay() ----------------------

D/Andy_LockScreen2( 1721):    music play info = null
D/Andy_LockScreen2( 1721):    has music play info = false
D/Andy_LockScreen2( 1721):    has music play status = started
E/Andy_LockScreen2( 1721): mWasMusicActive =  false      mIsMusicActive =  false
        hasMusicPlayInfo =  false    mResume =  false
E/Andy_LockScreen2( 1721): [BTUI] ### LockScreen : isOpen(true)
E/LockPatternKeyguardView( 1721): maybeEnableFallback()
E/LockPatternKeyguardView( 1721): start()
E/LockPatternKeyguardView( 1721): next()
D/Andy_DigitalClock( 1721): updateTime(), time = 7:12
E/LockPatternKeyguardView( 1721): onScreenTurnedOn()
E/LockPatternKeyguardView( 1721): doesFallbackUnlockScreenExist()
E/LockPatternKeyguardView( 1721): isVerifyUnlockOnly()
D/StatusBar( 1721): DISABLE_EXPAND: yes
D/Andy_LockScreen2( 1721): refreshEventDisplay()
D/Andy_LockScreen2( 1721): onRefreshMusicPlayerInfo()
D/Andy_LockScreen2( 1721):     ### music artist = null
D/Andy_LockScreen2( 1721):     ### music track = null
D/Andy_LockScreen2( 1721):     ### music state = stop
D/Andy_LockScreen2( 1721): refreshEventDisplay() flag = false
D/Andy_LockScreen2( 1721): refreshEventDisplay() mPluggedIn = true
D/Andy_LockScreen2( 1721): mStatus.showStatusLines() = true, mCharging = Chargin
g (67%), mNextAlarm = null, mBatteryGroup.getVisibility() = 0
D/SurfaceFlinger( 1721): createSurface for pid 1721 (480 x 762) name=Keyguard
D/Gmail   ( 1859): packageItemInfo:2Google App Engine
D/Andy_LockScreen2( 1721): mStatus.showStatusLines() = true, mCharging = Chargin
g (67%), mNextAlarm = Thu 4:45 am, mBatteryGroup.getVisibility() = 0
D/Gmail   ( 1859): packageItemInfo:2Google Finance
E/LockPatternKeyguardView( 1721): doesFallbackUnlockScreenExist()
E/LockPatternKeyguardView( 1721): isVerifyUnlockOnly()
D/Gmail   ( 1859): packageItemInfo:2Google Voice
D/Gmail   ( 1859): packageItemInfo:2Google Maps
D/Gmail   ( 1859): packageItemInfo:2Google Notebook
D/GoogleLoginService( 1859): onBind: Intent { act=android.accounts. AccountAuthen
ticator cmp=com.google.android.gsf/.loginservice. GoogleLoginService }
E/LockPatternKeyguardView( 1721): run()
E/LockPatternKeyguardView( 1721): next()
E/LockPatternKeyguardView( 1721): showAlmostAtAccountLoginDialog()
D/KeyguardUpdateMonitor( 1721): received broadcast android.intent.action. BATTERY
_CHANGED
D/KeyguardUpdateMonitor( 1721): handleBatteryUpdate
D/dalvikvm( 2050): GC_EXPLICIT freed 841 objects / 40672 bytes in 75ms
E/LockPatternKeyguardView( 1721): showAlmostAtAccountLoginDialog()
D/KeyguardUpdateMonitor( 1721): received broadcast android.intent.action. TIME_TI
CK
D/KeyguardUpdateMonitor( 1721): handleTimeUpdate
D/StatusBarPolicy( 1721): updateClock(), time = 7:13 PM
D/Andy_DigitalClock( 1721): updateTime(), time = 7:13
D/Andy_DigitalClock( 1721): updateTime(), time = 7:13
D/skia    ( 1721): purging 188K from font cache [17 entries]
E/LockPatternKeyguardView( 1721): showAlmostAtAccountLoginDialog()
D/KeyguardUpdateMonitor( 1721): received broadcast android.intent.action. BATTERY
_CHANGED
D/KeyguardUpdateMonitor( 1721): handleBatteryUpdate
D/dalvikvm( 2165): GC_EXPLICIT freed 309 objects / 14760 bytes in 72ms
E/LockPatternKeyguardView( 1721): showAlmostAtAccountLoginDialog()
D/KeyguardUpdateMonitor( 1721): received broadcast android.intent.action. BATTERY
_CHANGED
D/KeyguardUpdateMonitor( 1721): handleBatteryUpdate
D/dalvikvm( 2243): GC_EXPLICIT freed 1024 objects / 41792 bytes in 194ms
D/dalvikvm( 1859): GC_EXPLICIT freed 1705 objects / 92728 bytes in 80ms
E/LockPatternKeyguardView( 1721): showAlmostAtAccountLoginDialog()
D/KeyguardUpdateMonitor( 1721): received broadcast android.intent.action. BATTERY
_CHANGED
D/KeyguardUpdateMonitor( 1721): handleBatteryUpdate
D/dalvikvm( 2515): GC_EXPLICIT freed 46 objects / 2232 bytes in 185ms
D/KeyguardViewMediator( 1721): wakeWhenReadyLocked(26)
D/KeyguardViewMediator( 1721): handleWakeWhenReady(26)
E/LockPatternKeyguardView( 1721): wakeWhenReadyTq()
D/KeyguardViewMediator( 1721): pokeWakelock(5000)
I/power   ( 1721): *** set_screen_state 1
D/LGESensors( 1721): skykrkrk control__activate handle=acceleration (0) enabled=
1
D/LGESensors( 1721): ======   ACCELERATION on 1
D/LGESensors( 1721): skykrkrk _sensorEnable SENSORS_ACCELERATION on aa(1)
D/LGESensors( 1721): skykrkrk control__set_delay: dev=0x336ee8 delay-ms=200 hSen
sor=0
E/LockPatternKeyguardView( 1721): onScreenTurnedOn()
E/LockPatternKeyguardView( 1721): doesFallbackUnlockScreenExist()
E/LockPatternKeyguardView( 1721): isVerifyUnlockOnly()
I/touchCheck( 1721): WMS's KEY event : KeyEvent{action=1 code=26 repeat=0 meta=0
 scancode=116 chars=null mFlags=8}
I/touchCheck( 1721): ViewRoot's Key event KeyEvent{action=1 code=26 repeat=0 met
a=0 scancode=116 chars=null mFlags=8}
D/StatusBarPolicy( 1721): updateClock(), time = 7:13 PM
D/Andy_DigitalClock( 1721): updateTime(), time = 7:13
D/GsmDataConnectionTracker( 1798): [GsmDataConnectionTracker] onDataStateChanged
(): 0 data calls received
D/Andy_DigitalClock( 1721): updateTime(), time = 7:13
I/PowerManagerService( 1721): stepLocked animation finished mask:2 curIntValue:1
06
D/SurfaceFlinger( 1721): DisplayEventThread Screen about to return, flinger = 0x
140a48
D/SurfaceFlinger( 1721): DisplayHardwarebase::acquireScreen() screen returned
I/touchCheck( 1721): MeNano's ACTION_DOWN - x : 62.88031, y : 308.87268
I/touchCheck( 1721): WMS's ACTION_DOWN - x : 62.88031, y : 308.87268
I/touchCheck( 1721): ViewRoot's Touch Event : MotionEvent{46d4c020 action=0 x=62
.88031 y=270.87268
D/KeyguardViewMediator( 1721): pokeWakelock(2000)
D/KeyguardViewMediator( 1721): pokeWakelock(2000)
D/KeyguardViewMediator( 1721): pokeWakelock(7000)
D/KeyguardViewMediator( 1721): pokeWakelock(7000)
D/KeyguardViewMediator( 1721): pokeWakelock(7000)
I/touchCheck( 1721): MeNano's ACTION_UP - x : 0.0, y : 684.32874
I/touchCheck( 1721): WMS's ACTION_UP - x : 0.0, y : 684.32874
I/touchCheck( 1721): ViewRoot's Touch Event : MotionEvent{46d4c398 action=1 x=0. 
0 y=646.32874
E/LockPatternKeyguardView( 1721): reportSuccessfulUnlockAttempt()
I/OSP     ( 1721): rotationForOrientationLw::useSensor::curRotation=0, lastRotat
ion=0
I/#LGIME  ( 1792): ### onFinishInput
I/#LGIME  ( 1792): #### onStartInput restarting : false / inputType : 0
W/InputManagerService( 1721): Window already focused, ignoring focus gain of: co
m.android.internal.view. IInputMethodClient$Stub$Proxy@46c06c50
V/Orientation( 1721): tiltFlag Changed -> false
D/SurfaceFlinger( 1721): removeLayer_l     name=Keyguard
E/LockPatternKeyguardView( 1721): cleanUp()
I/Lockscreen( 1721): onPause isScreenOn true
D/GestureSensorManager( 1721): unRegisterSensor()
E/Andy_LockScreen2( 1721): [BTUI] ### LockScreen : isOpen(false)
E/LockPatternKeyguardView( 1721): showAlmostAtAccountLoginDialog()
D/KeyguardUpdateMonitor( 1721): received broadcast android.intent.action. BATTERY
_CHANGED
D/KeyguardUpdateMonitor( 1721): handleBatteryUpdate
D/WindowManager( 1721): intercept key tq Keydocd code= 3will be mReject clear
I/VibratorService( 1721): vibratorOff
I/touchCheck( 1721): WMS's KEY event : KeyEvent{action=0 code=3 repeat=0 meta=0
scancode=102 chars=null mFlags=8}
I/ActivityManager( 1721): Starting activity: Intent { flg=0x10000000 cmp=com.lge
.util/.ScreencaptureActivity }
I/ActivityManager( 1721): process name to start: android.process.acore
D/VibratorService( 1721): [DK] vibratorOn()... milliseconds = 10,  mVibrateVolum
e = -1
I/VibratorService( 1721): vibratorOn() vibrate_level = 5, timeout_ms = 10
I/ActivityManager( 1721): Start proc android.process.acore for activity com.lge. 
util/.ScreencaptureActivity: pid=3109 uid=10036 gids={1015, 3003}
D/VibratorService( 1721): [DK] vibratorOn()... milliseconds = 30,  mVibrateVolum
e = -1
I/VibratorService( 1721): vibratorOn() vibrate_level = 5, timeout_ms = 30
D/skia    ( 3109): SHAPER: changerequest 1 -> 5
V/MediaPlayerJAVA( 3109): Call MediaPlayer create! 
V/MediaPlayerJAVA( 3109): Call MediaPlayer Create!  Context:com.lge.util. Screenca
ptureActivity@468d48c0 file: com.lge.util:raw/sc_sound
V/MediaPlayerService( 1628): Client(11) constructor
V/MediaPlayerService( 1628): Create new client(11) from pid 3109, fd=41, offset=
871012, length=25644 Start
V/MediaPlayerService( 1628): [11] setDataSource fd=41, offset=871012, length=256
44
V/MediaPlayerService( 1628): getPlayerType ident == 1179011410 46464952 ident&0x
0000F6FF=[4052]
E/MediaPlayerService( 1628): The Default Player is PV_PLAYER********************
***
V/MediaPlayerService( 1628): player type = 1
V/MediaPlayerService( 1628):  create PVPlayer
I/touchCheck( 1721): WMS's KEY event : KeyEvent{action=1 code=3 repeat=0 meta=0
scancode=102 chars=null mFlags=8}
V/MediaPlayerService( 1628): Create new client(11) from pid 3109, fd=41, offset=
871012, length=25644 END
V/MediaPlayerService( 1628): [11] setAudioStreamType(3)
V/MediaPlayerService( 1628): [11] prepareAsync
D/ITTIAM_AVIPPLUGIN( 1628): This is Not an AVI file
D/PVPlayerEngine( 1628): ACESONG :      PVP_ENGINE_COMMAND_PREPARE 1
D/PVPlayerEngine( 1628): ACESONG : PVP_ENGINE_STATE_TRACK_SELECTION_1_DONE 1
E/PV_COMPONENT( 1628): MyTrackSelectionHelper::SelectTracks() inital list:
D/PV_COMPONENT( 1628): ~~~~~FileFormat X-WAV-FF
D/PVPlayerEngine( 1628): ACESONG : PVP_ENGINE_STATE_TRACK_SELECTION_2_DONE 1
D/PVPlayerEngine( 1628): ACESONG : PVP_ENGINE_STATE_TRACK_SELECTION_3_DONE 1
V/AudioSink( 1628): open(32000, 1, 1, 4)
D/AudioSystem( 1628): [HARDLINE] setStreamtype in AudioSystem =3
D/AudioHardwareALSA( 1628): [HARDLINE] streamType =3
V/AudioSink( 1628): setVolume
D/audiothread( 1628): Set Audio Sink on ActiveTiming
V/MediaPlayerService( 1628): [11] notify (0xbd2a8, 200, 1, 44)
W/MediaPlayer( 3109): info/warning (1, 44)
D/MediaPlayer( 3109): frameworks/base/media/libmedia/mediaplayer.cpp::notify Div
X Media Info
V/MediaPlayerService( 1628): [11] notify (0xbd2a8, 1, 0, 0)
V/MediaPlayerService( 1628): [11] setLooping(0)
V/MediaPlayerService( 1628): [11] setVolume(1.000000, 1.000000)
V/AudioSink( 1628): setVolume(1.000000, 1.000000)
V/MediaPlayerService( 1628): [11] start
V/AudioSink( 1628): flush
V/AudioSink( 1628): start
D/AudioPolicyManagerALSA( 1628): getDeviceForStrategy() device2 0
D/AudioPolicyManagerALSA( 1628): computeVolume()...volume = 0.100000 , stream(3)

V/AudioSink( 1628): SOLE_STST :: + setAudioEffect() MUST be called before this l
og.-----#2 iEnableAudioEffect:-1
I/        ( 3071):  writescreencaptureData socket: 9
D/MediaPlayerJAVA( 3109): Info (1,44)
D/SurfaceFlinger( 1721): createSurface for pid 3109 (1 x 1) name=com.lge.util/co
m.lge.util. ScreencaptureActivity
I/#LGIME  ( 1792): #### onStartInput restarting : false / inputType : 0
D/Omap3ALSA( 1628): [s_route] devices 00000002 in mode 0 handle=0 handle->device
s=0000878f handle->curDev=00000002
D/Omap3ALSA( 1628): [s_route] samplerate=44100, channel=2, buffersize=4128 mode=
0
D/Omap3ALSA( 1628): [s_open] devName=default
D/ALSAControl( 1628): [LUCKYJUN77] getVoIPCallState : 0
D/ALSAControl( 1628): [LUCKYJUN77] setMasterVolume
I/Omap3ALSA( 1628): [s_open] Initialized ALSA PLAYBACK, device default, err = 0
I/ActivityManager( 1721): Displayed activity com.lge.util/.ScreencaptureActivity
: 222 ms (total 222 ms)
D/dalvikvm( 3109): GC_FOR_MALLOC freed 903 objects / 63904 bytes in 27ms
I/dalvikvm-heap( 3109): Grow heap (frag case) to 4.464MB for 1536016-byte alloca
tion
V/AudioSink( 1628): stop
D/dalvikvm( 3109): GC_FOR_MALLOC freed 77 objects / 4104 bytes in 41ms
I/ScreencaptureServer( 3109): getData length=1536000
I/        ( 3118):  Screencaptured Accept lsocket: 12
V/MediaPlayerService( 1628): [11] notify (0xbd2a8, 2, 0, 0)
D/dalvikvm( 3109): GC_FOR_MALLOC freed 90 objects / 4000 bytes in 39ms
I/dalvikvm-heap( 3109): Grow heap (frag case) to 5.929MB for 1536016-byte alloca
tion
D/dalvikvm( 3109): GC_FOR_MALLOC freed 167 objects / 7648 bytes in 63ms
D/dalvikvm( 3109): GC_EXTERNAL_ALLOC freed 12 objects / 384 bytes in 48ms
V/MediaPlayerService( 1628): [11] stop
V/AudioSink( 1628): stop
V/AudioSink( 1628): stop
V/AudioSink( 1628): stop
V/MediaPlayerService( 1628): disconnect(11) from pid 3109
V/MediaPlayerService( 1628): Client(11) destructor pid = 3109
V/AudioSink( 1628): close
V/MediaPlayerService( 1628): disconnect(11) from pid 3109
V/MediaPlayerJAVA( 3109): MediaPlayer release! 
W/dalvikvm( 3109): threadid=7: thread exiting with uncaught exception (group=0x4
0020c20)
E/AndroidRuntime( 3109): FATAL EXCEPTION: Thread-8
E/AndroidRuntime( 3109): java.lang. RuntimeException: Can't create handler inside
 thread that has not called Looper.prepare()
E/AndroidRuntime( 3109):        at android.os. Handler.<init>(Handler.java:121)
E/AndroidRuntime( 3109):        at android.widget. Toast.<init>(Toast.java:68)
E/AndroidRuntime( 3109):        at android.widget. Toast.makeText(Toast.java:231)

E/AndroidRuntime( 3109):        at android.widget. Toast.makeText(Toast.java:258)

E/AndroidRuntime( 3109):        at com.lge.util. ScreencaptureActivity.saveCapute
dImage(ScreencaptureActivity.java:397)
E/AndroidRuntime( 3109):        at com.lge.util. ScreencaptureActivity.access$600
(ScreencaptureActivity.java:56)
E/AndroidRuntime( 3109):        at com.lge.util. ScreencaptureActivity$2.run(Scre
encaptureActivity.java:144)
W/ActivityManager( 1721):   Force finishing activity com.lge.util/.Screencapture
Activity
D/skia    ( 1721): SHAPER: changerequest 1 -> 5
D/SurfaceFlinger( 1721): createSurface for pid 1721 (1 x 1) name=Sorry! 
W/ActivityManager( 1721): Duplicate finish request for HistoryRecord{46bac040 co
m.lge.util/.ScreencaptureActivity}
D/SurfaceFlinger( 1721): removeLayer_l     name=com.lge.util/com.lge.util. Screen
captureActivity
E/AudioHardwareALSA( 1628): CALLING STANDBY
D/AudioHardwareALSA( 1628): Veena In AudioStreamOutAlsa Standby1
D/Omap3ALSA( 1628): [s_route] devices ffffffff in mode 0 handle=712480 handle->d
evices=0000878f handle->curDev=00000002
D/Omap3ALSA( 1628): [s_route] samplerate=44100, channel=2, buffersize=4128 mode=
0
D/Omap3ALSA( 1628): [s_route]devices == -1!!!! 
I/touchCheck( 1721): MeNano's ACTION_DOWN - x : 267.2413, y : 532.2043
I/touchCheck( 1721): WMS's ACTION_DOWN - x : 267.2413, y : 532.2043
I/touchCheck( 1721): ViewRoot's Touch Event : MotionEvent{46d4c398 action=0 x=26
7.2413 y=305.20428
I/touchCheck( 1721): MeNano's ACTION_UP - x : 260.30597, y : 545.61346
I/touchCheck( 1721): WMS's ACTION_UP - x : 260.30597, y : 545.61346
I/touchCheck( 1721): ViewRoot's Touch Event : MotionEvent{46d4c020 action=1 x=26
0.30597 y=318.61346
I/Process ( 3109): Sending signal.  PID: 3109 SIG: 9
I/#LGIME  ( 1792): #### onStartInput restarting : false / inputType : 0
I/ActivityManager( 1721): Process android.process.acore (pid 3109) has died. 
D/SurfaceFlinger( 1721): removeLayer_l     name=Sorry! 
D/StatusBarPolicy( 1721): onSignalStrengthsChanged called.  mSignalStrength : Sig
nalStrength: 21 99 -1 -1 -1 -1 -1 gsm
D/StatusBarPolicy( 1721): updateSignalStrength() Called.  mPhoneData.icondID=1730
2306

A:

Exception logs in your application are following:
FATAL EXCEPTION: Thread-8
    E/AndroidRuntime( 3109): java.lang. RuntimeException: Can't create handler inside
     thread that has not called Looper.prepare()
    E/AndroidRuntime( 3109):        at android.os. Handler.<init>(Handler.java:121)
    E/AndroidRuntime( 3109):        at android.widget. Toast.<init>(Toast.java:68)
    E/AndroidRuntime( 3109):        at android.widget. Toast.makeText(Toast.java:231)

    E/AndroidRuntime( 3109):        at android.widget. Toast.makeText(Toast.java:258)

    E/AndroidRuntime( 3109):        at com.lge.util. ScreencaptureActivity.saveCapute
    dImage(ScreencaptureActivity.java:397)
    E/AndroidRuntime( 3109):        at com.lge.util. ScreencaptureActivity.access$600
    (ScreencaptureActivity.java:56)
    E/AndroidRuntime( 3109):        at com.lge.util. ScreencaptureActivity$2.run(Scre
    encaptureActivity.java:144)

and it is because, you are calling Toast.makeText(,,,).show() inside method ScreenCaptureAcitvity in method saveCapturedImage(), which is in another thread than UI/Event thread.  Use Handler in case you want to notify Event thread from another thread.