Page MenuHomePhabricator

Quickly canceling <maplink> popup crashes it
Closed, ResolvedPublic

Description

On http://vem.wmflabs.org/wiki/Main_Page - click any maplink, and while it opens, hit escape. Result - blank screen. Hitting escape again closes the blank screen, but shows the original page as washed out (semi transparent).

Event Timeline

Yurik created this task.Aug 27 2016, 4:29 AM
Restricted Application added a project: Discovery. · View Herald TranscriptAug 27 2016, 4:29 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Yurik added a comment.Aug 27 2016, 4:41 AM

A bit of debugging with ?debug=true shows an error in this code:

	_clearPanes: function () {
		this._container.removeChild(this._mapPane);
	},
mapbox-lib.js?0bd89:2144 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
  _clearPanes    @ mapbox-lib.js?0bd89:2144
  remove    @ mapbox-lib.js?0bd89:1913
  remove    @ Map.js?e9e5a:656
  (anonymous function)    @ dialog.js?9b28e:91
  (anonymous function)    @ oojs-ui-windows.js?aa505:844
  (anonymous function)    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3305
  fire    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3148
  add    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3194
  (anonymous function)    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3304
  each    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:384
  (anonymous function)    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3301
  Deferred    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3361
  then    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3300
  OO.ui.Process.execute    @ oojs-ui-windows.js?aa505:881
  OO.ui.Window.setup    @ oojs-ui-windows.js?aa505:2216
  render    @ index.js?72b5a:71
  (anonymous function)    @ Link.js?3e880:109
  fire    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3148
  add    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3194
  module.Link.Link.openFullScreen    @ Link.js?3e880:108
  (anonymous function)    @ maplink.js?5dd51:100
  matchRoute    @ oojs-router.js?f0f4f:29
  (anonymous function)    @ oojs-router.js?f0f4f:94
  each    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:392
  Router.checkRoute    @ oojs-router.js?f0f4f:93
  (anonymous function)    @ oojs-router.js?f0f4f:69
  oo.EventEmitter.emit    @ oojs.jquery.js?d40c1:775
  (anonymous function)    @ oojs-router.js?f0f4f:55
  dispatch    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:4670
  elemData.handle    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:4338

mapbox-lib.js?0bd89:2144 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
  _clearPanes    @ mapbox-lib.js?0bd89:2144
  remove    @ mapbox-lib.js?0bd89:1913
  remove    @ Map.js?e9e5a:656
  (anonymous function)    @ dialog.js?9b28e:120
  (anonymous function)    @ oojs-ui-windows.js?aa505:844
  (anonymous function)    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3305
  fire    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3148
  add    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3194
  (anonymous function)    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3304
  each    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:384
  (anonymous function)    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3301
  Deferred    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3361
  then    @ load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1c1ysbx:3300
  OO.ui.Process.execute    @ oojs-ui-windows.js?aa505:881
  OO.ui.Window.teardown    @ oojs-ui-windows.js?aa505:2282
  (anonymous function)    @ oojs-ui-windows.js?aa505:1407
JGirault moved this task from Backlog to In progress on the Maps-Sprint board.Aug 29 2016, 2:48 PM

Change 307299 had a related patch set uploaded (by JGirault):
Map should be destroyed as soon as the dialog closes.

https://gerrit.wikimedia.org/r/307299

Change 307299 merged by jenkins-bot:
Map should be destroyed as soon as the dialog closes.

https://gerrit.wikimedia.org/r/307299

Yurik closed this task as Resolved.Aug 29 2016, 3:52 PM
Yurik claimed this task.

awesome and quick fix @JGirault, thanks!!!