일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- KTS
- linux
- 안드로이드
- c
- 보안
- java
- gradle
- 안철수
- 탐지기법
- git
- 구글
- 개발
- Eclipse
- Android
- ActiveX
- 안드로이드 개발
- 리눅스
- C++
- OOM
- Android 4.1
- 자바
- 코틀린
- mime
- kotlin
- 악성코드
- 하버드
- 노개북
- ActiveMovieControl
- build.gradle
- Today
- Total
꿈소년의 개발 이야기
android.os.TransactionTooLargeException 본문
출처 : http://developer.android.com/reference/android/os/TransactionTooLargeException.html
바인더가 처리할 양이 너무 커서 나타나는 exception 이다.
보통 1mb 이내에 처리가 되어야 하는데 그 크기가 넘어서 생기는 문제이다.
보통 쿼리를 던지거나 Parcel 로 큰 값을 던지는 경우에 발생한다.
처리하는 부분을 다시 다듬어서 불필요하게 버퍼를 차지하는지 확인이 필요하다.
이하 내용은 좀 더 간략한 overview 이다.
The Binder transaction failed because it was too large.
During a remote procedure call, the arguments and the return value of the call are transferred as Parcel
objects stored in the Binder transaction buffer. If the arguments or the return value are too large to fit in the transaction buffer, then the call will fail and TransactionTooLargeException
will be thrown.
The Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. Consequently this exception can be thrown when there are many transactions in progress even when most of the individual transactions are of moderate size.
There are two possible outcomes when a remote procedure call throws TransactionTooLargeException
. Either the client was unable to send its request to the service (most likely if the arguments were too large to fit in the transaction buffer), or the service was unable to send its response back to the client (most likely if the return value was too large to fit in the transaction buffer). It is not possible to tell which of these outcomes actually occurred. The client should assume that a partial failure occurred.
The key to avoiding TransactionTooLargeException
is to keep all transactions relatively small. Try to minimize the amount of memory needed to create a Parcel
for the arguments and the return value of the remote procedure call. Avoid transferring huge arrays of strings or large bitmaps. If possible, try to break up big requests into smaller pieces.
If you are implementing a service, it may help to impose size or complexity contraints on the queries that clients can perform. For example, if the result set could become large, then don't allow the client to request more than a few records at a time. Alternately, instead of returning all of the available data all at once, return the essential information first and make the client ask for additional information later as needed.
'Android Development' 카테고리의 다른 글
ANT build System을 통한 Android APK 빌드하기 (0) | 2012.06.25 |
---|---|
[MAT] Memory leak analysis tool (0) | 2012.06.08 |
ListView setTextFilterEnabled (0) | 2012.05.02 |
Source Insight + GVIM (0) | 2012.03.30 |
fragment 와 orientation (0) | 2012.03.26 |