JBQ,
  good to hear that regarding the correlation there is hope for the future.

  Regarding a reproducible test case: I tried to reproduce it by hand and
can do that. It seems to happen when the phone memory is low (in my test
2.8MB) and the cache is cleared by calling
webView.clearCache(true);.

I could try to write an isolated test case for that, but this test case will
not automatically run as the environment needs to be right, i.e. a low
memory scenario needs to be created.
Also I am pressed for time at the moment. If you believe that this bug will
get attention soon and be fixed as a result of me creating a reproducible
test case, I will do that for the sake of the greater good. But if this will
just be stored in a bug report and put onto the huge pile, I would rather
start working on the workaround I need. Ok with you?

  Thanks again, for being helpful, on a Sunday.

Cheers,
Mariano

On Sun, Mar 15, 2009 at 4:58 PM, Jean-Baptiste Queru <j...@android.com>wrote:

>
> Both the lack of correlation between the released binaries and the
> released source code and the lack of source code for 1.1 are artifacts
> of the release process that was used for 1.0 and 1.1. Lessons were
> learned and issues were fixed, and I expect that the situation for the
> next release will be better than it was for 1.0 and 1.1.
>
> I found the source code in question in Google's internal code
> repository, since I have access to the source code that was used to
> build the versions of Android 1.1 with which you are having problems,
> but unfortunately that source code cannot be published.
>
> If there's any way that you can reproduce the issue with a small piece
> of code, that would help us diagnose the issue and (if it turns out to
> be an issue in Android itself) would allow us to test it against the
> current source code as well.
>
> JBQ
>
> On Sun, Mar 15, 2009 at 8:42 AM, Mariano Kamp <mariano.k...@gmail.com>
> wrote:
> > JBQ,
> >
> >   thanks for the quick reply.
> >
> >   So in line 391 it looks like the NPE is a result of mBaseDir.list() in
> 390
> > returning null. But how can I know what happened around this code snippet
> > without having that code?
> >
> >   Is this missing correlation a growing pain or will it be the same with
> the
> > next release?
> > I don't really know how to find a solution/workaround for the NPE with
> this
> > information.
> >
> >   And somewhere you found the code from below. Are there any plans to
> > publish this codebase as a reference point?
> >
> > Cheers,
> > Mariano
> > On Sun, Mar 15, 2009 at 2:42 PM, Jean-Baptiste Queru <j...@android.com>
> > wrote:
> >>
> >> Unfortunately neither the exact code for the 1.0 SDK nor for 1.1
> >> (especially for 1.1) are available.
> >>
> >> Versions 126986 and 128600 respectively match PLAT-RC33 (current
> >> version for the T-Mobile G1 in the US) and TMI-RC9 (the European
> >> equivalent).
> >>
> >> Here's the relevant code in 1.1, which matches the following code in
> >> 1.0:
> >>
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/webkit/CacheManager.java;h=f5a09b83b724a86a825e3328542a178388b71ae5;hb=release-1.0#l367
> >>
> >> I'm not familiar with that specific code, though.
> >>
> >>  378:     /**
> >>  379:      * remove all cache files
> >>  380:      *
> >>  381:      * @return true if it succeeds
> >>  382:      */
> >>  383:     // only called from WebCore thread
> >>  384:     static boolean removeAllCacheFiles() {
> >>  385:         // delete cache in a separate thread to not block UI.
> >>  386:         final Runnable clearCache = new Runnable() {
> >>  387:             public void run() {
> >>  388:                 // delete all cache files
> >>  389:                 try {
> >>  390:                     String[] files = mBaseDir.list();
> >>  391:                     for (int i = 0; i < files.length; i++) {
> >>  392:                         new File(mBaseDir, files[i]).delete();
> >>  393:                     }
> >>  394:                 } catch (SecurityException e) {
> >>  395:                     // Ignore SecurityExceptions.
> >>  396:                 }
> >>  397:                 // delete database
> >>  398:                 mDataBase.clearCache();
> >>  399:             }
> >>  400:         };
> >>  401:         new Thread(clearCache).start();
> >>  402:         return true;
> >>  403:     }
> >>
> >> JBQ
> >>
> >> On Sun, Mar 15, 2009 at 3:49 AM, Mariano Kamp <mariano.k...@gmail.com>
> >> wrote:
> >> >
> >> > Hi,
> >> >
> >> >   I wrote an app that, among other things,  renders feed articles
> >> > using WebView. Now I get error reports that seem to originate in
> >> > WebView:
> >> >
> >> > -- NewsRob Version: 1.7.0/170
> >> > -- Android Version: sdk=2, release=1.1, inc=128600
> >> > -- Thread State: RUNNABLE
> >> > -- Stacktrace:
> >> > java.lang.NullPointerException
> >> > at android.webkit.CacheManager$1.run(CacheManager.java:391)
> >> > at java.lang.Thread.run(Thread.java:935)
> >> >
> >> >   I've got another report with the same content, but a different
> >> > incremental version of the sdk (126986). Probably one from the US and
> >> > one from the UK.
> >> >
> >> >   So now I would love to know why the code blows up and if there is
> >> > anything I can do about it. And with the source files and line numbers
> >> > I felt in good shape to so. If only I could match them to the public
> >> > code repositories ;-(
> >> >
> >> >   Finding the file was easy:
> >> >
> >> >
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;f=core/java/android/webkit;h=a133d1c04dede353611f23bc37d04a9ff7316b8d;hb=HEAD
> >> >
> >> >   But then "history" returns the following:
> >> >
> >> >
> >> >
> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=history;f=core/java/android/webkit/CacheManager.java;h=d12940d04f41e3f4450da79738714a6a8c7739e6;hb=HEAD
> >> > -->
> >> > 2008-12-18      The Android Open...     Code drop from //branches/
> >> > cupcake/....@124589
> >> > 2008-10-21      The Android Open...     Initial Contribution
> android-1.0
> >> >
> >> >   None of these seem to simply match the version information returned
> >> > by Build.VERSION.
> >> >
> >> >   Furthermore none of these seem to match the line no from the
> >> > stracktrace. It says method "run" in CacheManager.java:391. In both
> >> > versions line 391 is not in a run method ;-(
> >> >
> >> >   So, how to match stacktraces to code?
> >> >
> >> > Cheers,
> >> > Mariano
> >> >
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Jean-Baptiste M. "JBQ" Queru
> >> Android Engineer, Google.
> >>
> >> Questions sent directly to me that have no reason for being private
> >> will likely get ignored or forwarded to a public forum with no further
> >> warning.
> >>
> >>
> >
> >
> > >
> >
>
>
>
> --
> Jean-Baptiste M. "JBQ" Queru
> Android Engineer, Google.
>
> Questions sent directly to me that have no reason for being private
> will likely get ignored or forwarded to a public forum with no further
> warning.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to