마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

어플리케이션 프로세스 종료 문제 질문 드립니다.

0 추천
평소에는 정상적으로 작동하다가.. 어플을 오래 켜두거나 하면 앱이 종료됩니다.

반복적으로는 발생하지는 않습니다.

메모리 이슈로 보이는대요. 실제 앱은 OutOfMemory가 나는 상황도 아니고..

단순히 안드로이드 자체에서 메모리가 부족하여 해당 앱을 종료 시키는지 알고 싶습니다.

아래는 adb log 내용 입니다.

06-25 15:45:51.829  1630  2145 V audio_hw_primary: out_set_parameters: routing=2

06-25 15:45:51.829  1630  2145 V audio_hw_primary: out_set_parameters, line: 2435

06-25 15:45:51.829  1630  2145 V audio_hw_primary: >>>>>>>> adev->mode:0,adev->out_device is: 2, val is : 2

06-25 15:45:51.842  1630  2145 V audio_hw_primary: start_output_stream, line: 1939

06-25 15:45:51.842  1630  2145 V audio_hw_primary: start_output_stream, line: 1981

06-25 15:45:51.842  1630  2145 D audio_hw_primary: >>>>>> select_device

06-25 15:45:51.844  1630  2145 V audio_hw_primary: active_output, ****LINE:1750,FUNC:select_device, adev->out_device:2

06-25 15:45:51.844  1630  2145 V audio_hw_primary: ****LINE:1762,FUNC:select_device, headset_on:0, headphone_on:0, speaker_on:2, earpiece_on:0, bt_on:0

06-25 15:45:51.844  1630  2145 V audio_hw_primary: ****LINE:1789,FUNC:select_device, output_device_id:6

06-25 15:45:51.844  1630  2145 V audio_hw_primary: NORMAL mode, ****LINE:1796,FUNC:select_device, adev->out_device:2

06-25 15:45:51.845  1630  2145 V audio_hw_primary: use AUDIO_CODEC to playback audio

06-25 15:45:51.846  1630  2145 V audio_hw_primary: do not use out resampler

06-25 15:45:51.864  1611  2556 I [Gralloc]: ion_alloc from ion_client:19 via heap type DMA(mask:16) for 725760 Bytes cached buffer successfully, usage = 0x00000333

06-25 15:45:51.890  3130  3130 I art     : Starting a blocking GC Explicit

06-25 15:45:51.928  3130  3130 I art     : Explicit concurrent mark sweep GC freed 42962(1902KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 6MB/10MB, paused 227us total 33.745ms

06-25 15:45:51.931  3130  3130 I art     : System.exit called, status: 0

06-25 15:45:51.931  3130  3130 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.

06-25 15:45:51.984  1630  2145 D AudioFlinger: mixer(0xf23c0000) throttle end: throttle time(33)

06-25 15:45:52.000  2106  2175 W InputDispatcher: channel 'c5a5a66 com.example/com.example.InfoActivity_new (server)' ~ Consumer closed input channel or an error occurred.  events=0x9

06-25 15:45:52.000  2106  2175 E InputDispatcher: channel 'c5a5a66 com.example/com.example.InfoActivity_new (server)' ~ Channel is unrecoverably broken and will be disposed!

06-25 15:45:52.000  2106  2175 W InputDispatcher: channel '351eda5 com.example/com.example.InfoActivity_new (server)' ~ Consumer closed input channel or an error occurred.  events=0x9

06-25 15:45:52.000  2106  2175 E InputDispatcher: channel '351eda5 com.example/com.example.InfoActivity_new (server)' ~ Channel is unrecoverably broken and will be disposed!

06-25 15:45:52.004  2106  2685 I WindowState: WIN DEATH: Window{351eda5 u0 com.example/com.example.InfoActivity_new}

06-25 15:45:52.004  2106  2685 W InputDispatcher: Attempted to unregister already unregistered input channel '351eda5 com.example/com.example.InfoActivity_new (server)'

06-25 15:45:52.005  2106  2686 I ActivityManager: Process com.example (pid 3130) has died
익명사용자 님이 2019년 6월 25일 질문

1개의 답변

0 추천
만약 앱이 현재 화면이 켜져있고 앱이 화면에 표시되고 있는 상태라면 (백그라운드가 아니라 포어그라운드 상태라면) 메모리 부족하여 해당 앱을 종료시키는 경우는 거의 없습니다. 뭔가 다른 원인이 있을 가능성이 있습니다. 만약 다른 앱이 화면을 덮고 있거나 백그라운드로 실행중인 상태에서 종료되는 것이라면 언제든지 메모리 부족으로 종료될수 있으니 이상한 것은 아닐거구요. 클리너나 부스터 같은 프로세스 관리 앱이 죽이는 경우 있으니 혹시나 설치되어있다면 제거하고 테스트해보시구요.

위 로그만 봐서 정확한 원인까지는 모르겠는데요. 자바 코드의 스택 트레이스도 안보이고 그렇다고 시스템에서 크래쉬 나는 경우에 찍히는 로그도 안보이네요.
회색 (21,340 포인트) 님이 2019년 7월 1일 답변
...