Closed Bug 745788 Opened 12 years ago Closed 12 years ago

Intermittent a11y/accessible/treeupdate/test_imagemap.html | Test timed out

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: philor, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(3 files, 1 obsolete file)

See also several instances put in the SeaMonkey permaorange bug 738146.

https://tbpl.mozilla.org/php/getParsedLog.php?id=10940415&tree=Mozilla-Inbound
Rev3 WINNT 5.1 mozilla-inbound debug test mochitest-other on 2012-04-16 07:19:37 PDT for push 7775694dcfe5

23951 INFO TEST-INFO | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Invoke the 'restore @name on map element' test { expected 'hide' event; expected 'show' event; expected 'reorder' event;  }
NOTE: child process received `Goodbye', closing down
NPP_Destroy
NPP_Destroy
nsStringStats
 => mAllocCount:             94
 => mReallocCount:            1
 => mFreeCount:              94
 => mShareCount:            135
 => mAdoptCount:              0
 => mAdoptFreeCount:          0
WARNING: 1 sort operation has occurred for the SQL statement '0x14a1c800'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file e:/builds/moz2_slave/m-in-w32-dbg/build/storage/src/mozStoragePrivateHelpers.cpp, line 144
23952 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Test timed out.
(screenshot)
23953 INFO TEST-END | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | finished in 316285ms
Trevor, have you had a chance to take a look at this now the logging has landed? :-)
WARNING: NS_ENSURE_TRUE(parentObject) failed: file /builds/slave/m-beta-lnx64-dbg/build/accessible/src/atk/nsAccessibleWrap.cpp, line 1397
mozilla-beta debug test mochitest-other on 2012-06-23
Rev3 WINNT 6.1 mozilla-inbound opt test mochitest-other on 2012-06-24 13:50:19 PDT for push 85e7655b9ac0

24436 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Test timed out.

args: ['c:\\talos-slave\\test\\build\\bin\\screenshot.exe', 'c:\\users\\cltbld\\appdata\\local\\temp\\mozilla-test-fail_u-lnnn']
Boris, do you know if nsImageMap::UpdateAreas() (http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsImageMap.cpp#793) might not trigger when setting up @name attribute on map element:

<map id="map">
  <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b"
        coords="17,0,30,14" alt="b" shape="rect">
</map>

<img id="imgmap" width="447" height="15"
         usemap="#atoz_map"
         src="../letters.gif">

mapNode.setAttribute("name", "atoz_map");
Changing @name on the <map> element won't trigger UpdateAreas(), but it _will_ trigger mImageFrame->DisconnectMap().
(In reply to Boris Zbarsky (:bz) from comment #223)
> Changing @name on the <map> element won't trigger UpdateAreas(), but it
> _will_ trigger mImageFrame->DisconnectMap().

oh, right. How long that 'will' can be? Can the mochitest run out of time waiting for it?
DisconnectMap() just calls Destroy() on the nsImageMap, nulls out the pointer, and recreates the accessible for the image.

How long that will take depends on how many areas there are, obviously.  But I would not expect it to take more than "milliseconds".
Attached patch patchSplinter Review
enable more logging
Attachment #665289 - Flags: review?(trev.saunders)
Attachment #665289 - Flags: review?(trev.saunders) → review+
I think I've figured out the problem here.

We hang in 'insert map element'. There is already an image visible in the window, with a usemap attribute pointing to a nonexistent element. The test adds a <map> element with the id referenced by usemap. The test expects accessibility events indicating that the image was removed and replaced by the map, but not such events arrive.

The reason is that there is simply nothing to trigger any activity when the map element is added. The reason this test sometimes passes is that when we paint the image, nsImageFrame::PaintImage calls GetImageMap which checks the DOM to see if usemap points to a <map>. But if nothing causes the image to be repainted, we won't ever notice the <map> has been created.
Note that also, if the image is offscreen, we won't ever paint it and these accessibility events will not be dispatched.
The best fix for this is probably to have nsImageFrame use nsReferencedElement to find its map. nsReferencedElement knows how to handle this case.
Attached patch workaround imagemap bug (obsolete) — Splinter Review
Assignee: nobody → roc
Attachment #665776 - Flags: review?(trev.saunders)
I don't want to fix imagemaps right now.
Attachment #665776 - Flags: review?(trev.saunders) → review+
Attached patch fixSplinter Review
Cleaned up to remove debugging printfs. carrying forward r+.
Attachment #665776 - Attachment is obsolete: true
Attachment #665780 - Flags: review+
Whiteboard: [orange] → [orange][leave open]
(In reply to TinderboxPushlog Robot from comment #357)
> Ms2ger%gmail.com
> https://tbpl.mozilla.org/php/getParsedLog.php?id=15732143&tree=Mozilla-

{
24915 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Wrong last child of ['img@id="imgmap" node', address: 0xc26c1a8, role: graphic, address: 0x1e5349b0] - null should equal null
24916 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | test with ID = 'remove @name on map element' failed. No hide event.
24917 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | test with ID = 'remove @name on map element' failed. No show event.
24918 INFO TEST-PASS | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | test with ID = 'remove @name on map element' failed. No reorder event.

registered: event type: hide, target: getImageMap, arg: [object Object]

registered: event type: show, target: [ 'img@id="imgmap" node', address: 0xc26c1a8 ]

registered: event type: reorder, target: ['div@id="container" node', address: 0x27199040, role: section, address: 0x21a98598]

Event queue:
  invoke: restore @name on map element
24919 INFO TEST-INFO | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Invoke the 'restore @name on map element' test { expected 'hide' event; expected 'show' event; expected 'reorder' event;  }
--DOMWINDOW == 312 (21E1FAE8) [serial = 516] [outer = 00000000] [url = data:text/html,<html><input></html>]
--DOMWINDOW == 311 (21E1D248) [serial = 515] [outer = 00000000] [url = about:blank]
--DOMWINDOW == 310 (1187DCE8) [serial = 369] [outer = 00000000] [url = about:blank]
NOTE: child process received `Goodbye', closing down
WARNING: pipe error: 109: file e:/builds/moz2_slave/m-in-w32-dbg/build/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 294
NPP_Destroy
NPP_Destroy
nsStringStats
 => mAllocCount:             98
 => mReallocCount:            1
 => mFreeCount:              98
 => mShareCount:            141
 => mAdoptCount:              0
 => mAdoptFreeCount:          0
