Bug 8594 - REGRESSION: Exception on closing a page containing (just) an mp3
Summary: REGRESSION: Exception on closing a page containing (just) an mp3
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Major
Assignee: Nobody
URL: http://psy-g24-1.psy.ed.ac.uk/~tim/02...
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-04-26 04:45 PDT by tim bates
Modified: 2006-05-05 07:43 PDT (History)
2 users (show)

See Also:


Attachments
crash log from playing mp3 file (26.02 KB, text/plain)
2006-04-26 04:46 PDT, tim bates
no flags Details
Retain the dataSource! (637 bytes, patch)
2006-05-01 15:18 PDT, mitz
no flags Details | Formatted Diff | Diff
Same patch, but added change log and test (4.59 KB, patch)
2006-05-02 07:22 PDT, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tim bates 2006-04-26 04:45:26 PDT
open the above URL (to check that it was working)
played 15-20 seconds of audio
hit cmd-W to close

crash: log attached
Comment 1 tim bates 2006-04-26 04:46:05 PDT
Created attachment 7971 [details]
crash log from playing mp3 file
Comment 2 Alexey Proskuryakov 2006-04-26 05:30:00 PDT
Might be another instance of bug 8564 (I assume this is also a regression).
Comment 3 Alexey Proskuryakov 2006-04-26 22:24:43 PDT
The crash is now fixed (in bug 8564, presumably), but there's an exception logged to the console:

2006-04-27 09:19:22.375 Safari[2188] *** -[NSCFNumber _webView]: selector not recognized [self = 0xecf7ba0]
2006-04-27 09:19:22.376 Safari[2188] *** -[NSAutoreleasePool dealloc]: Exception ignored while releasing an object in an autorelease pool: *** -[NSCFNumber _webView]: selector not recognized [self = 0xecf7ba0]

#0  0x92902228 in -[NSException raise] ()
#1  0x9290207c in +[NSException raise:format:] ()
#2  0x928db16c in -[NSObject(NSForwardInvocation) forward::] ()
#3  0x909c40d0 in _objc_msgForward ()
#4  0x003e033c in -[WebPluginDocumentView viewWillMoveToWindow:] (self=0x130ce480, _cmd=0x90a3b988, window=0x0) at /Users/ap/WebKit/WebKit/Plugins/WebPluginDocumentView.m:157
#5  0x936a7f64 in -[NSView _setWindow:] ()
#6  0x9076c960 in CFArrayApplyFunction ()
#7  0x936a8280 in -[NSView _setWindow:] ()
#8  0x9076c960 in CFArrayApplyFunction ()
#9  0x936a8280 in -[NSView _setWindow:] ()
#10 0x936bba7c in -[NSScrollView _setWindow:] ()
#11 0x9076c960 in CFArrayApplyFunction ()
#12 0x936a8280 in -[NSView _setWindow:] ()
#13 0x9076c960 in CFArrayApplyFunction ()
#14 0x936a8280 in -[NSView _setWindow:] ()
#15 0x9076c960 in CFArrayApplyFunction ()
#16 0x936a8280 in -[NSView _setWindow:] ()
#17 0x9076c960 in CFArrayApplyFunction ()
#18 0x936a8280 in -[NSView _setWindow:] ()
#19 0x9076c960 in CFArrayApplyFunction ()
#20 0x936a8280 in -[NSView _setWindow:] ()
#21 0x93727ea0 in -[NSWindow dealloc] ()
Comment 4 Maciej Stachowiak 2006-04-26 22:43:15 PDT
This looks like an attempt to call _webView on a deallocated object. I don't think the removed _webView method on NSView needs to be brought back. Notice:

-[NSCFNumber _webView]: selector not recognized [self = 0xecf7ba0]
Comment 5 mitz 2006-04-29 22:27:51 PDT
(In reply to comment #4)
> This looks like an attempt to call _webView on a deallocated object. I don't
> think the removed _webView method on NSView needs to be brought back. Notice:

The deallocated object is the WebPluginDocumentView's dataSource. Not sure about how to fix this - the view (which is also a document representation for the data source) probably shouldn't retain the data source, but perhaps the data source should call setDataSource:NULL on the representation when it releases it.
Comment 6 mitz 2006-05-01 15:18:39 PDT
Created attachment 8057 [details]
Retain the dataSource!

On second thought, maybe it's okay to retain the dataSource. WebHTMLView does it! No change log or test yet, so please r- anyway.
Comment 7 Darin Adler 2006-05-01 16:20:41 PDT
Comment on attachment 8057 [details]
Retain the dataSource!

r=me
Comment 8 mitz 2006-05-02 07:22:50 PDT
Created attachment 8071 [details]
Same patch, but added change log and test
Comment 9 mitz 2006-05-02 08:49:10 PDT
orange.mov should be copied from WebCore/manual-tests/resources when landing this.
Comment 10 Tim Omernick 2006-05-02 10:04:50 PDT
Make sure to check for leaks if you retain the WebDataSource!  Recently, mjs added a few backpointers to WebFrame/WebDataSource to help remove our model code's dependency on the view hierarchy, but it's unclear which objects need to retain those backpointers...
Comment 11 Darin Adler 2006-05-04 20:08:47 PDT
(In reply to comment #10)
> Make sure to check for leaks if you retain the WebDataSource!  Recently, mjs
> added a few backpointers to WebFrame/WebDataSource to help remove our model
> code's dependency on the view hierarchy, but it's unclear which objects need to
> retain those backpointers.

In this case I think it's pretty clear it's correct. WebHTMLView does it and this is another kind of document view. But I'll check for leaks just to be sure.