Nodeclipse / coffeescript-eclipse

CoffeeScript plugin for Eclipse using XText (moved to Nodeclipse; looking for new owner)
http://www.nodeclipse.org/coffeescript/
20 stars 9 forks source link

' "XtextReconcilerJob" has encountered a problem' in 4.3.1 onwards #19

Open mgomez-dgt opened 10 years ago

mgomez-dgt commented 10 years ago

An internal error occurred during: "XtextReconcilerJob". start > length()

Eclipse Standard/SDK

Version: Kepler Service Release 1 Build id: 20130919-0819

Mac osx 10.8.5

Thanks!

dangelion commented 10 years ago

Same error also for me.

Eclipse Java EE IDE for Web Developers.

Version: Kepler Service Release 1 Build id: 20130919-0819

Mac OSX 10.7.5

paulvi commented 10 years ago

I have just checked in Eclipse Standard Kepler Service Release 1 (4.3.1) on Windows 7 64x Java 7_10 64x It works fine... until edit.

xtextreconcilejob

Also asked on http://www.eclipse.org/forums/index.php/t/563428/

Could you please what Eclipse Xtext is used. Help -> About -> Installation Details -> Plugins tab

Should be 2.4.3.

paulvi commented 10 years ago

Until reason is found, in Eclipse 4.3.1 with Java Tools, you can assign Scrapbook for *.coffee files.

paulvi commented 10 years ago

With PDE installed e.g. in Eclipse Standard, stack trace can be opened for the error n ErrorLog

xtextreconcilejob-errorlog

No CSEP specific classes in stack....

paulvi commented 10 years ago

Problem can't be solved by downgrading to XText 2.4.2. More ideas are needed.

dangelion commented 10 years ago

Hi Paul, my Xtext version is: Xtext UI 2.4.3.v201309030823 org.eclipse.xtext.ui.feature.group Eclipse Modeling Project

Could you better explain your solution with Scrapbook for *.coffee files? thanks

mgomez-dgt commented 10 years ago

my Xtext version is: Xtext UI 2.4.3.v201309030823 org.eclipse.xtext.ui.feature.group Eclipse Modeling Project

paulvi commented 10 years ago

@dangelion

Could you better explain your solution with Scrapbook for *.coffee files?

Scrapbook is actually Java Editor that doesn't complain about anything. It only highlights Java keywords and strings. I use it for everything that has not yet special plugin.

Try it via right click any file -> Open With -> Other ...

Window -> Preferences -> General -> Editors -> File associations

As per question in subject it is only in Eclipse 4.3.1 that cam somehow unexpected, and I noticed even some bug with good old Markdown Editor, so I decided not to hurry to switch, I just updated EGit and Web Tools...

paulvi commented 10 years ago

Just reminder that there is Enide Studio standalone Eclipse distribution for Windows.

http://sourceforge.net/projects/nodeclipse/

It is 4.3.0 based, so 4.3.1 bug will not arrive.

I think it is Eclipse platform bug, so just wait for 4.3.2 and skip 4.3.1.

cdietrich commented 10 years ago

Hi,

ive commented your eclipse post. i forked the code on github, regenerated the language (using 2.4.3) and have no problem to edit .coffee files

paulvi commented 10 years ago

That is superb, I was not sure when I could look in.

Could you please send pull request with files changed, and I will build & release.

Unfortunately I can't download or install from https://www.dropbox.com/sh/axieoiww82nb9pb/gtfcFnfcFc

mgomez-dgt commented 10 years ago

Zend Studio 10.5

An internal error occurred during: "XtextReconcilerJob". org.eclipse.xtext.resource.XtextResource.setModificationStamp(J)V

paulvi commented 10 years ago

@newberemis Now it is already known that XText update to 2.4.3 and regenerating the language is needed. I just don't know how to do it (should add to README if becomes known)

waiting if @cdietrich ( Christian Dietrich ) can share regenerated the language on GitHub.

gaydenko commented 10 years ago

I have tried last 4.3.2 Maintenance Eclipse build (6 Nov), unfortunately the issue still exists. It's real showstopper. Any tips to workaround for 4.3.1?

cdietrich commented 10 years ago

Hi, it seems that it is reproduceable if you install it binary only.

gaydenko commented 10 years ago

Can you, please, be more elaborate? Update site contains the only leaf node in plugins tree.

BTW, I have tried Luna (last integration build) - the issue takes place also!

cdietrich commented 10 years ago

Hi, it gets even more strange. it does not depend on the build, it depends on the file and the places you edit it.

cdietrich commented 10 years ago

The Problem is in the Custom Parser. It does some whitespace miscalculation i have no idea what they are doing there. (it throws away whitespace at the end) => it helps to add a dummy expression to the last line

cdietrich commented 10 years ago

Maybe one of the aptana guys can tell how to suppress this.

cdietrich commented 10 years ago

I have uploaded a patched with pure knowledge version. can you please test https://www.dropbox.com/s/86xqg9u1odb4wp4/test.zip

gaydenko commented 10 years ago

The test.zip doesn't list items to install.

cdietrich commented 10 years ago

You have to uncheck the group by category checkbox in the install dialog

gaydenko commented 10 years ago

Aha, thanks, have installed and tried the test.zip. Unfortunately has got "out of sync" error dialog with complete IDE hang.

mgomez-dgt commented 10 years ago

Zend Studio 10.5 osx Mavericks

Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml.

