jelly bean app gets killed on a phone call - android

Our app is crashing on jelly bean phones (not all of them) and we are completely clueless. It can be repeated by taking a phone call, there is nothing (no exception or jni crash within our code) in logcat just:
03-07 13:07:33.506: I/WindowState(1660): WIN DEATH: Window{4115b0c0 com.mapfactor.navigator/com.mapfactor.navigator.map.MapActivity paused=false}
03-07 13:07:33.506: W/InputDispatcher(1660): channel '4115b0c0 com.mapfactor.navigator/com.mapfactor.navigator.map.MapActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
03-07 13:07:33.506: I/ActivityManager(1660): Process com.mapfactor.navigator (pid 3248) has died.
03-07 13:07:33.506: E/InputDispatcher(1660): channel '4115b0c0 com.mapfactor.navigator/com.mapfactor.navigator.map.MapActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
03-07 13:07:33.506: W/InputDispatcher(1660): Attempted to unregister already unregistered input channel '4115b0c0 com.mapfactor.navigator/com.mapfactor.navigator.map.MapActivity (server)'
03-07 13:07:33.506: W/WindowManager(1660): Force-removing child win Window{40f34610 SurfaceView paused=false} from container Window{4115b0c0 com.mapfactor.navigator/com.mapfactor.navigator.map.MapActivity paused=false}
03-07 13:07:33.506: I/LocationManagerService(1660): remove gps (pid 1660), disabled
03-07 13:07:33.506: I/LocationManagerService(1660): remove network (pid 1660), next minTime = 86400000
03-07 13:07:33.506: W/GpsLocationProvider(1660): Unneeded remove listener for uid 1000
...
03-07 13:07:33.506: W/WindowManager(1660): Failed looking up window
03-07 13:07:33.506: W/WindowManager(1660): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy#40e2e780 does not exist
03-07 13:07:33.506: W/WindowManager(1660): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7675)
03-07 13:07:33.506: W/WindowManager(1660): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7666)
03-07 13:07:33.506: W/WindowManager(1660): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:854)
03-07 13:07:33.506: W/WindowManager(1660): at android.os.BinderProxy.sendDeathNotice(Binder.java:449)
03-07 13:07:33.506: W/WindowManager(1660): at dalvik.system.NativeStart.run(Native Method)
03-07 13:07:33.506: I/WindowState(1660): WIN DEATH: null
03-07 13:07:33.506: I/WindowManager(1660): WINDOW DIED Window{4115b0c0 com.mapfactor.navigator/com.mapfactor.navigator.map.MapActivity paused=false}

Just an idea: Have you disabled "Don't keep activities", "Destroy every activity as soon as the user leaves it" in your Settings > Developer Options screen?

