eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[ocl] Could not create content describer for org.eclipse.qvtd.xtext.qvtimperative. ... #1394

Closed eclipse-ocl-bot closed 2 hours ago

eclipse-ocl-bot commented 2 hours ago

| --- | --- | | Bugzilla Link | 449458 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Oct 31, 2014 07:35 EDT | | Modified | Mar 20, 2015 14:08 EDT | | Reporter | EPP Error Reports |

Description

Hello committers,

we received a new error report for Eclipse 4.5.0.I20140918-0330.

General Information:\ anonymous-id: ee6a7cf4-6277-45ce-b349-ac81306b3e3f\ eclipse-build-id: 4.5.0.I20140918-0330\ eclipse-product: org.eclipse.epp.package.modeling.product\ operating system: Windows7 6.1.0 (x86_64) - win32\ java-runtime-version: 1.7.0_45-b18

The following plug-ins were present on the execution stack (*):

  1. org.eclipse.core.commands_3.6.100.v20140528-1422
  2. org.eclipse.core.databinding.observable_1.4.1.v20140910-2107
  3. org.eclipse.core.databinding_1.4.100.v20140910-2107
  4. org.eclipse.core.resources_3.9.100.v20140825-0955
  5. org.eclipse.core.runtime_3.10.0.v20140724-1132
  6. org.eclipse.e4.core.commands_0.10.2.v20140424-2344
  7. org.eclipse.e4.core.contexts_1.3.100.v20140407-1019
  8. org.eclipse.e4.core.di_1.4.0.v20140813-2240
  9. org.eclipse.e4.ui.bindings_0.10.200.v20140424-2042
  10. org.eclipse.e4.ui.workbench_1.2.0.v20140905-1352
  11. org.eclipse.e4.ui.workbench.swt_0.12.100.v20140908-1525
  12. org.eclipse.emf.ecore_2.11.0.v20140916-0346
  13. org.eclipse.emf_2.6.0.v20140929-0830
  14. org.eclipse.emf.ecore.xmi_2.11.0.v20140916-0346
  15. org.eclipse.equinox.app_1.3.200.v20130910-1609
  16. org.eclipse.equinox.launcher_1.3.0.v20140415-2008
  17. org.eclipse.jface_3.11.0.v20140822-0942
  18. org.eclipse.ocl.examples.xtext.essentialocl.ui_3.5.0.v20140725-1754
  19. org.eclipse.ocl.examples.xtext.essentialocl_3.5.0.v20141001-1742
  20. org.eclipse.ocl.examples_3.4.100.v20140713-1723
  21. org.eclipse.ocl_3.5.0.v20140725-2247
  22. org.eclipse.swt_3.104.0.v20140916-1012
  23. org.eclipse.ui_3.107.0.v20140911-1616
  24. org.eclipse.ui.editors_3.8.200.v20140401-1310
  25. org.eclipse.ui.ide.application_1.0.600.v20140909-1818
  26. org.eclipse.ui.ide_3.10.100.v20140905-0917
  27. org.eclipse.xtext.ui_2.8.0.v201409300608
  28. org.eclipse.xtext_2.8.0.v201409300608

Error Status:

