2011-12-23 5 views
0

두 개의 서로 다른 패키지에 같은 이름의 활동이 두 개 있습니다. 하나는 다른 것의 하위 클래스입니다. 기기에 따라 두 가지 테마를 사용하기 위해이 작업을 수행합니다. (우리는 더 큰 스크린 장치를 위해 Theme.Dialog를 사용하고 다른 사람들을 위해 정규적으로 사용합니다.) 상속 된 클래스는 onCreate을 오버라이드하여 super 메소드를 호출하고 일부 윈도우 플래그를 설정합니다.StackOverflowError on Activity.onCreate

내 모든 장치에서 정상적으로 작동하지만 몇 시간 동안 매우 이상한 오류보고가 발생합니다. 내가 onCreateRegister 작성하지 않은

java.lang.StackOverflowError 
    at *****.activities.Register.onCreate(SourceFile) 
    at *****.tablet.Register.onCreateRegister(SourceFile) 
    (a lot of repeats) 
    at *****.activities.Register.onCreate(SourceFile) 
    at *****.tablet.Register.onCreateRegister(SourceFile) 
    at *****.activities.Register.onCreate(SourceFile) 
    at *****.tablet.Register.onCreateRegister(SourceFile) 
    at *****.tablet.Register.onCreate(SourceFile) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 
    at android.app.ActivityThread.access$1500(ActivityThread.java:117) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 
    at android.os.Handler.dispatchMessage(Handler.java:99) 
    at android.os.Looper.loop(Looper.java:130) 
    at android.app.ActivityThread.main(ActivityThread.java:3683) 
    at java.lang.reflect.Method.invokeNative(Native Method) 
    at java.lang.reflect.Method.invoke(Method.java:507) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:850) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608) 
    at dalvik.system.NativeStart.main(Native Method) 

그래서 나는 내부 이름의 생각,하지만 난 모르겠습니다. ProGuard를 사용하지만 재귀 호출이 내 코드에 의해 행 번호가 표시되어야합니다.

내 장치에서이 파일을 복제 할 수 없으며 이미 테스트 한 동일한 모델에서이 보고서를 얻을 수 있으므로 장치 별 문제는 아닙니다.

왜 이런 일이 일어나고 있는지 또는 더 나은 방법으로 처리 할 수있는 사람이 있습니까?

답변

0

부모 클래스와 하위 클래스가 더 이상 같은 이름이 아니도록 내 클래스의 이름을 변경 했으므로 문제가 해결 된 것으로 보입니다.

0

StackOverflowError가 : 나는 코드를 보지 않았기 때문에, 그 정보와 함께 갈 당신에게 어디에

Thrown when the depth of the stack of the running program exceeds some platform or VM specific limit. Typically, this will occur only when a program becomes infinitely recursive, but it can also occur in correctly written (but deeply recursive) programs.

알고하지 마십시오. 하지만 실제로 Android 오류가 아닐 수있는 Android/Java 오류이거나 제대로 실행되지 않는 재귀 적 항목이있을 수 있습니다.

관련 문제