Closed Bug 589810 Opened 14 years ago Closed 14 years ago

Assertion at startup because we're not initializing the disk cache soon enough ("Cannot switch cache directory when initialized")

Categories

(Core :: Networking: Cache, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 596808

People

(Reporter: ehsan.akhgari, Unassigned)

Details

(Keywords: assertion)

I get this assertion at startup:

"Cannot switch cache directory when initialized"

#0	0x0052cea3 in NS_DebugBreak_P at nsDebugImpl.cpp:266
#1	0x123a92f3 in nsDiskCacheDevice::SetCacheParentDirectory at nsDiskCacheDevice.cpp:993
#2	0x1239e640 in nsCacheService::OnProfileChanged at nsCacheService.cpp:1554
#3	0x123a1de7 in nsCacheProfilePrefObserver::Observe at nsCacheService.cpp:277
#4	0x00567c6b in nsObserverList::NotifyObservers at nsObserverList.cpp:130
#5	0x00569200 in nsObserverService::NotifyObservers at nsObserverService.cpp:182
#6	0x0001ceeb in nsXREDirProvider::DoStartup at nsXREDirProvider.cpp:738
#7	0x00011152 in XRE_main at nsAppRunner.cpp:3535
#8	0x00002615 in main at nsBrowserApp.cpp:158
#9	0x00002296 in start

The disk cache gets initialized a short while later:

#0	0x123aa5a2 in nsDiskCacheDevice::Init at nsDiskCacheDevice.cpp:367
#1	0x1239e68e in nsCacheService::OnProfileChanged at nsCacheService.cpp:1558
#2	0x123a1de7 in nsCacheProfilePrefObserver::Observe at nsCacheService.cpp:277
#3	0x00567c6b in nsObserverList::NotifyObservers at nsObserverList.cpp:130
#4	0x00569200 in nsObserverService::NotifyObservers at nsObserverService.cpp:182
#5	0x0001ceeb in nsXREDirProvider::DoStartup at nsXREDirProvider.cpp:738
#6	0x00011152 in XRE_main at nsAppRunner.cpp:3535
#7	0x00002615 in main at nsBrowserApp.cpp:158
#8	0x00002296 in start

So it seems like nsCacheService::OnProfileChanged needs to initialize the disk cache before calling SetCacheParentDirectory on it.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.