Open Bug 1116205 Opened 7 years ago Updated 10 months ago

test_texteditor_keyevent_handling.html fails when run as a standalone directory

Categories

(Core :: DOM: Editor, defect, P5)

All
Windows 7
defect

Tracking

()

People

(Reporter: vaibhav1994, Unassigned)

References

Details

in bug 1110982, we are looking to enable tests where we run a fresh browser instance per directory.  Usually what happens is that a few tests fail because they accidentally depend on the state of the browser from an earlier test.

In the try runs, we have narrowed down the cause.
In this try run: 
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=5ca4034cbb09

We can see there is a leak:
 TEST-UNEXPECTED-FAIL | leakcheck | default process: 1000 bytes leaked (TSFStaticSink, nsBaseWidget, nsTArray_base, nsTextStore, nsWeakReference, ...) 

Whereas, in this try run:
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=5a79754b581b

There is no leak. 

This leak occurs on Windows 7 debug and Windows 8 x64 debug.
Blocks: 1110982
I have added the appropriate folks to the cc list who have a history of working on this test case.

In looking at the test file:
http://dxr.mozilla.org/mozilla-central/source/editor/libeditor/tests/test_texteditor_keyevent_handling.html

I don't see anything specific that jumps out as a source of the leak.  My win7 VM is sort of broken, I need to rebuild it before I can get python running on there again, so I haven't verified this.  

I assume you can do this:
./mach mochitest-chrome editor/libeditor/tests

Masayuki, can you look at this and help determine where the failure might be?
Flags: needinfo?(masayuki)
Sorry for the delay to reply.

I have no idea why they are leaked by running a test. It sounds like that some nsWindow instances are still alive at shutting down:
http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsWindow.cpp?rev=bb5356f6a251#444

How can I make a leak of an instance of nsIWidget??
Flags: needinfo?(masayuki)
this is showing a failure still:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=198be18d5e85

what is odd is that now on linux* we are getting a bunch of failures!  Luckily those errors are repeatable on a local build, which are all related to the delete key:
https://dxr.mozilla.org/mozilla-central/source/editor/libeditor/tests/test_texteditor_keyevent_handling.html?from=test_texteditor_keyevent_handling.html&case=true#178

If I comment out the entire delete key section locally on linux, I get no failures.  I do wonder if the leak would go away on windows, etc.

Masayuki, do you have ideas on how to narrow this leak down?  any concerns with disabling this test on windows debug until you have time to look into it?
Flags: needinfo?(masayuki)
we still get leaks on windows debug while having the delete stuff commented out, so something else will need to get fixed here.
We only have a few tests left, I would like to disable this test case for os=='linux' and windows debug, so we can move forward with --run-by-dir by the end of the week.

If we can hack on this test case, I would be happy to work on fixing this vs disabling it.
clearing the needinfo here
Flags: needinfo?(masayuki)

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.