FrameLayout을 상속하는 클래스 ViewController에서 핸들러를 생성하고

핸들러로 받는 메시지를 통해 작업을 처리하는 코드가 있습니다.

SurfaceView를 상속하는 클래스 LogoView에서는 ViewController에서 생성된 handler를 인자값으로 받아

터치가 일어나면 메시지를 send하는 코드가 있습니다.

문제는 LogoView에서 sendMessage를 하기 전에

Message mgs = mHandler.obtainMesssage(); 이 부분에서 프로그램이 죽는 것 같습니다.

아래는 logCat 을 긁어온건데 도움이 될지 모르겠습니다...

노란색으로 표시된 log가 임의로 출력한 log이구요...  

Message mgs = mHandler.obtainMesssage(); 이 부분 실행하기 바로 전에 log를 출력합니다.

바로 뒤에도 log를 출력하는 코드가 있는데 출력이 안되네요.

아직까지 handler와 message는 어렵기만 합니다 ㅜ.ㅡ 도와주세요



07-01 11:15:52.111: DEBUG/AndroidRuntime(6219): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
07-01 11:15:52.111: DEBUG/AndroidRuntime(6219): CheckJNI is OFF
07-01 11:15:52.111: INFO/AndroidRuntime(6219): JNI options: '-Xjniopts:warnonly'
07-01 11:15:52.111: DEBUG/dalvikvm(6219): Precise GC configured ON
07-01 11:15:52.119: DEBUG/dalvikvm(6219): creating instr width table
07-01 11:15:52.181: DEBUG/AndroidRuntime(6219): --- registering native functions ---
07-01 11:15:52.298: DEBUG/ddm-heap(6219): Got feature list request
07-01 11:15:52.790: DEBUG/PackageParser(1468): Scanning package: /data/app/vmdl59780.tmp
07-01 11:15:52.869: INFO/PackageManager(1468): Removing non-system package:test.main
07-01 11:15:52.869: DEBUG/PackageManager(1468): Removing package test.main
07-01 11:15:52.869: DEBUG/PackageManager(1468):   Activities: test.main.Main
07-01 11:15:53.025: DEBUG/PackageManager(1468): Scanning package test.main
07-01 11:15:53.025: INFO/PackageManager(1468): /data/app/vmdl59780.tmp changed; unpacking
07-01 11:15:53.033: DEBUG/installd(1208): DexInv: --- BEGIN '/data/app/vmdl59780.tmp' ---
07-01 11:15:53.056: DEBUG/dalvikvm(6225): creating instr width table
07-01 11:15:53.095: DEBUG/dalvikvm(6225): DexOpt: load 19ms, verify 10ms, opt 0ms
07-01 11:15:53.126: DEBUG/installd(1208): DexInv: --- END '/data/app/vmdl59780.tmp' (success) ---
07-01 11:15:53.126: DEBUG/ActivityManager(1468): Uninstalling process test.main
07-01 11:15:53.134: DEBUG/PackageManager(1468):   Activities: test.main.Main
07-01 11:15:53.283: INFO/installd(1208): move /data/dalvik-cache/data@app@vmdl59780.tmp@classes.dex -> /data/dalvik-cache/data@app@test.main.apk@classes.dex
07-01 11:15:53.290: DEBUG/PackageManager(1468): New package installed in /data/app/test.main.apk
07-01 11:15:53.462: DEBUG/AndroidRuntime(6219): Shutting down VM
07-01 11:15:53.462: DEBUG/dalvikvm(6219): DestroyJavaVM waiting for non-daemon threads to exit
07-01 11:15:53.462: DEBUG/dalvikvm(6219): DestroyJavaVM shutting VM down
07-01 11:15:53.462: DEBUG/dalvikvm(6219): HeapWorker thread shutting down
07-01 11:15:53.462: DEBUG/dalvikvm(6219): HeapWorker thread has shut down
07-01 11:15:53.462: DEBUG/jdwp(6219): JDWP shutting down net...
07-01 11:15:53.462: DEBUG/jdwp(6219): Got wake-up signal, bailing out of select
07-01 11:15:53.462: INFO/dalvikvm(6219): Debugger has detached; object registry had 1 entries
07-01 11:15:53.462: DEBUG/dalvikvm(6219): VM cleaning up
07-01 11:15:53.494: DEBUG/ActivityManager(1468): Uninstalling process test.main
07-01 11:15:53.501: ERROR/AndroidRuntime(6219): ERROR: thread attach failed
07-01 11:15:53.564: DEBUG/dalvikvm(6219): LinearAlloc 0x0 used 624108 of 5242880 (11%)
07-01 11:15:53.767: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f050000
07-01 11:15:53.767: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020005
07-01 11:15:53.775: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020004
07-01 11:15:53.775: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f0700ea
07-01 11:15:53.783: DEBUG/HomeLoaders(1409): application intent received: android.intent.action.PACKAGE_REMOVED, replacing=true
07-01 11:15:53.783: DEBUG/HomeLoaders(1409):   --> package:test.main
07-01 11:15:53.790: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020033
07-01 11:15:53.790: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020032
07-01 11:15:53.790: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f050000
07-01 11:15:53.814: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f070001
07-01 11:15:53.900: DEBUG/HomeLoaders(1409): application intent received: android.intent.action.PACKAGE_ADDED, replacing=true
07-01 11:15:53.900: DEBUG/HomeLoaders(1409):   --> package:test.main
07-01 11:15:53.900: DEBUG/HomeLoaders(1409):   --> update package test.main
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f050000
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020005
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020004
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f0700ea
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020033
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f020032
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f050000
07-01 11:15:53.923: WARN/ResourceType(1468): Resources don't contain package for resource number 0x7f070001
07-01 11:15:54.095: INFO/ActivityManager(1468): Start proc com.google.android.apps.maps:FriendService for broadcast com.google.android.apps.maps/com.google.googlenav.friend.android.ServiceReceiver: pid=6231 uid=10005 gids={3003, 1015}
07-01 11:15:54.244: DEBUG/AndroidRuntime(6230): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
07-01 11:15:54.259: INFO/dalvikvm(6231): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=38)
07-01 11:15:54.275: DEBUG/AndroidRuntime(6230): CheckJNI is OFF
07-01 11:15:54.275: INFO/AndroidRuntime(6230): JNI options: '-Xjniopts:warnonly'
07-01 11:15:54.275: DEBUG/dalvikvm(6230): Precise GC configured ON
07-01 11:15:54.275: DEBUG/dalvikvm(6230): creating instr width table
07-01 11:15:54.400: DEBUG/dalvikvm(1468): GC freed 11867 objects / 694864 bytes in 306ms
07-01 11:15:54.447: DEBUG/AndroidRuntime(6230): --- registering native functions ---
07-01 11:15:54.665: DEBUG/ddm-heap(6230): Got feature list request
07-01 11:15:54.712: DEBUG/dalvikvm(1468): GC freed 1254 objects / 57248 bytes in 300ms
07-01 11:15:54.728: INFO/dalvikvm(6231): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=88)
07-01 11:15:54.923: INFO/ActivityManager(1468): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=test.main/.Main }
07-01 11:15:54.955: INFO/ActivityManager(1468): Start proc test.main for activity test.main/.Main: pid=6241 uid=10075 gids={}
07-01 11:15:54.962: DEBUG/AndroidRuntime(6230): Shutting down VM
07-01 11:15:54.962: DEBUG/dalvikvm(6230): DestroyJavaVM waiting for non-daemon threads to exit
07-01 11:15:54.962: DEBUG/dalvikvm(6230): DestroyJavaVM shutting VM down
07-01 11:15:54.970: DEBUG/dalvikvm(6230): HeapWorker thread shutting down
07-01 11:15:54.970: DEBUG/dalvikvm(6230): HeapWorker thread has shut down
07-01 11:15:54.970: DEBUG/jdwp(6230): JDWP shutting down net...
07-01 11:15:54.970: INFO/dalvikvm(6230): Debugger has detached; object registry had 1 entries
07-01 11:15:54.970: DEBUG/dalvikvm(6230): VM cleaning up
07-01 11:15:54.994: ERROR/AndroidRuntime(6230): ERROR: thread attach failed
07-01 11:15:55.072: INFO/dalvikvm(6241): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=38)
07-01 11:15:55.087: INFO/WindowManager(1468): Setting rotation to 1, animFlags=0
07-01 11:15:55.111: WARN/SurfaceFlinger(1468): timeout expired mFreezeDisplay=1, mFreezeCount=0
07-01 11:15:55.165: INFO/ActivityManager(1468): Config changed: { scale=1.0 imsi=450/5 loc=ko_KR touch=3 keys=1/1/2 nav=1/2 orien=2 layout=34}
07-01 11:15:55.189: DEBUG/PhoneApp(1555): updateProximitySensorMode: state = IDLE
07-01 11:15:55.197: DEBUG/PhoneApp(1555): updateProximitySensorMode: lock already released.
07-01 11:15:55.337: DEBUG/dalvikvm(6230): LinearAlloc 0x0 used 639692 of 5242880 (12%)
07-01 11:15:55.572: INFO/dalvikvm(6241): Debugger thread not active, ignoring DDM send (t=0x41504e4d l=22)
07-01 11:15:55.861: DEBUG/dalvikvm(6241): GC freed 626 objects / 49920 bytes in 58ms
07-01 11:15:56.040: DEBUG/dalvikvm(6241): GC freed 60 objects / 2488 bytes in 43ms
07-01 11:15:56.126: DEBUG/dalvikvm(6241): GC freed 126 objects / 5816 bytes in 42ms
07-01 11:15:56.470: DEBUG/dalvikvm(6241): GC freed 88 objects / 3984 bytes in 47ms
07-01 11:15:56.767: INFO/ActivityManager(1468): Displayed activity test.main/.Main: 1814 ms (total 1814 ms)
07-01 11:15:59.017: DEBUG/dalvikvm(1468): GC freed 2361 objects / 120352 bytes in 252ms
07-01 11:16:00.103: DEBUG/AnalogClock(1409): BroadcastReceiver() act = android.intent.action.TIME_TICK
07-01 11:16:03.689: DEBUG/my(6241): before send message!!
07-01 11:16:03.689: DEBUG/AndroidRuntime(6241): Shutting down VM
07-01 11:16:03.689: WARN/dalvikvm(6241): threadid=3: thread exiting with uncaught exception (group=0x4001d1c8)
07-01 11:16:03.689: ERROR/AndroidRuntime(6241): Uncaught handler: thread main exiting due to uncaught exception
07-01 11:16:03.705: ERROR/AndroidRuntime(6241): java.lang.NullPointerException
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at test.view.LogoView.onTouchEvent(LogoView.java:150)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.view.View.dispatchTouchEvent(View.java:3715)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:821)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:821)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:821)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1700)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1111)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1684)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1701)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.os.Looper.loop(Looper.java:123)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at android.app.ActivityThread.main(ActivityThread.java:4364)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at java.lang.reflect.Method.invokeNative(Native Method)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at java.lang.reflect.Method.invoke(Method.java:521)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-01 11:16:03.705: ERROR/AndroidRuntime(6241):     at dalvik.system.NativeStart.main(Native Method)
07-01 11:16:03.736: INFO/Process(1468): Sending signal. PID: 6241 SIG: 3
07-01 11:16:03.744: INFO/dalvikvm(6241): threadid=7: reacting to signal 3
07-01 11:16:03.744: INFO/dalvikvm(6241): Wrote stack trace to '/data/anr/traces.txt'
07-01 11:16:03.798: WARN/WindowManager(1468): No window to dispatch pointer action 1
07-01 11:16:05.314: DEBUG/dalvikvm(1409): GC freed 15360 objects / 723568 bytes in 160ms
07-01 11:16:05.923: INFO/Process(6241): Sending signal. PID: 6241 SIG: 9
07-01 11:16:05.958: ERROR/JavaBinder(1468): !!! FAILED BINDER TRANSACTION !!!
07-01 11:16:05.962: INFO/WindowManager(1468): WIN DEATH: Window{454dd2f8 test.main/test.main.Main paused=false}
07-01 11:16:05.962: INFO/ActivityManager(1468): Process test.main (pid 6241) has died.
07-01 11:16:05.978: INFO/WindowManager(1468): WIN DEATH: Window{4560d4c0 SurfaceView paused=false}
07-01 11:16:06.072: INFO/WindowManager(1468): Setting rotation to 0, animFlags=0
07-01 11:16:06.165: INFO/ActivityManager(1468): Config changed: { scale=1.0 imsi=450/5 loc=ko_KR touch=3 keys=1/1/2 nav=1/2 orien=1 layout=34}
07-01 11:16:06.189: DEBUG/PhoneApp(1555): updateProximitySensorMode: state = IDLE
07-01 11:16:06.197: DEBUG/PhoneApp(1555): updateProximitySensorMode: lock already released.
07-01 11:16:06.236: INFO/UsageStats(1468): Unexpected resume of com.motorola.launcher while already resumed in test.main
07-01 11:16:06.408: WARN/InputManagerService(1468): Got RemoteException sending setActive(false) notification to pid 6241 uid 10075
07-01 11:16:08.494: DEBUG/dalvikvm(1468): GC freed 3080 objects / 149640 bytes in 169ms
07-01 11:16:08.494: DEBUG/StatusBarPolicy(1468): Real asu level=17 / icon Level=6
07-01 11:16:13.673: DEBUG/dalvikvm(4911): GC freed 271 objects / 9336 bytes in 160ms
07-01 11:16:18.572: DEBUG/dalvikvm(4650): GC freed 123 objects / 4512 bytes in 75ms
07-01 11:16:23.572: DEBUG/dalvikvm(6014): GC freed 93 objects / 3800 bytes in 67ms
07-01 11:16:39.548: DEBUG/StatusBarPolicy(1468): Real asu level=15 / icon Level=6
07-01 11:16:39.746: INFO/wpa_supplicant(21549): Authentication with 00:00:00:00:00:00 timed out.
07-01 11:16:39.746: INFO/wpa_supplicant(21549): CTRL-EVENT-STATE-CHANGE id=2 state=0
07-01 11:16:39.746: INFO/wpa_supplicant(21549): CTRL-EVENT-STATE-CHANGE id=-1 state=2
07-01 11:16:39.746: INFO/wpa_supplicant(21549): Trying to associate with SSID 'COSY-BR674WL(K)'
07-01 11:16:39.746: INFO/wpa_supplicant(21549): CTRL-EVENT-STATE-CHANGE id=-1 state=3
07-01 11:16:39.751: VERBOSE/WifiMonitor(1468): Event [Authentication with 00:00:00:00:00:00 timed out.]
07-01 11:16:39.751: VERBOSE/WifiMonitor(1468): Event [CTRL-EVENT-STATE-CHANGE id=2 state=0]
07-01 11:16:39.751: VERBOSE/WifiStateTracker(1468): Changing supplicant state: ASSOCIATING ==> DISCONNECTED
07-01 11:16:39.759: VERBOSE/WifiMonitor(1468): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2]
07-01 11:16:39.759: VERBOSE/WifiStateTracker(1468): Changing supplicant state: DISCONNECTED ==> SCANNING
07-01 11:16:39.775: VERBOSE/WifiMonitor(1468): Event [Trying to associate with SSID 'COSY-BR674WL(K)']
07-01 11:16:39.775: VERBOSE/WifiMonitor(1468): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=3]
07-01 11:16:39.775: VERBOSE/WifiStateTracker(1468): Changing supplicant state: SCANNING ==> ASSOCIATING
07-01 11:16:44.759: DEBUG/WifiStateTracker(1468): Deconfiguring interface and stopping DHCP
07-01 11:16:45.770: DEBUG/NetworkStateTracker(1468): setDetailed state, old =DISCONNECTED and new state=DISCONNECTED