WARNING: 1 sort operation has occurred for the SQL statement '0x1eaae668'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file e:/builds/moz2_slave/m-in-w32-dbg/build/storage/src/mozStoragePrivateHelpers.cpp, line 110
WARNING: 1 sort operation has occurred for the SQL statement '0x1eaae668'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file e:/builds/moz2_slave/m-in-w32-dbg/build/storage/src/mozStoragePrivateHelpers.cpp, line 110
WARNING: 1 sort operation has occurred for the SQL statement '0x1eab0e68'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file e:/builds/moz2_slave/m-in-w32-dbg/build/storage/src/mozStoragePrivateHelpers.cpp, line 110
WARNING: 1 sort operation has occurred for the SQL statement '0x1eab0f68'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file e:/builds/moz2_slave/m-in-w32-dbg/build/storage/src/mozStoragePrivateHelpers.cpp, line 110
24920 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Test timed out.
}
Aside from the tilt failures, this is the next most frequent orange of the last few days; test has been temporarily disabled until this is fixed:
http://hg.mozilla.org/integration/mozilla-inbound/rev/64fce23853df
Whiteboard: [orange][leave open] → [orange][test disabled][leave open]
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #264)
> I think I've figured out the problem here.
> 
> We hang in 'insert map element'.

It seems we hang on 'restore @name on map element', at least mostly. Robert, does your trick should help in this case as well? (refer to comment 222).
Ok log:

registered: event type: hide, target: getImageMap, arg: [object Object]

registered: event type: show, target: [ 'img@id="imgmap" node', address: 0xeef0280 ]

registered: event type: reorder, target: ['div@id="container" node', address: 0x9263760, role: section, address: 0x7b23110]

Event queue:
  invoke: restore @name on map element
24820 INFO TEST-INFO | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Invoke the 'restore @name on map element' test { expected 'hide' event; expected 'show' event; expected 'reorder' event;  }

