On Jul 24, 5:04 am, Michael Elsdörfer <[email protected]> wrote: > Ah, I've now run into this issue also, it seems. Strangely, it works > just fine for the most part, except for random, unreproducable cases, > where it starts to hang somewhere inside getDeclaredMethods().
Yup, it's a race condition between multiple threads performing class initialization. If one of them completes before the other advances to the same point, you won't see the problem. As above, you can see the classes involved by examining the stack trace (kill -3 as above, or double-clicking on threads in DDMS, or attaching a debugger and examining the stacks). > > easiest way to do this is to call Class.forName(String className) > > early in the app start sequence. > > Does this mean Application.onCreate()? Sounds good. Anywhere before stuff starts calling getDeclaredMethods () will do. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