code:                   0\
plugin:                 org.eclipse.core.contenttype_3.4.200.v20140207-1251\
message:                Could not create content describer for org.eclipse.qvtd.xtext.qvtimperative. Content type has been disabled.\
fingerprint:            fb470efa\
exception class:        java.lang.NullPointerException\
exception message:      charsetName\
number of children:     0\
\
java.lang.NullPointerException: charsetName\
at java.io.OutputStreamWriter.<init>(null:-1)\
at org.eclipse.emf.ecore.resource.URIConverter$ReadableInputStream$Buffer.<init>(URIConverter.java:390)\
at org.eclipse.emf.ecore.resource.URIConverter$ReadableInputStream.read(URIConverter.java:350)\
at org.eclipse.emf.ecore.resource.ContentHandler$ByteOrderMark.read(ContentHandler.java:279)\
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl.getByteOrderMark(ContentHandlerImpl.java:253)\
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl.contentDescription(ContentHandlerImpl.java:120)\
at org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl.contentDescription(RootXMLContentHandlerImpl.java:220)\
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:349)\
at org.eclipse.emf.ecore.resource.impl.ContentHandlerImpl$Describer.describe(ContentHandlerImpl.java:373)\
at org.eclipse.core.internal.content.ContentType.describe(ContentType.java:161)\
at org.eclipse.core.internal.content.ContentType.internalGetDescriptionFor(ContentType.java:458)\
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:356)\
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:364)\
at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:93)\
at org.eclipse.ui.editors.text.FileDocumentProvider.getCharsetForNewFile(FileDocumentProvider.java:691)\
at org.eclipse.ui.editors.text.FileDocumentProvider.doSaveDocument(FileDocumentProvider.java:573)\
at org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.doSaveDocument(XtextDocumentProvider.java:520)\
at org.eclipse.ocl.examples.xtext.essentialocl.ui.model.BaseDocumentProvider.doSaveDocument(BaseDocumentProvider.java:167)\
at org.eclipse.ui.texteditor.AbstractDocumentProvider$1$SaveOperation.execute(AbstractDocumentProvider.java:610)\
at org.eclipse.ui.texteditor.AbstractDocumentProvider$DocumentProviderOperation.run(AbstractDocumentProvider.java:74)\
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:70)\
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:108)\
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2311)\
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:130)\
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75)\
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65)\
at org.eclipse.ui.texteditor.AbstractDocumentProvider.executeOperation(AbstractDocumentProvider.java:551)\
at org.eclipse.ui.texteditor.AbstractDocumentProvider.saveDocument(AbstractDocumentProvider.java:629)\
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5076)\
at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4866)\
at org.eclipse.xtext.ui.editor.XtextEditor.doSave(XtextEditor.java:296)\
at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7209)\
at org.eclipse.ui.Saveable.doSave(Saveable.java:216)\
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:355)\
at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:199)\
at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:283)\
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)\
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)\
at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:2157)\
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)\
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2153)\
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:291)\
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:269)\
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:211)\
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:146)\
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3941)\
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3955)\
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.NativeMethodAccessorImpl.invoke0(null:-2)\
at sun.reflect.NativeMethodAccessorImpl.invoke(null:-1)\
at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1)\
at java.lang.reflect.Method.invoke(null:-1)\
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)\
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)\
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)\
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)\
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)\
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)\
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)\
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:1262)\
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)\
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)\
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)\
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112)\
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)\
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1529)\
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4738)\
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:343)\
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4626)\
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)\
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5025)\
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(OS.java:-2)\
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)\
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)\
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)\
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)\
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)\
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)\
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:637)\
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)\
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:580)\
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)\
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:141)\
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:380)\
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)\
at sun.reflect.NativeMethodAccessorImpl.invoke0(null:-2)\
at sun.reflect.NativeMethodAccessorImpl.invoke(null:-1)\
at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1)\
at java.lang.reflect.Method.invoke(null:-1)\
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)\
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)\
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)\
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)\

Messages, stacktraces, and nested status objects may be shortened. Please visit \ http://dev.eclipse.org/recommenders/committers/confess/0.5/reports/-\ for the complete error log.

Some general information and guidelines about how to use this bug report:

  1. Feel free to move this bug to your own product and components. Please note\ that this bug is only accessible to Eclipse committers. If you move this bug\ please make sure that it's still in the "Security Advisor" group.

  2. The bug contents of the fields status, resolution, keywords, and whitelist\ are presented to reporters. If you needs more information, please set the\ keyword "needinfo". This will trigger a specialized dialog asking the user\ to provide further details.

  3. Use the following resolutions for the following situations:

    • CLOSED / FIXED: This bug has been fixed. Please provide additional\ information in the whiteboard field.
    • CLOSED / WORKSFORME: Use this resolution if you can't reproduce this issue\ and request further information. Please use the whiteboard text to specify\ more details what a user should provide and how.
    • CLOSED / INVALID: Use this resolution if the reported problem is a\ 'user-configuration' problem. Please consider giving hints how to fix\ these issues in the whiteboard field.
    • CLOSED / NOT ECLIPSE: Use this if the problem is caused by another plugin\ not developed at Eclipse.org
    • CLOSED / MOVED: If this bug has been moved else where. Please provide more \ information (e.g. a link) in the whiteboard field.
  4. Please remember that only committers can view and comment on this bug. You\ may, however, manually add the reporting user to the bug's cc list. But keep\ in mind that the report may contains sensitive information.

  5. If you are missing a feature, please file a enhancement request here:\ https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Recommenders.Incubator&component=Stacktraces\ \

Thank you for your assistance.\ Your friendly error-reports-inbox.

--

eclipse-ocl-bot commented 2 hours ago

By EPP Error Reports on Oct 31, 2014 07:35