at csep.ui.internal.CoffeeScriptActivator.createInjector(CoffeeScriptActivator.java:71)
at csep.ui.internal.CoffeeScriptActivator.getInjector(CoffeeScriptActivator.java:55)
at csep.ui.CoffeeScriptExecutableExtensionFactory.getInjector(CoffeeScriptExecutableExtensionFactory.java:26)
at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:49)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:262)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:268)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:264)
at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
at org.eclipse.ui.internal.EditorManager.createPart(EditorManager.java:875)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2958)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2863)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2855)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2806)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2802)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2786)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2777)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
at org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard.performFinish(BasicNewFileResourceWizard.java:111)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3982)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3982)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Caused by: com.google.inject.CreationException: Guice creation errors:

cdietrich commented 10 years ago

Hmm strange which java version do you use?

gaydenko commented 10 years ago

If the question is for me - it is last Oracle JDK running under Linux x86_64.

mgomez-dgt commented 10 years ago

java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

cdietrich commented 10 years ago

hmmm strange, is there something more in the trace?

i still have some cases where it crashes too, but i have no idea why you cant start the editor. unfortunately i dont have a inet connection i can load a second eclipse from.

gaydenko commented 10 years ago

I can start, but can't edit :) Say, add a space somewhere, delete it, hit Ctrl-S - the error dialog arises.

cdietrich commented 10 years ago

Hi,

i uploaded a new version just 2 mins ago. hacking in a lexer code that has nothing todo with xtext is pain.

gaydenko commented 10 years ago

href?

cdietrich commented 10 years ago

still the same https://www.dropbox.com/s/86xqg9u1odb4wp4/test.zip

mgomez-dgt commented 10 years ago

Work in Eclipse DSL Tools

Version: Kepler Service Release 1 Build id: 20130919-0819

No more errors

(($) -> $.CoreHelper = sendAjaxRequest: () -> _default = { dataType: 'json' type: 'POST' data: {} url: null beforeSend: -> success:(data) -> complete: -> }

)(jQuery)

gaydenko commented 10 years ago

Sorry, still have the error dialog (this time third or fourth one resulted in eclipse hang).

cdietrich commented 10 years ago

i have pushed my changes to my fork. feel free todo with it whatever you want. the basically problem is the com.aptana.editor.coffee.parsing.lexer.CoffeeScanner and its ignoring of trailing whitespaces (first they are cut, if i remove them they are ignored anyway => Miscalculations of lengths as /csep/src/csep/Main.java shows (at least if you use the old version of the scanner)

=> find someone that built that scanner and ask him to fix it. this is all i can do.

i know nothing about coffee and i have no testcases.

cdietrich commented 10 years ago

@newberemis you sample seem to be whitespacedependent

(($) -> $.CoreHelper = sendAjaxRequest: () -> _default = { dataType: 'json' type: 'POST' data: {} url: null beforeSend: -> success:(data) -> complete: -> }

)(jQuery)

paulvi commented 10 years ago

I know just 2 persons that could possibly help.

@adamschmideg & @pulse00 Robert

Current summary is that problem since 4.3.1 (in 4.3.2 & 4.4) on latest JDK 7 on Linux, Max and Windows: error dialog appear every time after some small edits.

gaydenko commented 10 years ago

Paul, I'm not sure is this issue and #20 are considered to be the same? The thing is my error messages says "out of sync" rather about "length()" is at that screenshot.

gaydenko commented 10 years ago

@cdietrich

I didn't realize that test.zip build doesn't automatically pull xtext as dependency, and have installed it manually (default version, i.e. 2.4.3. SDK). And now I haven't the "out of sync" problem. I have others ones - say, building a project doesn't compile coffee files, "Run as" doesn't list coffee type, frequent error dialog message cited in this issue (ending with "length()") - but I haven't an error dialog saying about "out of sync" (#20) on almost every tiny step in editor.

Also I have tried official 0.3 and also haven't "out of sync error". Probably manual xtext install was needed to resolve #20. But this #19 issue still arises sufficiently often to be showstopper.

cdietrich commented 10 years ago

as said before. we need someone that can fix the custom lexer to be able to handle the whitespace at the end of the file. for the rest a regeneration should work. please not the zip i packed contains only the 2 language plugins and not the rest. i did not have a look how generation works and stuff like that

paulvi commented 10 years ago

Eclipse 4.3.1 also made other plugin behave a bit differently winterstein/Eclipse-Markdown-Editor-Plugin#30 because it was NPE it was easy to find & fix exact place.

we need someone that can fix the custom lexer to be able to handle the whitespace at the end of the file. for the rest a regeneration should work.

@cdietrich we don't have that someone. Can this issue be narrowed to just one file (or group of file)? Please give exact link (package.filename) for the mentioned custom lexer ? What is code base to continue?

please not the zip i packed contains only the 2 language plugins and not the rest.

If there is good code changes that should live on, could you please send pull request.

Some survival guidance is needed about how to navigate the code and re-create generated files.

cdietrich commented 10 years ago

Hi,

i am talking about https://github.com/Nodeclipse/coffeescript-eclipse/blob/master/csep/src/com/aptana/editor/coffee/parsing/lexer/CoffeeScanner.java

paulvi commented 10 years ago

OK

cdietrich commented 10 years ago

P.S: and the code is not good enhough to share

jthomaskerr commented 10 years ago

I need to do more testing but I think that the answer is to avoid mutating the input, since this error is indicating that the round trip source -> parse -> ast -> serialize -> source is inconsistent.

d80d834 removes the replacement and this fixes this issue, however there are other times where the input is mutated for comments so I'm suspicious that these are still issues.

There was also a problem with the grammar in that a block (an indented section) already has a TERMINATOR as part of the outdent symbol but the root rule wanted to see "Block TERMINATOR".

paulvi commented 10 years ago

From desperate hope added CSEP 0.4 to Nodeclipse updates repository http://www.nodeclipse.org/updates/. Check http://www.nodeclipse.org/history

Need more ideas. I guess 3+ people have tried in different time to find what was caused by Eclipse 4.3.1 release. Some other way of actions is needed.