Closed Bug 950164 Opened 11 years ago Closed 11 years ago

crash in nsCOMPtr_base::assign_assuming_AddRef(nsISupports*) | mozilla::net::CacheFileIOManager::OnProfile()

Categories

(Core :: Networking: Cache, defect)

x86
Windows NT
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla30

People

(Reporter: mayhemer, Assigned: mayhemer)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is report bp-62b39577-a61e-44cd-9890-60c702131211. ============================================================= Crash Address 0x10 Missing gInstance check? michal@156755 966 if (directory) { michal@156755 > 967 rv = directory->Clone(getter_AddRefs(gInstance->mCacheDirectory)); michal@156755 968 NS_ENSURE_SUCCESS(rv, rv);
Should be fixed before the temp enable.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Blocks: 967693
Attached patch v1Splinter Review
Attachment #8372672 - Flags: review?(michal.novotny)
Comment on attachment 8372672 [details] [diff] [review] v1 Review of attachment 8372672 [details] [diff] [review]: ----------------------------------------------------------------- CacheFileIOManager::OnProfile() is called only from CacheObserver::Observe() and we call CacheFileIOManager::Init() just before we call OnProfile(). Maybe a better fix would be to call OnProfile() only when Init() succeeds or fails with NS_ERROR_ALREADY_INITIALIZED, i.e. something like: rv = CacheFileIOManager::Init(); if (NS_SUCCEEDED(rv) || rv == NS_ERROR_ALREADY_INITIALIZED) { CacheFileIOManager::OnProfile(); } I would slightly prefer this fix over your patch, but it is up to you. Anyway, the question here is why initialization of CacheFileIOManager failed?
Attachment #8372672 - Flags: review?(michal.novotny) → review+
I was thinking of this and it's similar to discussion in bug 971975. Doing non-null checks in a method is safer than doing state checks out of a method. So I'll rather leave it, since this is a crash fix.
(In reply to Michal Novotny (:michal) from comment #4) > Anyway, the question here is why initialization of CacheFileIOManager failed? "probably could not create the IO thread" as the comment in the patch says.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Verified after the cache2 trial (bug 967693).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: