코딩중 EXC_BAD_ACCESS 발생하며 시뮬레이터가 튕기는 경우.
Xcode 기본 설정으로는 위 메시지만 출력한다.
하지만 이 메시지만으로는 정확한 에러 위치를 확인하는것이 쉽지 않다. 
Xcode 에서 아래와 같이 설정함으로써  어디서 에러가 발생됬는지 쉽게 알 수 있다.



[인용원문]

NSZombieEnabled is an environment variable which can be helpful to track down the elusive object causing the problem. With the environment variable set, Cocoa will redirect all objectsisa pointer to an NZZombie object once an objects retain count has reached zero. In the future, should you try and send a message to a previously released object, an exception will be raised showing a message similar to the following:

Setting NSZombieEnabled Environment Variable

In the Groups and Files section, expand the Executables section and right click on your app name and choose Get Info from the dialog:

Select the Arguments tab on the top and then add a new entry in the Variables to be set in the environment section. Name the new variable to NSZombieEnabled and set its value toYES.

Tracking Down the Error

Using a zombie, messages sent to an object that has already released will now generate the exception shown above, and following the stack track should now help you find the location of the object that is generating the EXC_BAD_ACCESS error.

Don’t forget to remove the environment variable, or at a minimum untick the checkbox once you find the source of the problem. 


[출처] http://iphonedevelopertips.com/debugging/tracking-down-exc_bad_access-errors-with-nszombieenabled.html 
 

'iOS' 카테고리의 다른 글

[iOS] Reachability  (0) 2012.09.21
Posted by finewoo
,


오라클 NUMBER 형 컬럼의 데이터를 HashMap 타입으로 받아 java에서 사용하려고 할때 오류 발생

java.math.BigDecimal cannot be cast to java.lang.String 


MySQL 의 INT형 컬럼 데이터를 HashMap 타입으로 받아 java에서 사용하려고 할때오류 발생


java.lang.Integer cannot be cast to java.lang.String



iBatis xml 부분
 <SELECT id="selectQue" resultClass="java.util.HashMap" parameterClass="java.util.HashMap"> Query statement </SELECT>

HashMap 으로 결과를 받는 부분
String seq = (String) map.get("SEQ"));



NUMBER(INT) 타입을 곧바로 String으로 캐스트 변환하려고 할때 발생

해결:  캐스트 변환이 아닌, String 클래스의 valueOf (Object) 메소드를 이용해 처리

String seq = String.valueOf(map.get("SEQ"));



'Java > iBatis' 카테고리의 다른 글

[iBatis] Dynamic SQL, iterate  (1) 2010.02.03
[iBATIS] iBatis int 형 데이타 값이 NULL 일때 예외 발생  (1) 2009.12.11
Posted by finewoo
,

Error generating final archive: Debug certificate expired on  [날짜]


증상 : 이클립스의 Problems에 위와 같은 에러 메시지가 뜨고 프로젝트가 빌드 또는 실행이 되지 않는 경우가 생길때 

원인:  Debug Certificate 가 만료(Certificate 는 만들어진 후 1년이 지나면 Expire 됨)

해결 방법 : 만료된 debug.keystore 파일을 삭제

                파일 위치는 메뉴의 Window > Preferences > Android > Build 내 "Default debug keystore"

                삭제 후 프로젝트 clean



Posted by finewoo
,