I've looked up the (to date) top-3 most similar bug groups and listed the \ closest bug of each group below. This report may or may not be duplicate of\ those (low or similar scores for all entries may indicate that this hasn't\ been reported yet):

1. [Bug 449180](https://bugs.eclipse.org/bugs/show_bug.cgi?id=449180): [ltk] The resource tree is locked for modifications. – 0,9    
2. [Bug 446699](https://bugs.eclipse.org/bugs/show_bug.cgi?id=446699): [ltk] The resource tree is locked for modifications. (err_grp: e40b0639) – 0,9    
3. [Bug 447758](https://bugs.eclipse.org/bugs/show_bug.cgi?id=447758): [platform] HIDDEN – 0,8    

If this report actually is a duplicate of those, please mark it as such. This\ information helps me to improve the recommendations further for the next issue.

Thank you for your assistance.\ Your friendly error-reports-inbox.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Nov 03, 2014 07:20

org.eclipse.qvtd.xtext.qvtimperative has not yet been released.

eclipse-ocl-bot commented 2 hours ago

By Marcel Bruch on Nov 03, 2014 08:38

Moved the comment into the whiteboard to let users give a chance to see this. Making this bug accessible for non-committers since it does not contain any sensitive data.

eclipse-ocl-bot commented 2 hours ago

By EPP Error Reports on Nov 06, 2014 10:46

Bug 450364 has been marked as a duplicate of this bug.

eclipse-ocl-bot commented 2 hours ago

By EPP Error Reports on Nov 27, 2014 10:46

To date this log entry was reported 10 times.

Your friendly error reports bot.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Dec 01, 2014 03:26

Bug 453669 has been marked as a duplicate of this bug.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Dec 01, 2014 03:30

I think this occurs when trying to save the Abstract Syntax within an Xtext 'OCL' editor; EMF has an API that is more restrictive than might at first appear.

Hopefully this is now fixed.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Mar 18, 2015 06:29

(In reply to Ed Willink from comment #7)

I think this occurs when trying to save the Abstract Syntax within an Xtext 'OCL' editor; EMF has an API that is more restrictive than might at first appear.

Hopefully this is now fixed.

AERI shows 23 occurrences from Nov-2014 to Jan-2015, but none in the last 8 weeks.

Looks like it was fixed in M4 or M5 and user has upgraded.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Mar 19, 2015 08:38

(In reply to Ed Willink from comment #8)

Looks like it was fixed in M4 or M5 and user has upgraded.

No. Found it.

The problem occurs on the first save of a *.qvtr file, which uses the base XTextDocumentProvider which fails to ensure a non-null encoding when the source file description is being obtained.

The stack trace below identifies the point at which the null encoding is assigned rather than used.

Thread [main] (Suspended) \ owns: WorkspaceModifyDelegatingOperation (id=613) \ URIConverter$ReadableInputStream.(Reader) line: 334 \ RootXMLContentHandlerImpl$Describer(ContentHandlerImpl$Describer).describe(Reader, IContentDescription) line: 373 \ ContentType.describe(IContentDescriber, ILazySource, ContentDescription) line: 161 \ ContentType.internalGetDescriptionFor(ILazySource, QualifiedName[]) line: 458 \ ContentTypeCatalog.getDescriptionFor(ContentTypeMatcher, ILazySource, String, QualifiedName[]) line: 356 \ ContentTypeCatalog.getDescriptionFor(ContentTypeMatcher, Reader, String, QualifiedName[]) line: 364 \ ContentTypeManager(ContentTypeMatcher).getDescriptionFor(Reader, String, QualifiedName[]) line: 93 \ XtextDocumentProvider(FileDocumentProvider).getCharsetForNewFile(IFile, IDocument, FileDocumentProvider$FileInfo) line: 691 \ XtextDocumentProvider(FileDocumentProvider).doSaveDocument(IProgressMonitor, Object, IDocument, boolean) line: 573 \ XtextDocumentProvider.doSaveDocument(IProgressMonitor, Object, IDocument, boolean) line: 523 \ AbstractDocumentProvider$1$SaveOperation.execute(IProgressMonitor) line: 610 \ AbstractDocumentProvider$1$SaveOperation(AbstractDocumentProvider$DocumentProviderOperation).run(IProgressMonitor) line: 74 \ WorkspaceModifyDelegatingOperation.execute(IProgressMonitor) line: 70 \ WorkspaceModifyOperation$1.run(IProgressMonitor) line: 108 \ Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 2313 \ WorkspaceModifyDelegatingOperation(WorkspaceModifyOperation).run(IProgressMonitor) line: 130 \ WorkspaceOperationRunner.run(IRunnableWithProgress, ISchedulingRule) line: 75 \ WorkspaceOperationRunner.run(boolean, boolean, IRunnableWithProgress) line: 65 \ XtextDocumentProvider(AbstractDocumentProvider).executeOperation(AbstractDocumentProvider$DocumentProviderOperation, IProgressMonitor) line: 551 \ XtextDocumentProvider(AbstractDocumentProvider).saveDocument(IProgressMonitor, Object, IDocument, boolean) line: 629 \ QVTrelationEditor(AbstractTextEditor).performSave(boolean, IProgressMonitor) line: 5076 \ QVTrelationEditor(AbstractTextEditor).doSave(IProgressMonitor) line: 4866 \ QVTrelationEditor(XtextEditor).doSave(IProgressMonitor) line: 311 \ AbstractTextEditor$TextEditorSavable.doSave(IProgressMonitor) line: 7209 \ AbstractTextEditor$TextEditorSavable(Saveable).doSave(IProgressMonitor, IShellProvider) line: 216 \ SaveableHelper.doSaveModel(Saveable, IProgressMonitor, IShellProvider, boolean) line: 355 \ SaveableHelper$3.run(IProgressMonitor) line: 199

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Mar 20, 2015 08:49

(In reply to Ed Willink from comment #9)

The problem occurs on the first save of a *.qvtr file9

No. *.qvtc etc too.

(In reply to Ed Willink from comment #9)

The stack trace below identifies the point at which the null encoding is assigned rather than used.

Stepping through the corresponding code when saving a *.xtext file reveals that Xtext does not / no longer registers a contenttype, so no attempt to analyze the XML is made and no null encoding or NPE occurs.

Simple fix: eliminate all the CS contenttype registrations.

Better fix: use a derived RootXMLContentHandlerImpl in the contenttype registration that ensures that no NPE occurs.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Mar 20, 2015 10:22

(In reply to Ed Willink from comment #10)

Better fix: use a derived RootXMLContentHandlerImpl in the contenttype registration that ensures that no NPE occurs.

Actually just need a derived Describer to ensure that the null encoding is an IOException that the platform ignores rather than an NPE.

public class BaseContentHandlerDescriber extends ContentHandlerImpl.Describer\ {\ protected static class BaseReadableInputStream extends URIConverter.ReadableInputStream\ {\ protected BaseReadableInputStream(Reader xmlReader) throws IOException {\ super(xmlReader);\ if (encoding == null) {\ throw new IOException("Not an XML file");\ }\ }

    @Override\
    public String getEncoding() {\
        String encoding = super.getEncoding();\
        return encoding != null ? encoding : null;\
    }\
}

@Override\
public int describe(Reader reader, IContentDescription description) throws IOException\
{\
    return describe(new BaseReadableInputStream(reader), description);\
}\

}

But the problem only occurs if the genmodel has a non-null contentTypeIdentifier.

Should the above be in EMF? but should EMF need to guard against non-XML content.

Perhaps better an Xtext fix, since Xtext is where the problem arises.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Mar 20, 2015 10:54

(In reply to Ed Willink from comment #11)

Perhaps better an Xtext fix, since Xtext is where the problem arises.

An XText fix is only possible by overriding the whole of FileDocumentProvider.doSaveDocument since getCharsetForNewFile where an exception needs catching is private. See Bug 461191 for a suggested platform tolerance; would still give an irritating log message.

Today and for backward compatibility only the BaseContentHandlerDescriber is an option.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Mar 20, 2015 14:08

(In reply to Ed Willink from comment #10)

(In reply to Ed Willink from comment #9)

The problem occurs on the first save of a *.qvtr file9

No. *.qvtc etc too.

(In reply to Ed Willink from comment #9)

The stack trace below identifies the point at which the null encoding is assigned rather than used.

Stepping through the corresponding code when saving a *.xtext file reveals that Xtext does not / no longer registers a contenttype, so no attempt to analyze the XML is made and no null encoding or NPE occurs.

No. The true problem is a confusion between the text extension .X and the CS extension .Xcs, as a consequence of which both are handled by the XML content type analysis.

Once the spurious registrations are removed, so is the problem.

OCL: commit b4006ce57d10d95b3062b2b90c90db686780cfd6\ QVTd: commit 4e5a45c1c53633da76b1333736f371265215f221

pushed to master for M6.

(This was a quite horrible error; it will be interesting to see if other problems vanish. But it's odd that it requires an AERI report to discover that saves are failing.)