Closed
Bug 933883
Opened 11 years ago
Closed 11 years ago
ASSERTION: password length not equal to number of asterisks
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: gwagner, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
1.04 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Constant assertion on b2g emulator tests:
https://tbpl.mozilla.org/php/getParsedLog.php?id=29959039&tree=Pine&full=1#error0
01:14:42 INFO - --DOMWINDOW == 32 (0x4401175c) [serial = 887] [outer = 0x0] [url = http://mochi.test:8888/tests/layout/forms/test/test_bug378670.html]
01:14:42 INFO - --DOMWINDOW == 31 (0x4400f14c) [serial = 795] [outer = 0x0] [url = http://mochi.test:8888/tests/layout/base/tests/bug612271-2.html]
01:14:47 INFO - --DOMWINDOW == 30 (0x44e81cbc) [serial = 835] [outer = 0x0] [url = http://mochi.test:8888/tests/layout/base/tests/bug646382-1.html]
01:14:47 INFO - [Child 709] WARNING: NS_ENSURE_TRUE(selCon) failed: file ../../../../gecko/editor/libeditor/base/nsEditor.cpp, line 612
01:14:47 INFO - [Child 709] WARNING: NS_ENSURE_TRUE(selcon) failed: file ../../../../gecko/editor/libeditor/base/nsEditor.cpp, line 634
01:14:47 INFO - [Child 709] WARNING: NS_ENSURE_SUCCESS(res, __null) failed with result 0xC1F30001: file ../../../../gecko/editor/libeditor/base/nsEditor.cpp, line 643
01:14:47 INFO - [Child 709] WARNING: NS_ENSURE_TRUE(selection) failed: file ../../../../gecko/editor/libeditor/text/nsTextEditRules.cpp, line 1284
01:14:47 INFO - [Child 709] WARNING: NS_ENSURE_TRUE(mRootElement) failed: file ../../../../gecko/editor/libeditor/base/nsEditor.cpp, line 2156
01:14:47 INFO - [Child 709] WARNING: NS_ENSURE_TRUE(rootElement) failed: file ../../../../gecko/editor/libeditor/text/nsPlaintextEditor.cpp, line 913
01:14:47 INFO - [Child 709] ###!!! ASSERTION: password length not equal to number of asterisks: 'mPasswordText.Length() == uint32_t(txtLen)', file ../../../../gecko/editor/libeditor/text/nsTextEditRules.cpp, line 1268
01:14:47 INFO - 824 INFO TEST-END | /tests/layout/forms/test/test_bug542914.html | finished in 10436ms
01:14:47 INFO - ++DOMWINDOW == 31 (0x4400f14c) [serial = 904] [outer = 0x4401053c]
01:14:47 INFO - 825 ERROR TEST-UNEXPECTED-FAIL | /tests/layout/forms/test/test_bug542914.html | Assertion count 1 is greater than expected range 0-0 assertions.
This blocks enabling debug emulator tests.
Comment 1•11 years ago
|
||
Ehsan, please take a look here
Assignee: nobody → ehsan
Flags: needinfo?(ehsan)
Updated•11 years ago
|
Component: Layout → Editor
Version: unspecified → Trunk
Assignee | ||
Comment 2•11 years ago
|
||
Hmm, what's on the Pine branch, Gregor? Can you please let me know what build environment I should use to reproduce this?
Thanks!
Flags: needinfo?(ehsan) → needinfo?(anygregor)
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #2)
> Hmm, what's on the Pine branch, Gregor? Can you please let me know what
> build environment I should use to reproduce this?
>
> Thanks!
The pine branch has debug emulator tests enabled. We want to get them on all trees but we have to fix all the assertions before. I don't know if there is an easy way to run the tests locally and it probably will be horrible slow.
jgriffin knows all the details about it.
Flags: needinfo?(anygregor)
Comment 4•11 years ago
|
||
This describes how to run the tests locally: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Mochitests
And yes, they are horribly slow...each chunk can take an hour of time, using a debug emulator.
Assignee | ||
Comment 5•11 years ago
|
||
Thanks! So, I only need B2G_DEBUG=1 in my .userconfig to get one of these builds, right?
(I'm building for ICS locally if that matters.)
Comment 6•11 years ago
|
||
Yep, B2G_DEBUG should do the trick.
Assignee | ||
Comment 7•11 years ago
|
||
OK, I figured out why this assertion happens. Inside this test, we synthesize an 'x' key, which triggers the asterisk inserting timer. Now, this timer is fired way after the input element has been removed from the document, and ASSERT_PASSWORD_LENGTHS_EQUAL tries to read the value from the editor class, which walks the DOM under the editor's root node, which doesn't exist any longer since we have lost our frame by that point, which makes GetTextLength() fail, and then we would compare mPasswordText.Length() against a value of 0.
The fix is simple, we should only call GetTextLength() when GetRoot() doesn't return null.
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #830356 -
Flags: review?(roc)
Attachment #830356 -
Flags: review?(roc) → review+
Assignee | ||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Assignee | ||
Comment 11•11 years ago
|
||
Gregor, can you please verify that this is indeed fixed? (The assertion goes away in my local build.)
I have a hard time finding this test failure message on Pine either before or after my patch...
Flags: needinfo?(anygregor)
Reporter | ||
Comment 12•11 years ago
|
||
The assertion went away when I pushed your patch. Thanks Ehsan!
Flags: needinfo?(anygregor)
You need to log in
before you can comment on or make changes to this bug.
Description
•