OutOfMemory
Possible, but not likely looking at your logcat.
Just throwing this suggestion in the air: Based on the first line, are you not stopping consuming expensive resources like GPS? Are you doing something weird with your pause code?
IOError
So seems like an IOError (unsure why IOException wasn't raised instead) based on line 2 and line 5 here.

Related

IntentService scheduled by AlarmManager sometimes die

I have an app that every minute launches an IntentService that gets the UsageStats and UsageEvents on this period.
I used setExact() method of AlarmManager to set the moment that the IntentService is executed and on the onCreate method of the IntentService i call again to setExact() to schedule the execution of the IntentService the next minute. I did this because the method setRepeating() of AlarmManager didn't perform with accuracy on one minute periods. The code i use is:
alarmM.setExact(AlarmManager.ELAPSED_REALTIME,SystemClock.elapsedRealtime()+60000,alarmAppIntent);
This performs correctly most of times and when the device is charging. However, when the device is in normal use sometimes the service stops repeating every minute (i create a notification everytime the service executes to see if the service continues executing) and when the IntentService stops repeating Logcat says:
03-02 12:16:02.221 1173 12379 I ActivityManager: Process com.app.usage (pid 6390) has died
03-02 12:16:02.222 1173 1423 D DisplayManagerService: Display listener for pid 6390 died.
03-02 12:16:02.222 1173 12379 D ActivityManager: SVC-handleAppDiedLocked: app = ProcessRecord{73a4530 6390:com.app.usage/u0a251}, app.pid = 6390
03-02 12:16:02.222 1173 12379 D ActivityManager: cleanUpApplicationRecord -- 6390
03-02 12:16:02.222 1173 12379 D ActivityManager: SVC-mBroadcastQueues: com.android.server.am.BroadcastQueue#e800e85
03-02 12:16:02.222 1173 12379 D ActivityManager: SVC-mBroadcastQueues: com.android.server.am.BroadcastQueue#d0e4da
03-02 12:16:02.223 2049 2306 E WtProcessController: Error pid or pid not exist
03-02 12:16:02.315 1173 1378 D PerfServiceManager: [PerfService] MESSAGE_USER_DISABLE: 92
03-02 12:16:02.315 1173 1378 I libPerfService: [perfScnDisable] scenario:92
03-02 12:16:02.315 1173 1378 I libPerfService: 92: set max: -1, 0, -1,
03-02 12:16:02.316 1173 1378 I libPerfService: 92: set freq: -1, -1, 933000,
03-02 12:16:02.316 1173 1378 I libPerfService: 92: set gpu level: 0
03-02 12:16:02.447 3149 3166 I PerfService: PerfServiceNative_userEnableTimeoutMs:30, 1050
03-02 12:16:02.448 3149 3166 I PerfService: PerfServiceNative_notifyDisplayType:2
The device i am using is a Xiaomi Redmi Note 4 Pro with MIUI 9.2 (Android 6.0). I've tried to set no battery economizer to the app but the problem continues.
Is there some way to stop the app dying using other libraries or configuration?

Consumer closed input channel or an error occurred. events=0x8

01-03 11:28:47.499: ERROR/InputDispatcher(164): channel '4085fe50 com.bce.tip/com.bce.tip.core.MenuActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
01-03 11:28:47.499: ERROR/InputDispatcher(164): channel '4085fe50 com.bce.tip/com.bce.tip.core.MenuActivity (server)' ~ Channel is unrecoverably broken and will be disposed!`
When I click on Imageview action calling but I am calling this onclick to another layer class
It was happening with me at some minutes ago and I found the reason!
This was the code that was causing it:
Canvas pattern = new Canvas();
Bitmap bitmapPattern = Bitmap.createBitmap(pattern.getWidth(),canvas.getHeight(),Bitmap.Config.ARGB_8888);
pattern.setBitmap(bitmapPattern);
pattern.drawLine(0, 0, 1, 1, paintStroke);
paintFill.setShader(new BitmapShader(bitmapPattern, TileMode.REPEAT, TileMode.REPEAT));
and the reason is: "pattern.getWidth(),canvas.getHeight()", those parameters may be infinite, I didn't define nothing on canvas yet! CHanging it to numbers I get free from that error!
Resolved :
1) Basically this Errors occurs couple of times
if your running number of process at a time in single thread .
This is like a Deadlock situation.So any Scheduled tasks are there make it Synchronized particular burden objects.
2) Kill the unused processes at the time of Burden happens on MainThread.

Android Testing - App works on one phone, but crashes on others

I created an app and it worked just fine on my phone, so I put it up on the market. My friend tried downloading it first, and it does not work on her phone. After the Splash Screen, it force closes.
I don't understand why this is happening. I was under the impression that the market only allowed users with the correct devices to download the app, so figured this wouldn't be an issue.
Has anyone had this happen? Also is there any way for me to test my app on all different phones to ensure that it will not crash again before re-posting it on the market?
**UPDATE - i had her run aLogCat and here is the result. It was too many characters, so I copied from the first E/
E/CameraService( 166): Invalid Burst Count setting burst count to 1
V/CameraHal( 166): camera_set_parameters
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:311 setParameters - White balance set auto
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:321 setParameters - Antibanding set auto
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:337 setParameters - Exposure compensation set 0
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:343 setParameters - Scene mode set auto
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:363 setParameters - Flash mode set on
D/CameraHalM( 166): Current battery Level, 3425000 uv
D/CameraHalM( 166): flashIntensity = 50
E/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:374 setParameters - Setting KEY_MOT_LEDFLASH--50
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:384 setParameters - Effect set none
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:402 setParameters - Jpeg quality set 90
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:409 setParameters - Thumbnail width set 160
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:416 setParameters - Thumbnail width set 120
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:423 setParameters - Thumbnail quality set 60
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:470 setParameters - Zoom set 0
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:483 setParameters - Auto Exposure Lock set false
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:492 setParameters - Auto WhiteBalance Lock set false
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:507 setParameters - Focus mode set auto
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHalM.cpp:124 setMotParameters - Checking Image Stabilization param, off
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHalM.cpp:144 setMotParameters - Disabling Image Stabilization capturing
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHalM.cpp:189 setMotParameters - Led Torch : 0
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHalM.cpp:289 setMotTcmdParametersIfNeeded - Checking Mot Test Mode param, off
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHalM.cpp:300 setMotTcmdParametersIfNeeded - Disabling Test Mode
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:566 setParameters - PreviewFormat set yuv420sp
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:578 setParameters - VNF true
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:596 setParameters - VSTAB false
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:617 setParameters - IPP mode set ldc-nsf
D/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:652 setParameters - Sensor Orientation is set to 0
E/CameraHal( 166): (12785a0) hardware/ti/omap4xxx/camera/CameraHal.cpp:662 setParameters - Invalid preview resolution 960 x 540
V/MotDrmPlugIn( 165): MotDrmPlugIn::onInitialize : 6579
D/MotDrmPlugIn( 165): MotDrmPlugIn::onSetOnInfoListener : 6579
D/MotDrmPlugIn( 165): MotDrmPlugIn::onOpenDecryptSession by fd : 11
D/ ( 165): filename = /system/media/audio/ui/camera_click.ogg
V/MotDrmPlugIn( 165): MotDrmPlugIn::onTerminate : 6579
V/MotDrmPlugIn( 165): MotDrmPlugIn::onInitialize : 6579
D/MotDrmPlugIn( 165): MotDrmPlugIn::onSetOnInfoListener : 6579
D/MotDrmPlugIn( 165): MotDrmPlugIn::onOpenDecryptSession by fd : 11
D/ ( 165): filename = /system/media/audio/ui/multishot_click.ogg
D/AndroidRuntime( 4594): Shutting down VM
W/dalvikvm( 4594): threadid=1: thread exiting with uncaught exception (group=0x40ac7210)
V/MotDrmPlugIn( 165): MotDrmPlugIn::onTerminate : 6579
V/MotDrmPlugIn( 165): MotDrmPlugIn::onInitialize : 6579
D/MotDrmPlugIn( 165): MotDrmPlugIn::onSetOnInfoListener : 6579
D/MotDrmPlugIn( 165): MotDrmPlugIn::onOpenDecryptSession by fd : 11
D/ ( 165): filename = /system/media/audio/ui/VideoRecord.ogg
I/OMXCodec( 166): isAudio=1, mMIME=audio/vorbis
V/MotDrmPlugIn( 165): MotDrmPlugIn::onTerminate : 6579
E/AndroidRuntime( 4594): FATAL EXCEPTION: main
E/AndroidRuntime( 4594): java.lang.RuntimeException: setParameters failed
E/AndroidRuntime( 4594): at android.hardware.Camera.native_setParameters(Native Method)
E/AndroidRuntime( 4594): at android.hardware.Camera.setParameters(Camera.java:1414)
E/AndroidRuntime( 4594): at sillyfidget.com.shakeitpolaroid.ShakeItLikeAPolaroidActivity.surfaceChanged(ShakeItLikeAPolaroidActivity.java:425)
E/AndroidRuntime( 4594): at android.view.SurfaceView.updateWindow(SurfaceView.java:544)
E/AndroidRuntime( 4594): at android.view.SurfaceView.access$000(SurfaceView.java:81)
E/AndroidRuntime( 4594): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:169)
E/AndroidRuntime( 4594): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:590)
E/AndroidRuntime( 4594): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1662)
E/AndroidRuntime( 4594): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2558)
E/AndroidRuntime( 4594): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 4594): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4594): at android.app.ActivityThread.main(ActivityThread.java:4697)
E/AndroidRuntime( 4594): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4594): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4594): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
E/AndroidRuntime( 4594): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
E/AndroidRuntime( 4594): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 375): Force finishing activity sillyfidget.com.shakeitpolaroid/.ShakeItLikeAPolaroidActivity
I/OMXCodec( 166): isAudio=1, mMIME=audio/vorbis
I/OMXCodec( 166): isAudio=1, mMIME=audio/vorbis
I/AudioPlayer( 166): read from audio source returned: -1011
I/AudioPlayer( 166): read from audio source returned: -1011
I/AudioPlayer( 166): read from audio source returned: -1011
W/ApplicationContext( 375): Unable to create files directory files
D/ExtDispService( 667): onRotationChanged - rotation = 0
D/ExtDispService( 667): onRotationChanged! - PORTRAIT!!!
D/IExtDispIpcCB( 163): BnExtDispIpcCB NOTIFYCB: type:101; ext1:1; ext2:0;
D/HWC_HDMI_MOT( 163): IpcCB notifyCallback: type:101; ext1:1; ext2:0;
D/HWC_HDMI_MOT( 163): IpcCB notifyCallback: UI Orientation state change - rotation = 0
D/ti_hwc ( 163): hdmi_callback: UI Rotation = 0
I/InputReader( 375): Reconfiguring input devices. changes=0x00000004
I/InputReader( 375): Device reconfigured: id=2, name='atmxt-i2c', surface size is now 540x960, mode is 1
I/ActivityManager( 375): Config changed: {1.0 311mcc480mnc en_US layoutdir=0 sw360dp w360dp h614dp nrml long port finger -keyb/v/h -nav/h s.6}
D/Swype ( 703): checkEditorShowsCompletions(): shows: false
I/PortalService( 817): onConfigurationChanged
D/OpenGLRenderer( 498): Flushing caches (mode 0)
V/RecentsPanelView( 498): onVisibilityChanged(com.android.systemui.recent.RecentsPanelView#41c57358, 8)
I/SystemUIService( 498): onConfigurationChanged reached.
I/SystemUIService( 498): isLayoutXLarge = false
D/EvbridgeService( 817): handleIntent() android.intent.action.CONFIGURATION_CHANGED handled by com.android.portal.EvbridgeService#413f4738
D/RecentsPanelView( 498): panelHeight=0
D/StatusBar.NetworkController( 498): Intent.ACTION_CONFIGURATION_CHANGED Received
D/ConnectivityService( 375): getMobileDataEnabled returning true
D/ConnectivityService( 375): getMobileDataEnabled returning true
D/OpenGLRenderer( 874): Flushing caches (mode 0)
D/OpenGLRenderer( 874): Flushing caches (mode 1)
D/Launcher.Model( 874): onReceive intent=Intent { act=android.intent.action.CONFIGURATION_CHANGED flg=0x60000010 }
W/ActivityManager( 375): Activity pause timeout for ActivityRecord{414bfdd8 sillyfidget.com.shakeitpolaroid/.ShakeItLikeAPolaroidActivity}
D/Launcher.Model( 874): onReceive intent=Intent { act=android.intent.action.CONFIGURATION_CHANGED flg=0x60000010 }
W/InputManagerService( 375): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41af34d0
W/Launcher( 874): localizable app group not found: Verizon Wireless
W/Launcher( 874): localizable app group not found: Verizon Wireless
W/Launcher( 874): localizable app group not found: Verizon Wireless
W/Launcher( 874): localizable app group not found: Verizon Wireless
I/ActivityManager( 375): No longer want com.google.android.talk (pid 4266): hidden #21
I/AlarmManager( 375): sending alarm Alarm{41ae30a0 type 2 com.android.phone}, PendingIntent{41b402e8: PendingIntentRecord{41d51cb8 com.android.phone broadcastIntent}}
V/AlarmManager( 375): sending alarm OnFinished PendingIntent{41b402e8: PendingIntentRecord{41d51cb8 com.android.phone broadcastIntent}}
D/AudioHardwareMot( 166): AudioStreamOutMot::standby called for 0x129c140
D/AudioHardwareMot( 166): Changed Min CPU Frequency to 300000 KHz
D/AudioHardwareMot( 166): Output 0x129c140 standby complete
D/dalvikvm( 375): GC_EXPLICIT freed 445K, 33% free 17236K/25635K, paused 9ms+7ms
I/Process ( 4594): Sending signal. PID: 4594 SIG: 9
W/InputManagerService( 375): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#420a4e80
W/InputDispatcher( 375): channel '420f92e8 sillyfidget.com.shakeitpolaroid/sillyfidget.com.shakeitpolaroid.ShakeItLikeAPolaroidActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
E/InputDispatcher( 375): channel '420f92e8 sillyfidget.com.shakeitpolaroid/sillyfidget.com.shakeitpolaroid.ShakeItLikeAPolaroidActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher( 375): Attempted to unregister already unregistered input channel '420f92e8 sillyfidget.com.shakeitpolaroid/sillyfidget.com.shakeitpolaroid.ShakeItLikeAPolaroidActivity (server)'
W/AudioFlinger( 166): session id 16 not found for pid 166
I/ActivityManager( 375): Process sillyfidget.com.shakeitpolaroid (pid 4594) has died.
I/WindowManager( 375): WIN DEATH: Window{419c0168 sillyfidget.com.shakeitpolaroid/sillyfidget.com.shakeitpolaroid.SplashScreen paused=false}
I/WindowManager( 375): WIN DEATH: Window{420f92e8 sillyfidget.com.shakeitpolaroid/sillyfidget.com.shakeitpolaroid.ShakeItLikeAPolaroidActivity paused=false}
W/WindowManager( 375): Force-removing child win Window{417dc440 SurfaceView paused=false} from container Window{420f92e8 sillyfidget.com.shakeitpolaroid/sillyfidget.com.shakeitpolaroid.ShakeItLikeAPolaroidActivity paused=false}
V/CameraHal( 166): camera_disable_msg_type
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/CameraHal.cpp:225 disableMsgType - Disabling Preview Callback
V/CameraHal( 166): camera_stop_preview
V/CameraHal( 166): camera_cancel_picture
E/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/BaseCameraAdapter.cpp:1791 setState - Adapter state switch INTIALIZED_STATE Invalid Op! event = 0x5
V/CameraHal( 166): camera_release
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/SensorListener.cpp:223 disableSensor - orientation = 0x12e1518 (LIS3DH 3-axis Accelerometer)
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/SensorListener.cpp:108 ~SensorListener - Kill looper thread
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/SensorListener.cpp:120 ~SensorListener - Kill looper
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/SensorListener.cpp:126 ~SensorListener - SensorListener destroyed
I/CameraService( 166): Destroying camera 0
V/CameraHal( 166): camera_device_close
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp:1797 stop - --> AppCallbackNotifier NOTIFIER_STOPPED
D/CameraHal( 166): (12e35b8) hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp:287 notificationThread - Notification Thread received message from Camera HAL
D/CameraHal( 166): (12e35b8) hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp:1236 processMessage - +Msg get...
D/CameraHal( 166): (12e35b8) hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp:1238 processMessage - -Msg get...
I/CameraHal( 166): Received NOTIFIER_EXIT command from Camera HAL
D/CameraHal( 166): (12e35b8) hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp:290 notificationThread - Notification Thread exiting.
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp:1301 ~AppCallbackNotifier - Stopping Event Provider
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp:1309 ~AppCallbackNotifier - Stopping Frame Provider
D/CameraHal( 166): (12ca020) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:1389 switchToLoaded - Already in OMX_Loaded state or OMX_StateInvalid state
W/WindowManager( 375): Failed looking up window
W/WindowManager( 375): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy#41af7900 does not exist
W/WindowManager( 375): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7606)
W/WindowManager( 375): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7597)
W/WindowManager( 375): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1579)
W/WindowManager( 375): at android.os.BinderProxy.sendDeathNotice(Binder.java:433)
W/WindowManager( 375): at dalvik.system.NativeStart.run(Native Method)
I/WindowManager( 375): WIN DEATH: null
I/WindowManager( 375): WINDOW DIED Window{420f92e8 sillyfidget.com.shakeitpolaroid/sillyfidget.com.shakeitpolaroid.ShakeItLikeAPolaroidActivity paused=false}
D/CameraHal( 166): (12d76d0) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:3571 Handler - msg.command = -1
D/CameraHal( 166): (12d76d0) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:3585 Handler - Exiting command handler
D/CameraHal( 166): (12d2c40) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:3628 Handler - Exiting OMX callback handler
I/AlarmManager( 375): sending alarm Alarm{41b2e7d8 type 3 android}, PendingIntent{42116fc0: PendingIntentRecord{421063c0 android broadcastIntent}}
V/AlarmManager( 375): sending alarm OnFinished PendingIntent{42116fc0: PendingIntentRecord{421063c0 android broadcastIntent}}
D/PortalService( 817): Portal onReceive:
I/PortalService( 817): onHandleIntent() action android.intent.action.CLOSE_SYSTEM_DIALOGS
I/ActivityManager( 375): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.motorola.blur.home/.Launcher} from pid 375
I/ActivityManager( 375): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=org.jtb.alogcat cmp=org.jtb.alogcat/.LogActivity bnds=[8,65][137,245]} from pid 874
D/OpenGLRenderer( 874): Flushing caches (mode 1)
D/Swype ( 703): checkEditorShowsCompletions(): shows: false
I/ActivityManager( 375): Resumed Activity: org.jtb.alogcat/.LogActivity totalTime: 91 ms
W/IInputConnectionWrapper( 874): showStatusIcon on inactive InputConnection
D/OpenGLRenderer( 874): Flushing caches (mode 0)
D/dalvikvm( 4564): GC_CONCURRENT freed 666K, 5% free 11986K/12579K, paused 1ms+17ms
D/Swype ( 703): checkEditorShowsCompletions(): shows: false
W/ActivityManager( 375): Activity destroy timeout for ActivityRecord{414930d8 sillyfidget.com.shakeitpolaroid/.SplashScreen}
W/ActivityManager( 375): Activity destroy timeout for ActivityRecord{414bfdd8 sillyfidget.com.shakeitpolaroid/.ShakeItLikeAPolaroidActivity}
The problem is that you're passing invalid parameters in Camera.setParameters, not all cameras support the same features so you should be querying the camera for it's capabilities before calling that method. However if I were you I'd maybe start a bit smaller because it appears that you are a little over your head here. At the very least you should know how to recognize relevant log info and debug basic problems like this.
FYI: http://developer.android.com/reference/android/hardware/Camera.Parameters.html
May be your friend mobile android level is different with your mobile android level.
Some times the app does not work in all Android phones. If you want to check it you must follow these steps
1) Change your app target in manifest as minsdkversion 8 and target sdk version 15.
2) test your app in all emulators.
3) test each module (working of each activity) in all emulators.
You will definitely find some errors if you do like this. Good luck

Handing multiple scenes in andengine is cause "Consumer closed input channel" exception

I am doing a simple POC of andengine Scene handling. I have written a simple code, that adds and remove a scene to parent scene as a child.
After doing several time this action, game crashes with following logs.
ANy information or details about these logs and its reasons would be of great help.
04-18 23:43:12.410: D/AndEngine(9346): SpeedyMindActivity.onSurfaceChanged(Width=800, Height=480) #(Thread: 'GLThread 8919')
04-18 23:45:04.824: W/InputDispatcher(136): channel '418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
04-18 23:45:04.824: E/InputDispatcher(136): channel '418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
04-18 23:45:04.840: I/WindowManager(136): WIN DEATH: Window{418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity paused=false}
04-18 23:45:04.929: W/ActivityManager(136): Force removing ActivityRecord{418f6170 com.aqif.speedyMind.activity/.SpeedyMindActivity}: app died, no saved state
04-18 23:45:04.972: W/InputDispatcher(136): Attempted to unregister already unregistered input channel '418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity (server)'
04-18 23:45:05.031: W/WindowManager(136): Force-removing child win Window{41951328 SurfaceView paused=false} from container Window{418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity paused=false}
04-18 23:45:05.203: I/WindowManager(136): WINDOW DIED Window{418640c8 com.aqif.speedyMind.activity/com.aqif.speedyMind.activity.SpeedyMindActivity paused=false}
regards,
Aqif Hamid
i didn't came up with a solution for this problem. But better approach is to cache your Scenes and replace your Scenes from your engine.

Cannot solve android.view.ViewRoot$CalledFromWrongThreadException. Help needed?

after searching i've found that some phones (like the Galaxy s) are affected by a strange bug or whatever that cause this error:
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:200)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
Caused by: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRoot.checkThread(ViewRoot.java:2934)
at android.view.ViewRoot.invalidateChild(ViewRoot.java:643)
at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:669)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:2511)
at android.view.View.invalidate(View.java:5279)
at android.webkit.WebView.selectionDone(WebView.java:4470)
at android.webkit.WebView.clearHelpers(WebView.java:1295)
at android.webkit.WebView.loadDataWithBaseURL(WebView.java:1714)
at c.a(Unknown Source)
at c.doInBackground(Unknown Source)
at android.os.AsyncTask$2.call(AsyncTask.java:185)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
... 4 more
android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRoot.checkThread(ViewRoot.java:2934)
at android.view.ViewRoot.invalidateChild(ViewRoot.java:643)
at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:669)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:2511)
at android.view.View.invalidate(View.java:5279)
at android.webkit.WebView.selectionDone(WebView.java:4470)
at android.webkit.WebView.clearHelpers(WebView.java:1295)
at android.webkit.WebView.loadDataWithBaseURL(WebView.java:1714)
at c.a(Unknown Source)
at c.doInBackground(Unknown Source)
at android.os.AsyncTask$2.call(AsyncTask.java:185)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
at java.lang.Thread.run(Thread.java:1019)
And this is the logcat if needed and from here it seems that is problem of the swipe function:
10-27 19:19:20.329 I/InputReader( 166): dispatchTouch::touch event's action is 1
10-27 19:19:20.329 I/InputDispatcher( 166): Delivering touch to current input target: action: 1, channel '4096f5c8 ***PACKEGE_NAME***/***PACKEGE_NAME***.Game (server)'
10-27 19:19:20.749 I/InputReader( 166): dispatchTouch::touch event's action is 0
10-27 19:19:20.749 I/InputDispatcher( 166): Delivering touch to current input target: action: 0, channel '4096f5c8 ***PACKEGE_NAME***/***PACKEGE_NAME***.Game (server)'
10-27 19:19:21.689 I/InputReader( 166): dispatchTouch::touch event's action is 1
10-27 19:19:21.689 I/InputDispatcher( 166): Delivering touch to current input target: action: 1, channel '4096f5c8 ***PACKEGE_NAME***/***PACKEGE_NAME***.Game (server)'
10-27 19:19:21.689 W/webview ( 1125): Miss a drag as we are waiting for WebCore's response for touch down.
10-27 19:19:21.989 I/InputReader( 166): dispatchTouch::touch event's action is 0
10-27 19:19:21.989 I/InputDispatcher( 166): Delivering touch to current input target: action: 0, channel '4096f5c8 ***PACKEGE_NAME***/***PACKEGE_NAME***.Game (server)'
10-27 19:19:22.159 I/Ads ( 1125): Refreshing ad.
10-27 19:19:22.169 I/webclipboard( 1125): clipservice: android.sec.clipboard.ClipboardExManager#4051cb08
10-27 19:19:22.259 I/Ads ( 1125): adRequestUrlHtml: <html><head><script src="http://www.gstatic.com/afma/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":15,"u_sd":1.0,"u_w":320,"slotname":"a14e098781b871d","msid":"***PACKEGE_NAME***","js":"afma-sdk-a-v4.0.4","isu":"F1B8EEEA64C5716BA996D22689C17557","format":"320x50_mb","net":"wi","app_name":"4.0.4.android.***PACKEGE_NAME***","hl":"pt","u_h":480,"u_so":"p","u_audio":1,"prl":792});</script></head><body></body></html>
10-27 19:19:22.449 I/InputReader( 166): dispatchTouch::touch event's action is 1
10-27 19:19:22.449 I/InputDispatcher( 166): Delivering touch to current input target: action: 1, channel '4096f5c8 ***PACKEGE_NAME***/***PACKEGE_NAME***.Game (server)'
10-27 19:19:22.449 W/webview ( 1125): Miss a drag as we are waiting for WebCore's response for touch down.
10-27 19:19:22.599 I/Ads ( 1125): Received ad url: <"url": "http://googleads.g.doubleclick.net:80/mads/gma?preqs=15&u_sd=1&u_w=320&slotname=a14e098781b871d&msid=***PACKEGE_NAME***&js=afma-sdk-a-v4.0.4&isu=F1B8EEEA64C5716BA996D22689C17557&format=320x50_mb&net=wi&app_name=4.0.4.android.***PACKEGE_NAME***&hl=pt&u_h=480&u_so=p&u_audio=1&prl=792&output=html&region=mobile_app&u_tz=240&ex=1&client_sdk=1&askip=0", "afmaNotifyDt": "null">
10-27 19:19:22.609 I/InputReader( 166): dispatchTouch::touch event's action is 0
10-27 19:19:22.609 I/InputDispatcher( 166): Delivering touch to current input target: action: 0, channel '4096f5c8 ***PACKEGE_NAME***/***PACKEGE_NAME***.Game (server)'
10-27 19:19:23.339 W/dalvikvm( 1125): threadid=11: thread exiting with uncaught exception (group=0x40018578)
10-27 19:19:23.339 E/ACRA ( 1125): ACRA caught a RuntimeException exception for ***PACKEGE_NAME***. Building report.
10-27 19:19:23.339 D/ACRA ( 1125): Retrieve application default SharedPreferences.
10-27 19:19:23.349 V/webview ( 1125): ZoomScale 3 mPreserveZoom: false
10-27 19:19:23.489 I/ACRA ( 1125): READ_LOGS granted! ACRA can include LogCat and DropBox data.
10-27 19:19:23.519 D/ACRA ( 1125): Retrieving logcat output...
The only thing that can cause this error is a Timer that i use in my application in the game Intent, i tried to set up a handler but i saw a lot of crash in my ACRA log.
This is the content of my intent, i hope that someone should help me :)
startB.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
startB.setEnabled(false);
partiColTempo(tempox);
}
});
}
private void displayText(final String text){
this.runOnUiThread(new Runnable(){
//#Override
public void run() {
tempo.setText(text);
if (text.equals("Finished")){
eseguiSuono();
assegnaPunti();
startB.setEnabled(true);
//elapsed=0;
tempo.setText("Waiting");
}
}});
}
private void partiColTempo(int tempox) {
TIMEOUT=tempox*1000;
Log.w("tempo timer", ""+tempox);
elapsed=INTERVAL;
TimerTask task=new TimerTask(){
#Override
public void run() {
elapsed+=INTERVAL;
if(elapsed>TIMEOUT){
this.cancel();
displayText("Finished");
return;
}
//if(some other conditions)
// this.cancel();
displayText(getString(R.string.tempo_rim)+" " + (TIMEOUT-elapsed) / 1000);
}
};
Timer timer = new Timer();
timer.scheduleAtFixedRate(task, INTERVAL, INTERVAL);
Is the problem there? Because i can't find other place when i call asynctask.
You are clearly doing something with UI (i.e. View-derived objects) from AsyncTask.doInBackground(). That's not allowed, only the UI thread can touch UI objects.
If you need to update UI from your background/AsyncTask as it's running, you must call publishProgress() which will cause onProgressUpdate to run on the UI thread. You can also implement onPostExecute() which will also run on the UI thread once the background thread has finished.
This scenario generally occurs when AsyncTask thread is working in the
background but in the meanwhile, the UI activity class is destroy. So
after completion of the AsyncTask when we try to perform some UI task,
the above Exception will thrown.

Categories

Resources