Bug 11444

Summary: REGRESSION (r17378): Exception (-[NSCFDictionary setObject:forKey:]: attempt to insert nil value) when submitting a form with an empty uninitialized field
Product: WebKit Reporter: mitz
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, ggaren
Priority: P1 Keywords: Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: data:text/html,<form><input><input%20type="submit"%20value="Crash"></form>
Attachments:
Description Flags
Layout test timothy: review+

Description mitz 2006-10-28 06:46:16 PDT
If you open the URL in a debug build of TOT and click the Crash button you get
ASSERTION FAILED: Uncaught exception - *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value

This is coming from createNSDictionary (FrameMac.mm) when the second String in a pair, which is the form field's value, is a NULL string. Before r17378 it was converted to an empty NSString, but now it's converted to nil, which cannot be inserted into the NSDictionary.
Comment 1 David Kilzer (:ddkilzer) 2006-10-28 15:47:22 PDT
Occurs when submitting Bugzilla comments (see Bug 10933 Comment #8).
Comment 2 Darin Adler 2006-10-29 10:08:31 PST
Fixed in r17408. (I didn't know about this bug report when I fixed it.)
Comment 3 Darin Adler 2006-10-29 10:10:01 PST
We need a layout test for this.
Comment 4 mitz 2006-10-29 10:49:38 PST
Created attachment 11275 [details]
Layout test
Comment 5 Geoffrey Garen 2006-10-29 11:03:21 PST
Committed revision 17419.
Comment 6 Timothy Hatcher 2006-10-29 21:56:34 PST
Comment on attachment 11275 [details]
Layout test

THis landed.