Can you show the code? It sounds like the GET isn't relevant. Is your code in its own thread? If so is it synchronised? You should be able to write a test which iterates 1000 times just performing the format, and catch it. -- Android Academy http://www.androidacademy.com
On Mar 16, 6:31 pm, Torgny <torgny.bj...@gmail.com> wrote: > In a couple of places in my application I format the date to send with > a GET request to an external API. Most of the time this works > excellently, but 1 out of a 1000 times this fails and crashes my > application/service. > > Here is the output the debugger gives me: > > Uncaught handler: thread Thread-9 exiting due to uncaught exception > java.lang.NullPointerException > at dalvik.system.PathClassLoader.findResource(PathClassLoader.java: > 227) > at java.lang.ClassLoader.getResource(ClassLoader.java:363) > at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:401) > at java.lang.ClassLoader.getSystemResourceAsStream > (ClassLoader.java:171) > at java.util.ResourceBundle$1.run(ResourceBundle.java:304) > at java.util.ResourceBundle$1.run(ResourceBundle.java:303) > at java.security.AccessController.doPrivilegedImpl > (AccessController.java:173) > at java.security.AccessController.doPrivileged > (AccessController.java:53) > at java.util.ResourceBundle.handleGetBundle(ResourceBundle.java: > 301) > at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:169) > at java.util.ResourceBundle.getBundle(ResourceBundle.java:109) > at java.util.Locale$1.run(Locale.java:806) > at java.util.Locale$1.run(Locale.java:805) > at java.security.AccessController.doPrivilegedImpl > (AccessController.java:173) > at java.security.AccessController.doPrivileged > (AccessController.java:53) > at java.util.Locale.getBundle(Locale.java:804) > at java.util.Currency.getInstance(Currency.java:100) > at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java: > 73) > at java.text.NumberFormat.getInstance(NumberFormat.java:283) > at java.text.NumberFormat.getNumberInstance(NumberFormat.java:348) > at java.text.NumberFormat.getInstance(NumberFormat.java:279) > at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:128) > at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:121) > > I've tried several different approaches to this but never really > figured out if I am doing something wrong or if this is an actual bug > in the OS itself. Can someone please help me figure out what is going > on? > > Warm Regards, > Torgny --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---