UNCONFIRMED 25929
Changing CACHE MANIFEST file causes ASSERT to fail
https://bugs.webkit.org/show_bug.cgi?id=25929
Summary Changing CACHE MANIFEST file causes ASSERT to fail
Kevin D. Wolf
Reported 2009-05-21 06:53:23 PDT
If you create a very simple CACHE MANIFEST include it within the HTML tag and open that page, it appears everything works fine with the caching events. Make a change to the manifest, and reload the page, it will cause ASSERT(!m_resources.contains(url)); Within addResource method of ApplicationCache.cpp will fail. This does not appear to be a problem in the version of WebKit within Safari on the iPhone, but does appear to be a problem in V4.0 beta of Safari for the desktop.
Attachments
Mark Rowe (bdash)
Comment 1 2009-05-21 10:42:08 PDT
Can you please attach a simple test case demonstrating the problem?
Mark Rowe (bdash)
Comment 2 2009-05-21 10:42:24 PDT
Alexey Proskuryakov
Comment 3 2009-05-21 11:37:21 PDT
(In reply to comment #0) > This does not appear to be a problem in the version of WebKit within Safari on > the iPhone, but does appear to be a problem in V4.0 beta of Safari for the > desktop. Since you are getting an assertion failure, this must be your local debug build of WebKit, not Safari 4 beta. What revision are you seeing this with? I tried to follow your steps to reproduce, but didn't get any assertion failure with ToT, so more detail would be needed to investigate this issue.
Kevin D. Wolf
Comment 4 2009-05-21 11:47:44 PDT
I grabbed the latest WebKit source yesterday, it appears to be in the Safari Beta 4, I've installed on a machine w/o WebKit Source. Busy afternoon, but I'll package up my source and do a better write up later this PM
Kevin D. Wolf
Comment 5 2009-05-22 10:56:03 PDT
This seems to be an intermittent problem. I have two installs of Safari 4 Beta working with no issues. One install of Safari 4 Beta failing. My latest WebKit build within Safari 4 is also failing. Working on my iPod Touch. If I can get any more details, I will pass them along. Here is how I can get it to fail. 1) Clear the cache CTRL+ALT+E 2) Download page with the manifest tag 3) Events fire as pages are downloaded 4) Update something in the manifest tag 5) Execute window.applciationCache.update() or re-download the page 5) In Safari 4, I get an INVALID_STATE_ERR: DOM Exception 11 6) When running WebKit w/ VC++ debugger attached the assertion fails ApplicationCache.cpp addResource method ASSERT(!m_resources.contains(url));
Kevin D. Wolf
Comment 6 2009-05-22 11:44:17 PDT
I have two Safari 4.0 Betas installed from the Apple site with WebKit file V5.528.18 installed on each. One works, one does not. Is there anyway I can inspect the contents of the off-line cache?
Alexey Proskuryakov
Comment 7 2009-05-22 12:23:27 PDT
You can check the database file using sqlite own command line tool sqlite3 (I don't know how to best install it on Windows), or any other tool that can read sqlite databases.
Kevin D. Wolf
Comment 8 2009-05-22 13:06:40 PDT
I found my apps HTML 5.0 SQLite DB's, but coudn't the onces for offline cache, can you point me in the right direction?
Alexey Proskuryakov
Comment 9 2009-05-22 13:32:13 PDT
Mine is in Documents and Settings\<User>\Local Settings\Application Data\Apple Computer\Safari\ApplicationCache.db. Note that with debug builds, it may be emptied on each application quit (it is in Mac, not sure about Windows).
Kevin D. Wolf
Comment 10 2009-06-02 14:55:34 PDT
Seems like I was calling applicationCache.update() in my startup routine. If I don't do this, everything seems to work fine. I'll close in a week or so if I don't see anymore problems.
Alexey Proskuryakov
Comment 11 2009-06-02 15:30:48 PDT
If an assertion fails, it's a bug that should be fixed in WebKit.
Kevin D. Wolf
Comment 12 2009-06-02 15:36:18 PDT
I think the assertion does a good job of explaining the problem, but I see this when I call applicationCache.update and it attempts to stuff an existing item into m_resources. Let me know if you have any additional questions.
Alexey Proskuryakov
Comment 13 2009-06-02 15:41:11 PDT
Could you please create and upload a reduced (or any) test case? I'm assuming that comment 5 still has up to date steps to reproduce.
Note You need to log in before you can comment on or make changes to this bug.