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

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.

Related

Ouya - dimensions too large

I'm testing my video player on an OUYA device and it crashes almost immediately with the "dimension too large" error (see logcat dump below). If anyone knows of a work-around or a way to set a maximum dimension, I'll be grateful.
D/MySurface(2651): surfaceCreated
W/InputDispatcher(319): Attempted to unregister already unregistered input channel '41daf688 tv.ouya.console.wallpaper.OozeService (server)'
I/WindowState(319): WIN DEATH: Window{41daf688 tv.ouya.console.wallpaper.OozeService paused=false}
I/WindowManager(319): WINDOW DIED Window{41daf688 tv.ouya.console.wallpaper.OozeService paused=false}
E/SurfaceFlinger(109): dimensions too large 2560 x 1472
E/SurfaceFlinger(109): createNormalSurfaceLocked() failed (Invalid argument)
W/WindowStateAnimator(319): OutOfResourcesException creating surface
I/WindowManager(319): Out of memory for surface! Looking for leaks...
W/WindowManager(319): No leaked surfaces; killing applicatons!
W/ActivityManager(319): Killing processes Free memory at adjustment 0
W/ActivityManager(319): Killing ProcessRecord{41d9cae8 2651:example.android.player/u0a37} (adj 0): Free memory
W/WindowManager(319): Looks like we have reclaimed some memory, clearing surface for retry.
W/WindowManager(319): Due to memory failure, waiting a bit for next layout
I've tried changing the resolutions via this post as well without any success: http://forums.ouya.tv/discussion/2170/setting-resolution-not-working
I found a work around for this using a Surface callback with a pre-set max for width and height:
#Override
public void surfaceCreated(SurfaceHolder holder) {
Rect rect = holder.getSurfaceFrame();
if (rect.width() > maxWidth || rect.height() > maxHeight) {
holder.setFixedSize(maxWidth, maxHeight);
}
}

jelly bean app gets killed on a phone call

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.

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

Getting low memory warning but I don't appear to be leaking memory

My application is closing without any error messages and re-launching automatically after switching activities approximately 20 or 30 times. I'm testing this by tapping a button that relaunches the current activity with different data (and cycles back around to the beginning once the end of the data is reached). The activity is launched with the FLAG_ACTIVITY_CLEAR_TOP flag so there should only ever be one instance of the activity in memory at a time. If I set FLAG_ACTIVITY_NO_HISTORY the problem still occurs.
This appears in the logcat output when the app crashes:
06-28 19:32:10.472: I/ActivityManager(115): Process com.mypackage.myapp (pid 3718) has died.
06-28 19:32:10.476: I/WindowManager(115): WIN DEATH: Window{406d06e0 com.mypackage.myapp/com.mypackage.myapp.welcome.LoginActivity paused=false}
06-28 19:32:10.480: E/InputDispatcher(115): channel '406ade20 com.mypackage.myapp/com.mypackage.myapp.matchup.MatchUpActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
06-28 19:32:10.480: E/InputDispatcher(115): channel '406ade20 com.mypackage.myapp/com.mypackage.myapp.matchup.MatchUpActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
06-28 19:32:10.535: I/WindowManager(115): WIN DEATH: Window{406ade20 com.mypackage.myapp/com.mypackage.myapp.matchup.MatchUpActivity paused=false}
06-28 19:32:10.539: I/WindowManager(115): WIN DEATH: Window{407a8230 com.mypackage.myapp/com.mypackage.myapp.fightcard.FightCardActivity paused=false}
06-28 19:32:10.566: I/ActivityManager(115): Start proc com.mypackage.myapp for activity com.mypackage.myapp/.fightcard.FightCardActivity: pid=3915 uid=10053 gids={3003}
06-28 19:32:10.574: I/ActivityManager(115): Low Memory: No more background processes.
Normally this would tell me that the app is leaking memory, however if I perform this test while watching the DDMS perspective in Eclipse, I can see that the allocated memory is stable, and in fact the app will often crash even when the % used is sitting around 50% (which is where it sits most of the time). The heap size and allocated memory are not increasing.
I have extensively used MAT on the app and while I did find memory leaks previously, I have solved them and can no longer find any other problems with that tool.
I've been able to recreate this problem on a Nexus S running Gingerbread, but it doesn't appear to be reproducible on a Galaxy Nexus running 4.0.4 (however that might be due to the fact that the heap is larger on the Galaxy).
What am I missing?
David Wasser's suggestion above led me to the solution. I noticed when I ran the command mentioned, I was getting a whole bunch of custom font asset allocations:
zip:/data/app/com.mypackage.myapp-2.apk:/assets/DINNextLTPro-MediumCond.otf: 98K
These allocations appeared to be increasing very quickly as I changed activities. Some googling led me to this link: http://code.google.com/p/android/issues/detail?id=9904
So it appears that there is an Android bug related to using custom fonts. The following workaround was taken from the link above:
public class Typefaces {
private static final String TAG = "Typefaces";
private static final Hashtable<String, Typeface> cache = new Hashtable<String, Typeface>();
public static Typeface get(Context c, String assetPath) {
synchronized (cache) {
if (!cache.containsKey(assetPath)) {
try {
Typeface t = Typeface.createFromAsset(c.getAssets(),
assetPath);
cache.put(assetPath, t);
} catch (Exception e) {
Log.e(TAG, "Could not get typeface '" + assetPath
+ "' because " + e.getMessage());
return null;
}
}
return cache.get(assetPath);
}
}
}
Essentially we're caching the instances of the custom font asset so each one only needs to be instantiated a single time.

Categories

Resources