Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369001 - NPE in mirror.js when setMode not called
Summary: NPE in mirror.js when setMode not called
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 14:25 EST by Felipe Heidrich CLA
Modified: 2012-01-18 17:39 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2012-01-18 14:25:29 EST
If the mirror styler is called before setMode is called is barfs this exception:
mode is null
getState(lineIndex=0)mirror.js (line 532)
highlight(startLine=0, endLine=20, partial=true)mirror.js (line 409)
onLineStyle(e=Object { type="LineStyle", textView={...}, lineIndex=0, more...})mirror.js (line 729)
onLineStyle(e=Object { type="LineStyle", textView={...}, lineIndex=0, more...})mirror.js (line 684)
dispatchEvent(evt=Object { type="LineStyle", textView={...}, lineIndex=0, more...})eventTarget.js (line 72)
onLineStyle(lineStyleEvent=Object { type="LineStyle", textView={...}, lineIndex=0, more...})textView.js (line 874)
_createLine(parent=DocumentFragment { constructor=DocumentFragment, nodeName="#document-fragment", nodeType=11, more...}, div=null, document=Document about:blank, lineIndex=0, model=Object { _lastLineIndex=0, _text=[1], _lineOffsets=[66], more...})textView.js (line 3354)
_updatePage(hScrollOnly=undefined)textView.js (line 5783)
_createContent()textView.js (line 3892)
_createViewTimer()textView.js (line 3746)
[Break On This Error] 	

return mode.startState();

mirror.js (line 532)