Bug 117070 - [Qt][WK2] Newly added editing/selection/caret-after-keypress.html crashing
Summary: [Qt][WK2] Newly added editing/selection/caret-after-keypress.html crashing
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eugene Klyuchnikov
URL:
Keywords: Qt
Depends on: 110742
Blocks: 42194 79668
  Show dependency treegraph
 
Reported: 2013-05-31 06:12 PDT by Zoltan Arvai
Modified: 2014-02-03 03:25 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2013-05-31 06:51 PDT, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Patch (1.92 KB, patch)
2013-05-31 06:53 PDT, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Patch (2.68 KB, patch)
2013-06-03 22:01 PDT, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Arvai 2013-05-31 06:12:54 PDT
crash log for WebProcess (pid <unknown>):
STDOUT: <empty>
STDERR: Received an invalid message "WebContextLegacyMessage.PostSynchronousMessage" from the web process.

http://build.webkit.sed.hu/results/x86-32%20Linux%20Qt%20Release%20WebKit2/r151013%20%2835908%29/results.html

backtrace
https://gist.github.com/azbesthu/5684836
Comment 1 Eugene Klyuchnikov 2013-05-31 06:38:09 PDT
posting messages in WK2 test causes crash.

I'll add TextExpectation.
Comment 2 Ádám Kallai 2013-05-31 06:41:31 PDT
It have been landed in http://trac.webkit.org/changeset/151014. :)
Comment 3 Eugene Klyuchnikov 2013-05-31 06:51:08 PDT
Created attachment 203440 [details]
Patch
Comment 4 Eugene Klyuchnikov 2013-05-31 06:53:55 PDT
Created attachment 203442 [details]
Patch
Comment 5 Eugene Klyuchnikov 2013-05-31 06:56:24 PDT
Well, I've moved expectation, because there is a meta-bug that is responsible
for the whole a group of tests that fail on WK2.
Comment 6 Zoltan Arvai 2013-05-31 07:03:45 PDT
(In reply to comment #5)
> Well, I've moved expectation, because there is a meta-bug that is responsible
> for the whole a group of tests that fail on WK2.

Yes, that sounds reasonable. Probably the change can be landed without review like most of the unreviewed gardening patches.
Comment 7 Eugene Klyuchnikov 2013-05-31 08:22:05 PDT
Committed r151015: <http://trac.webkit.org/changeset/151015>
Comment 8 Ryosuke Niwa 2013-05-31 09:29:08 PDT
But why is this causing a crash?
Comment 9 Eugene Klyuchnikov 2013-06-02 23:39:26 PDT
In new test we use "eventSender.keyDown".

As it is said in https://bugs.webkit.org/show_bug.cgi?id=42194 :
"WebKitTestRunner needs an implementation of eventSender. Many tests fail because of this (hundreds)."

What I see in stack trace: in WebPageProxy::didReceiveEvent in case of synchronous (test) keyboard event handling we face that type of first message in keyboard event queue is not the same as type of event we just appended to this queue.

Assertion that type of last message in queue is the same as first message in queue means that we expect that queue is never longer that 1 item (at least for synchronous case).

Stack trace has depth of 206 frames; there are 6 nested key events.

5 events are at "WebPageProxy.cpp:1395", invoked from handleKeyPressEvent.

6-th is at "WebPageProxy.cpp:1396", invoked from handleKeyReleaseEvent.
So, when test reaches exit condition and begins unrolling, the problem occurs.


I'm not sure, is it OK or NOK to nest eventSender.keyDown invocations.

I'll prepare asynchronous test to see if will make Qt5-WK bot happy.


(In reply to comment #8)
> But why is this causing a crash?
Comment 10 Eugene Klyuchnikov 2013-06-03 22:01:00 PDT
Created attachment 203650 [details]
Patch
Comment 11 Jocelyn Turcotte 2014-02-03 03:25:57 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.