Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 485172

Summary: TypeError: Cannot read property '_clientDiv' of null (in rulers.js)
Product: [ECD] Orion Reporter: Grant Gayed <grant_gayed>
Component: ClientAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 10.0   
Target Milestone: 11.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Grant Gayed CLA 2016-01-04 13:36:12 EST
Our GA error logging has logged this error 24 times in the last two weeks (Chrome and Firefox clients).  The line is marked below:


_getTooltipInfo: function(contents, y, context) {
	if (!contents) { return null; } // TODO: shouldn't this check the length, it'll never be null
...
<snip>
...			
	var rulerLocation = this.getLocation();
	var rulerStyle = this.getRulerStyle();
	// The tooltip is positioned opposite to where the ruler is
	var position = rulerLocation === "left" ? "right" : "left"; //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$
					
	var viewRect = this._view._clientDiv.getBoundingClientRect(); // <---------

The stack:

TypeError: Cannot read property '_clientDiv' of null
    at Object.o.mixin._getTooltipInfo (/code/edit/edit.js:28:16089)
    at Object.i.onHover.getTooltipInfo (/code/edit/edit.js:28:14690)
    at Object.a.onHover (/code/edit/edit.js:26:2507)
Comment 1 Grant Gayed CLA 2016-01-06 16:05:44 EST
Moving to Curtis because it looks like the reference to this._view._clientDiv was introduced in the fix for Bug 453226.  Feel free to reassign if there's a better candidate to look into this.
Comment 2 Curtis Windatt CLA 2016-01-06 16:19:03 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=5dc6854a6cb9d5cae6a74dda5341d1a6f6dc071c
Fixed in master
We inconsistently check for a view in the ruler code.  On clicks we assume it is there, for other changes we check.  Clearly we need to check when trying to put a tooltip up.