A11Y TREE: accessible recreated; 44:20.166
  {
    content: 0xeef0280, img@id='imgmap', idx in parent: 1
  }

A11Y TREE: process content removal; 44:20.166
  {
    container: 0x9263760, div@id='container', idx in parent: 11
    child: 0xeef0280, img@id='imgmap', idx in parent: 1
    child accessible: 0x75b9020, node: 0xeef0280
    document: 0xe0f9220, node: 0x95ba300
    uri: chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html
  }

A11Y TREE: process content insertion; 44:20.173
  {
    container: 0x9263760, div@id='container', idx in parent: 11
    child: 0xeef0280, img@id='imgmap', idx in parent: 1
    child accessible: 0x5ba37b0, node: 0xeef0280
    document: 0xe0f9220, node: 0x95ba300
    uri: chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html
  }

Event type: hide. Target: ['img@id="imgmap" node', address: 0xeef0280, role: graphic, address: 0x75b9020]. Listeners count: 1

*****
EQ matched: hide
*****

Event type: hide. Target: ['img@id="imgmap" node', address: 0xeef0280, role: graphic, address: 0x75b9020]

Event type: text removed, start: 0, length: 1, removed text: . Target: ['div@id="container" node', address: 0x9263760, role: section, address: 0x7b23110]

Event type: text removed, start: 0, length: 1, removed text: . Target: ['div@id="container" node', address: 0x9263760, role: section, address: 0x7b23110]

Event type: show. Target: ['img@id="imgmap" node', address: 0xeef0280, role: image map, address: 0x5ba37b0]. Listeners count: 1

*****
EQ matched: show
*****

Event type: show. Target: ['img@id="imgmap" node', address: 0xeef0280, role: image map, address: 0x5ba37b0]

Event type: text inserted, start: 0, length: 1, inserted text: . Target: ['div@id="container" node', address: 0x9263760, role: section, address: 0x7b23110]

Event type: text inserted, start: 0, length: 1, inserted text: . Target: ['div@id="container" node', address: 0x9263760, role: section, address: 0x7b23110]

Event type: reorder. Target: ['div@id="container" node', address: 0x9263760, role: section, address: 0x7b23110]. Listeners count: 1

*****
EQ matched: reorder
*****
Not ok log:

registered: event type: hide, target: getImageMap, arg: [object Object]

registered: event type: show, target: [ 'img@id="imgmap" node', address: 0x14062bb8 ]

registered: event type: reorder, target: ['div@id="container" node', address: 0x12ff85c8, role: section, address: 0x2087f418]

Event queue:
  invoke: restore @name on map element
24888 INFO TEST-INFO | chrome://mochitests/content/a11y/accessible/treeupdate/test_imagemap.html | Invoke the 'restore @name on map element' test { expected 'hide' event; expected 'show' event; expected 'reorder' event;  }
--DOCSHELL 20CDB058 == 6 [id = 109]
--DOMWINDOW == 313 (20D1C078) [serial = 513] [outer = 00000000] [url = about:blank]
--DOMWINDOW == 312 (13274D08) [serial = 514] [outer = 00000000] [url = about:blank]
--DOMWINDOW == 311 (1445F488) [serial = 516] [outer = 00000000] [url = data:text/html,<html><input></html>]
--DOMWINDOW == 310 (206472D0) [serial = 515] [outer = 00000000] [url = about:blank]
NOTE: child process received `Goodbye', closing down
We never receive RecreateAccessible (per logs above) so I assume mImageFrame->DisconnectMap() is never called (see comment #223).
Attached patch patchSplinter Review
enable test, opacity thing doesn't work well, mouse over seems better
Assignee: roc → surkov.alexander
Status: NEW → ASSIGNED
Attachment #669033 - Flags: review?(trev.saunders)
Comment on attachment 669033 [details] [diff] [review]
patch

ok :(
Attachment #669033 - Flags: review?(trev.saunders) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/7dbbd3190422

I filed bug 799781 to remove hacks.
Whiteboard: [orange][test disabled][leave open] → [orange]
Target Milestone: --- → mozilla18
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: mozilla18 → mozilla19
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.