facebook

Save Failed

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #536080 Reply

    Fedor Losev
    Participant

    I have a component which implements one interface with methods and one with optional properties (but no implementation in the body).

    After clicking on error mark, there is no suggest to implement interfaces and after this IDE goes completely unusable, getting errors below on any , even unrelated file save.

    
    Save Failed
    Error: Debug Failure. False expression: Scanner should be undefined
    
    
    java.lang.RuntimeException: The following request caused an error to be thrown:
    {"endpoint":"language","method":"getFormattingEditsForRange","arguments":["player-html","eclipse:......component.ts",0,579,{"ConvertTabsToSpaces":true,"IndentSize":2,"IndentStyle":2,"NewLineCharacter":"\r\n","TabSize":2,"InsertSpaceAfterCommaDelimiter":true,"InsertSpaceAfterSemicolonInForStatements":true,"InsertSpaceBeforeAndAfterBinaryOperators":true,"InsertSpaceAfterConstructor":false,"InsertSpaceAfterKeywordsInControlFlowStatements":true,"InsertSpaceAfterFunctionKeywordForAnonymousFunctions":false,"InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis":false,"InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets":false,"InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces":false,"InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces":false,"InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces":false,"InsertSpaceAfterTypeAssertion":false,"InsertSpaceBeforeFunctionParenthesis":false,"PlaceOpenBraceOnNewLineForFunctions":false,"PlaceOpenBraceOnNewLineForControlBlocks":false}]}
    	at com.genuitec.eclipse.typescript.services.internal.Bridge.processRequest(Bridge.java:226)
    	at com.genuitec.eclipse.typescript.services.internal.Bridge.call(Bridge.java:137)
    	at com.genuitec.eclipse.typescript.services.language.LanguageEndpoint.getFormattingEditsForRange(LanguageEndpoint.java:235)
    	at com.genuitec.eclipse.typescript.text.FileLanguageService.getFormattingEditsForRange(FileLanguageService.java:307)
    	at com.genuitec.eclipse.typescript.text.ContentFormatter.format(ContentFormatter.java:60)
    	at com.genuitec.eclipse.typescript.saveparticipant.internal.FormatAllSaveListener.saved(FormatAllSaveListener.java:23)
    	at com.genuitec.eclipse.typescript.text.TypeScriptEditor.doSave(TypeScriptEditor.java:183)
    	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7117)
    	at org.eclipse.ui.Saveable.doSave(Saveable.java:220)
    	at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:358)
    	at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:202)
    	at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:286)
    	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
    	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
    	at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2184)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2180)
    	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:294)
    	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:272)
    	at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:214)
    	at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:149)
    	at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3904)
    	at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3918)
    	at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:54)
    	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
    	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    	at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
    	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
    	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:286)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:507)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:558)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:378)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:324)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:86)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1270)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1078)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088)
    	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1130)
    	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1126)
    	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1547)
    	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4918)
    	at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:364)
    	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4799)
    	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359)
    	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110)
    	at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    	at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2446)
    	at org.eclipse.swt.internal.BidiUtil.windowProc(BidiUtil.java:701)
    	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3822)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
    Caused by: com.genuitec.eclipse.typescript.services.internal.Bridge$BridgeException: Error: Debug Failure. False expression: Scanner should be undefined
    	at Object.assert(C:\dv\tools\eclipse-neon-angular4\plugins\com.genuitec.eclipse.typescript_2.3.4.201707051045\bin\typescript\2.3.4\node_modules\typescript\lib\typescript.js:3329:23)
    	at Object.getFormattingScanner(C:\dv\tools\eclipse-neon-angular4\plugins\com.genuitec.eclipse.typescript_2.3.4.201707051045\bin\typescript\2.3.4\node_modules\typescript\lib\typescript.js:80520:22)
    	at <static>.formatSpan(C:\dv\tools\eclipse-neon-angular4\plugins\com.genuitec.eclipse.typescript_2.3.4.201707051045\bin\typescript\2.3.4\node_modules\typescript\lib\typescript.js:82139:237)
    	at Object.formatSelection(C:\dv\tools\eclipse-neon-angular4\plugins\com.genuitec.eclipse.typescript_2.3.4.201707051045\bin\typescript\2.3.4\node_modules\typescript\lib\typescript.js:81959:20)
    	at Object.getFormattingEditsForRange(C:\dv\tools\eclipse-neon-angular4\plugins\com.genuitec.eclipse.typescript_2.3.4.201707051045\bin\typescript\2.3.4\node_modules\typescript\lib\typescript.js:86596:34)
    	at LanguageEndpoint.getFormattingEditsForRange(C:\dv\tools\eclipse-neon-angular4\plugins\com.genuitec.eclipse.typescript_2.3.4.201707051045\bin\bridge\language\languageEndpoint.js:235:32)
    	at Main.processRequest(C:\dv\tools\eclipse-neon-angular4\plugins\com.genuitec.eclipse.typescript_2.3.4.201707051045\bin\bridge\main.js:91:33)
    	at <js-bridge.call>(Unknown Source)
    	at com.genuitec.eclipse.typescript.services.internal.Bridge.processRequest(Bridge.java:227)
    	... 82 more
    
    #536222 Reply

    support-swapna
    Moderator

    Fedor,

    Sorry that you are seeing this issue. I could not replicate the problem at my end. I do see the suggestion to implement the interface. I will file the stacktrace for further investigation with the dev team.

    Can you please clarify if you see this problem consistently or in a new workspace as well? If possible please share with us the code snippets to help us replicate the problem at our end.

    Please also send us the full log file from workspace dir/.metadata/.log.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #538975 Reply

    Fedor Losev
    Participant

    a.ts:

    
    export interface A {
      test(): void;
    }
    

    b.ts:

    
    export interface B {
      name?: string;
    }
    

    ab.ts:

    
    export class AB {
      
    }

    Close all files. Open ab.ts and change to:

    
    import {A} from './a'
    import {B} from './b'
    
    export class AB implements A, B {
      
    }
    

    Close all files. Open AB and click on error mark “Incorrectly implements”. Either nothing happens or there is the same tooltip message without option to fix.

    After that, saving a ts file (even unrelated) will result in the error above until IDE restart.

    Note, while this happens now consistently, the very first time it gave me the option to implement the interface and it worked. But after closing, reopening and removing the implemented code, clickin on the error mark resulted in the above. Deleting these files, restarting and creating them again resulted in this behavior right away, without working properly first time.

    • This reply was modified 6 years, 5 months ago by Fedor Losev.
    #539021 Reply

    support-swapna
    Moderator

    Fedor,

    Thank you for the code snippets and the detailed instructions. I see the exception logged when hovering over the error in the editor but not during any .ts file save.

    The dev team is investigating further. We will keep you posted about the fix.

    Apologies for inconvenience caused.

    –Swapna
    MyEclipse Support

    #539028 Reply

    Fedor Losev
    Participant

    Note the save error happens not on hovering but after clicking on the error mark and then editing the file.

    #539183 Reply

    support-piotr
    Participant

    Fedor,

    Unfortunately, this is an issue in TypeScript language services themselves. Formatting Scanner is not being closed within TS code (missing try/finally block) as a result of an error thrown from formatter. For this quick fix we are relaying on TS Services to create its contents, as the services are supposed to provide advanced formatting of the content. It clearly looks buggy. Anyway, as the scanner is not closed, all further calls to formatter are being rejected.

    The issue has been fixed recently: https://github.com/Microsoft/TypeScript/pull/18293 , but the targeted release is 2.6.0. As of now we have avoided patching TypeScript Language Services code and we have to carefully investigate our options. We will keep you posted.

    • This reply was modified 6 years, 5 months ago by support-piotr.
    #539377 Reply

    support-piotr
    Participant

    Fedor,

    I am happy to inform you that monkey patching worked out and the fix for the issue will be available in the next release. Of course an error will still be logged in your case due to a bug in TS, but at least it won’t cause any issue afterwards.

    #541934 Reply

    Brian Fernandes
    Moderator

    Fedor,

    This fix is also available in the 2017 CI 9 pre-release. Please see https://www.genuitec.com/forums/topic/ts-editor-paste-sets-incorrect-ident/#post-541933 for more details.

    #544306 Reply

    support-swapna
    Moderator

    Fedor,

    The fix is now available in Webclipse 2017 CI 9 stable stream. Please update to CI 9 and let us know how it works for you.

    –Swapna
    MyEclipse Support

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Save Failed

You must be logged in to post in the forum log in