Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin-ext] NPE in TextEditorPropertiesMain.getOptionsFromEditor #2258

Closed
AlexTugarev opened this issue Jul 3, 2018 · 5 comments
Closed
Assignees
Labels
bug bugs found in the application plug-in system issues related to the plug-in system Team: Che-Editors issues regarding the che-editors team

Comments

@AlexTugarev
Copy link
Contributor

Reproducible with opening bundle.js from examples/browser and scrolling down.

Uncaught Error: Cannot read property 'isDisposed' of undefined

TypeError: Cannot read property 'isDisposed' of undefined
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.getOptionsFromEditor (text-editor-main.ts:364)
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.readFromEditor (text-editor-main.ts:342)
    at TextEditorMain.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorMain.updateProperties (text-editor-main.ts:56)
    at text-editor-main.ts:94
    at Emitter.fire (event.ts:140)
    at ViewOutgoingEvents.viewEventBus.onDidScroll (codeEditorWidget.ts:433)
    at ViewOutgoingEvents.emitScrollChanged (viewOutgoingEvents.ts:45)
    at View.onScrollChanged (viewImpl.ts:333)
    at ViewEventHandler.handleEvents (viewEventHandler.ts:164)
    at ViewEventDispatcher._doConsumeQueue (viewEventDispatcher.ts:89)
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.getOptionsFromEditor (text-editor-main.ts:364)
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.readFromEditor (text-editor-main.ts:342)
    at TextEditorMain.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorMain.updateProperties (text-editor-main.ts:56)
    at text-editor-main.ts:94
    at Emitter.fire (event.ts:140)
    at ViewOutgoingEvents.viewEventBus.onDidScroll (codeEditorWidget.ts:433)
    at ViewOutgoingEvents.emitScrollChanged (viewOutgoingEvents.ts:45)
    at View.onScrollChanged (viewImpl.ts:333)
    at ViewEventHandler.handleEvents (viewEventHandler.ts:164)
    at ViewEventDispatcher._doConsumeQueue (viewEventDispatcher.ts:89)
    at errors.ts:81
@AlexTugarev AlexTugarev added plug-in system issues related to the plug-in system bug bugs found in the application labels Jul 3, 2018
@evidolob evidolob added the Team: Che-Editors issues regarding the che-editors team label Jul 4, 2018
@kittaakos
Copy link
Contributor

Another way to reproduce:

  • Open a WS with Java files.
  • Wait until the LS starts. It is started when you get the redundant warnings.
  • Close the editor.
  • See the error.

@evidolob
Copy link
Contributor

evidolob commented Aug 1, 2018

@AlexTugarev I try to reproduce this bug, but I can't. Can you confirm that bug is still exists?

@kittaakos
Copy link
Contributor

I can. Same steps as described here: #2258 (comment).

  • Use c5554c8.
  • Start a new Theia WS.
  • Open the eclipse.jdt.ls as the root.
  • Wait until the LS is initialized.
  • Open AbstractProjectImporter.java (probably same with other files too).
  • Then close the editor.
errors.ts:81 Uncaught Error: Cannot read property 'isDisposed' of undefined

TypeError: Cannot read property 'isDisposed' of undefined
    at Function.push.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.getOptionsFromEditor (text-editor-main.ts:364)
    at Function.push.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.readFromEditor (text-editor-main.ts:342)
    at TextEditorMain.push.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorMain.updateProperties (text-editor-main.ts:56)
    at text-editor-main.ts:94
    at Emitter.fire (event.ts:140)
    at ViewOutgoingEvents.viewEventBus.onDidScroll (codeEditorWidget.ts:433)
    at ViewOutgoingEvents.emitScrollChanged (viewOutgoingEvents.ts:45)
    at View.onScrollChanged (viewImpl.ts:333)
    at ViewEventHandler.handleEvents (viewEventHandler.ts:164)
    at ViewEventDispatcher._doConsumeQueue (viewEventDispatcher.ts:89)
    at Function.push.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.getOptionsFromEditor (text-editor-main.ts:364)
    at Function.push.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.readFromEditor (text-editor-main.ts:342)
    at TextEditorMain.push.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorMain.updateProperties (text-editor-main.ts:56)
    at text-editor-main.ts:94
    at Emitter.fire (event.ts:140)
    at ViewOutgoingEvents.viewEventBus.onDidScroll (codeEditorWidget.ts:433)
    at ViewOutgoingEvents.emitScrollChanged (viewOutgoingEvents.ts:45)
    at View.onScrollChanged (viewImpl.ts:333)
    at ViewEventHandler.handleEvents (viewEventHandler.ts:164)
    at ViewEventDispatcher._doConsumeQueue (viewEventDispatcher.ts:89)
    at errors.ts:81

@AlexTugarev
Copy link
Contributor Author

Thanks @kittaakos! You've been faster. @evidolob, that bug is still there. I can confirm it happens on editor close as described by @kittaakos.

@evidolob
Copy link
Contributor

evidolob commented Aug 1, 2018

Thank you for quick response, I start work on it.

@evidolob evidolob self-assigned this Aug 1, 2018
evidolob added a commit that referenced this issue Aug 1, 2018
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
evidolob added a commit that referenced this issue Aug 2, 2018
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob closed this as completed Aug 2, 2018
marcdumais-work pushed a commit to marcdumais-work/theia that referenced this issue Oct 15, 2018
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application plug-in system issues related to the plug-in system Team: Che-Editors issues regarding the che-editors team
Projects
None yet
Development

No branches or pull requests

3 participants