Bug 128775 - Assertion on google.com in NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator seen with WinCairo
Summary: Assertion on google.com in NonSharedCharacterBreakIterator::NonSharedCharacte...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 8
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-13 16:22 PST by Alex Christensen
Modified: 2014-02-19 19:30 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2014-02-13 16:22:16 PST
The ASSERT_WITH_MESSAGE in initializeIterator in TextBreakIterator.cpp fails when an XmlHttpRequest is sent from a webpage like typing the first character into google.com.

Here's the stack.  I'm not sure what's going on.

 	WTF.dll!WTFCrash() Line 333	C++
>	WebKit.dll!WebCore::initializeIterator(UBreakIteratorType type, const char * locale) Line 41	C++
 	WebKit.dll!WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator(WTF::StringView string) Line 295	C++
 	WebKit.dll!WebCore::numCharactersInGraphemeClusters(const WTF::String & s, unsigned int numGraphemeClusters) Line 390	C++
 	WebKit.dll!WebCore::limitLength(const WTF::String & string, int maxLength) Line 354	C++
 	WebKit.dll!WebCore::TextFieldInputType::handleBeforeTextInsertedEvent(WebCore::BeforeTextInsertedEvent * event) Line 402	C++
 	WebKit.dll!WebCore::HTMLInputElement::defaultEventHandler(WebCore::Event * evt) Line 1177	C++
 	WebKit.dll!WebCore::TextControlInnerTextElement::defaultEventHandler(WebCore::Event * event) Line 109	C++
 	WebKit.dll!WebCore::callDefaultEventHandlersInTheBubblingOrder(WebCore::Event & event, const WebCore::EventPath & path) Line 234	C++
 	WebKit.dll!WebCore::EventDispatcher::dispatchEvent(WebCore::Node * origin, WTF::PassRefPtr<WebCore::Event> prpEvent) Line 339	C++
 	WebKit.dll!WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event> event) Line 2037	C++
 	WebKit.dll!WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event> event, int & ec) Line 152	C++
 	WebKit.dll!WebCore::dispatchBeforeTextInsertedEvent(const WTF::String & text, const WebCore::VisibleSelection & selectionForInsertion, bool insertionIsForUpdatingComposition) Line 68	C++
 	WebKit.dll!WebCore::TypingCommand::insertText(WebCore::Document & document, const WTF::String & text, const WebCore::VisibleSelection & selectionForInsertion, unsigned int options, WebCore::TypingCommand::TextCompositionType compositionType) Line 168	C++
 	WebKit.dll!WebCore::Editor::insertTextWithoutSendingTextEvent(const WTF::String & text, bool selectInsertedText, WebCore::TextEvent * triggeringEvent) Line 1220	C++
 	WebKit.dll!WebCore::Editor::handleTextEvent(WebCore::TextEvent * event) Line 283	C++
 	WebKit.dll!WebCore::EventHandler::defaultTextInputEventHandler(WebCore::TextEvent * event) Line 3312	C++
 	WebKit.dll!WebCore::Node::defaultEventHandler(WebCore::Event * event) Line 2120	C++
 	WebKit.dll!WebCore::HTMLTextFormControlElement::defaultEventHandler(WebCore::Event * event) Line 114	C++
 	WebKit.dll!WebCore::HTMLInputElement::defaultEventHandler(WebCore::Event * evt) Line 1190	C++
 	WebKit.dll!WebCore::callDefaultEventHandlersInTheBubblingOrder(WebCore::Event & event, const WebCore::EventPath & path) Line 234	C++
 	WebKit.dll!WebCore::EventDispatcher::dispatchEvent(WebCore::Node * origin, WTF::PassRefPtr<WebCore::Event> prpEvent) Line 339	C++
 	WebKit.dll!WebCore::Node::dispatchEvent(WTF::PassRefPtr<WebCore::Event> event) Line 2037	C++
 	WebKit.dll!WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr<WebCore::Event> event, int & ec) Line 152	C++
 	WebKit.dll!WebCore::EventHandler::handleTextInputEvent(const WTF::String & text, WebCore::Event * underlyingEvent, WebCore::TextEventInputType inputType) Line 3277	C++
 	WebKit.dll!WebCore::Editor::insertText(const WTF::String & text, WebCore::Event * triggeringEvent) Line 1167	C++
 	WebKit.dll!WebView::handleEditingKeyboardEvent(WebCore::KeyboardEvent * evt) Line 2025	C++
 	WebKit.dll!WebEditorClient::handleKeyboardEvent(WebCore::KeyboardEvent * evt) Line 628	C++
 	WebKit.dll!WebCore::Editor::handleKeyboardEvent(WebCore::KeyboardEvent * event) Line 244	C++
 	WebKit.dll!WebCore::EventHandler::defaultKeyboardEventHandler(WebCore::KeyboardEvent * event) Line 3021	C++
 	WebKit.dll!WebCore::Node::defaultEventHandler(WebCore::Event * event) Line 2105	C++
 	WebKit.dll!WebCore::HTMLTextFormControlElement::defaultEventHandler(WebCore::Event * event) Line 114	C++
 	WebKit.dll!WebCore::HTMLInputElement::defaultEventHandler(WebCore::Event * evt) Line 1129	C++
 	WebKit.dll!WebCore::callDefaultEventHandlersInTheBubblingOrder(WebCore::Event & event, const WebCore::EventPath & path) Line 234	C++
 	WebKit.dll!WebCore::EventDispatcher::dispatchEvent(WebCore::Node * origin, WTF::PassRefPtr<WebCore::Event> prpEvent) Line 339	C++
 	WebKit.dll!WebCore::Element::dispatchKeyEvent(const WebCore::PlatformKeyboardEvent & platformEvent) Line 284	C++
 	WebKit.dll!WebCore::EventHandler::keyEvent(const WebCore::PlatformKeyboardEvent & initialKeyEvent) Line 2865	C++
 	WebKit.dll!WebView::keyPress(unsigned int charCode, long keyData, bool systemKeyDown) Line 2115	C++
 	WebKit.dll!WebView::WebViewWndProc(HWND__ * hWnd, unsigned int message, unsigned int wParam, long lParam) Line 2277	C++
Comment 1 Brent Fulgham 2014-02-13 16:25:42 PST
I've been tracking down some bugs in Windows code where it assumes it will always be handed 16-bit strings. Recent work has turned on a lot of 8-bit code paths, and I'll bet we have a similar situation here.

I'll try to get to it shortly. But for now, look for "data16" or "character16" calls being made. There might be assertions firing when it discovers that the string is an "is8Bit" type string.
Comment 2 Alexey Proskuryakov 2014-02-14 09:59:16 PST
Perhaps a regression from <http://trac.webkit.org/changeset/162184>?
Comment 3 Alex Christensen 2014-02-14 13:13:16 PST
The call to event->defaultHandled() in EventHandler::handleTextInputEvent calls EventTarget::dispatchEvent with an Event of NULL and an ExceptionCode of -858993460.  Everything before this call seems ok, everything after this call seems to be dealing with invalid data.
Comment 4 Alex Christensen 2014-02-19 19:30:30 PST
The issue was that the call to ubrk_open was returning null.  I was wondering why nobody else was running into such a major problem.  I isolated it to my build of icu.  Brent's build works fine.  This is not a bug in WebKit or in WinCairoRequirements.  Just on my local experimental icu build.  Sorry for the fuss.