Closed Bug 344789 Opened 18 years ago Closed 16 years ago

"WARNING: Asked to remove non-existent observer" in <nsImageLoadingContent.cpp> |RemoveObserver()|

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla1.9.1a2

People

(Reporter: MatsPalmgren_bugz, Assigned: sgautherie)

References

()

Details

Attachments

(2 files, 2 obsolete files)

(followup from bug 342710 comment 4)

STEPS TO REPRODUCE
1. load an image URL in a debug build
2. quit

ACTUAL RESULTS
WARNING: Asked to remove non-existent observer: file nsImageLoadingContent.cpp, line 370

(I don't see the other warning mentioned in 342710 comment 4 anymore)

http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/base/src/nsImageLoadingContent.cpp&rev=1.74&root=/cvsroot&mark=370#342

BUILDS AND PLATFORMS TESTED
Bug occurs in SeaMonkey trunk debug build on Linux.
Attached file stack
We have two calls to nsImageLoadingContent::RemoveObserver() for
aObserver=0x881cf6c - the first from ImageListener::OnStopRequest()
during load, and the second from nsImageDocument::Destroy() when
shutting down.
If we actually care, we should probably either remove the warning or store a boolean on nsImageDocument indicating whether it's observing the node.
(In reply to comment #2)
> If we actually care, we should probably either remove the warning or store a
> boolean on nsImageDocument indicating whether it's observing the node.
> 

This seems to be causing png images on http://www.tbray.org/ongoing/ to fail loading.
> This seems to be causing png images on http://www.tbray.org/ongoing/ to fail
> loading.

_very_ unlikely.

If there is a problem on that site, please file a separate bug on it with steps to reproduce -- site loads ok here as far as I can tell.
(In reply to comment #4)
> 
> _very_ unlikely.

Fair enough, probably just a symptom or coincidence.


(In reply to comment #1)
> We have two calls to nsImageLoadingContent::RemoveObserver() for
> aObserver=0x881cf6c - the first from ImageListener::OnStopRequest()
> during load, and the second from nsImageDocument::Destroy() when
> shutting down.

Exactly:
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/content/html/document/src/nsImageDocument.cpp&rev=1.175&mark=221,230,329,339#219>
OS: Linux → All
Hardware: PC → All
Summary: WARNING: Asked to remove non-existent observer: file nsImageLoadingContent.cpp, line 370 → "WARNING: Asked to remove non-existent observer" in <nsImageLoadingContent.cpp> |RemoveObserver()|
Attached patch (Av1) Add boolean (obsolete) — Splinter Review
(In reply to comment #2)
> store a boolean on nsImageDocument indicating whether it's observing the node.
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #331271 - Flags: superreview?(bzbarsky)
Attachment #331271 - Flags: review?(bzbarsky)
Comment on attachment 331271 [details] [diff] [review]
(Av1) Add boolean

Call it mObservingImageLoader, and r+sr=bzbarsky
Attachment #331271 - Flags: superreview?(bzbarsky)
Attachment #331271 - Flags: superreview+
Attachment #331271 - Flags: review?(bzbarsky)
Attachment #331271 - Flags: review+
Attached patch (Av1a) Add boolean (obsolete) — Splinter Review
Av1, with comment 8 suggestion(s).
Attachment #331271 - Attachment is obsolete: true
Av1a, with a missed replace.
Attachment #331334 - Attachment is obsolete: true
Keywords: checkin-needed
Target Milestone: --- → mozilla1.9.1a2
Comment on attachment 331342 [details] [diff] [review]
(Av1b) Add boolean (Checkin: Comment 11)

http://hg.mozilla.org/mozilla-central/index.cgi/rev/ab8b0ec8dbcb
Attachment #331342 - Attachment description: (Av1b) Add boolean → (Av1b) Add boolean (Checkin: Comment 11)
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
(In reply to comment #0)
> 2. quit

To close the Browser window is enough (having the Error Console open, for example).

***

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008080208 SeaMonkey/2.0a1pre] (home, debug) (W2Ksp4)

V.Fixed
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: