Bug 172238

Summary: Can't edit file with no extension
Product: [Fedora] Fedora Reporter: Matthew Saltzman <mjs>
Component: eclipse-cdtAssignee: Andrew Overholt <overholt>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: eclipse-cdt-3.0.0_fc-1.FC4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-16 14:43:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Saltzman 2005-11-01 20:30:50 UTC
Description of problem:
Attempt to open a file whose name does not contain a "." and extension fails
with error:

Unable to create this part due to an internal error. Reason for the failure:
Cannot create file buffer.

Version-Release number of selected component (if applicable):
eclipse-platform-3.1.1-1jpp_1fc.FC4.4
(also using eclipse-cdt-3.0.0_fc-0.M6.7)

How reproducible:
always

Steps to Reproduce:
1. Create a file named (say) foo in a project directory
2. Refresh the Project window in Eclipse
3. Double-click on the new file
  
Actual results:
The above error

Expected results:
Fiel opens in text editor window

Additional info:
The traceback (under "details" tab in the error window):

org.eclipse.core.runtime.CoreException: Cannot create file buffer.
	at
org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:97)
	at
org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:542)
	at
org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:463)
	at
org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:3008)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:173)
	at
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1303)
	at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:262)
	at
org.eclipse.ui.texteditor.AbstractTextEditor$16.run(AbstractTextEditor.java:2360)
	at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:624)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:621)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2134)
	at
org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:2378)
	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2405)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:778)
	at
org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:384)
	at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:223)
	at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2362)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2295)
	at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2287)
	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2273)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2268)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2249)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:371)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:334)
	at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:98)
	at
org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:98)
	at
org.eclipse.cdt.internal.ui.cview.OpenFileGroup.runDefaultAction(OpenFileGroup.java:147)
	at
org.eclipse.cdt.internal.ui.cview.MainActionGroup.runDefaultAction(MainActionGroup.java:268)
	at org.eclipse.cdt.internal.ui.cview.CView.handleOpen(CView.java:243)
	at org.eclipse.cdt.internal.ui.cview.CView$10.open(CView.java:507)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:741)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:791)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:739)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:968)
	at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1067)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:243)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:238)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:277)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	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:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)

Comment 1 Andrew Overholt 2005-11-01 20:52:33 UTC
I cannot duplicate this problem.  I tries files named foo and foo.

Perhaps rm -rf ~/.eclipse (unless you have plugins installed in there) and try
again?

I'm curious as to why you have filenames and line numbers in the backtrace.  Are
you sure you're running with gij?

Comment 2 Matthew Saltzman 2005-11-01 21:09:32 UTC
(In reply to comment #1)
> I cannot duplicate this problem.  I tries files named foo and foo.
> 
> Perhaps rm -rf ~/.eclipse (unless you have plugins installed in there) and try
> again?

This is a pretty fresh upgrade to the latest updates-testing, but I did move
.eclipse out of the way after installing it.

> 
> I'm curious as to why you have filenames and line numbers in the backtrace.  Are
> you sure you're running with gij?

How would I check?  If this is affected by alternatives, that reports
that java points to /usr/lib/jvm/jre-1.5.0-sun/bin/java (which is installed from
JPackage and is currently java-1.50.-sun-1.5.0.04-1.jpp).

Comment 3 Matthew Saltzman 2005-11-01 21:14:09 UTC
BTW, rpm -qf `which gij` produces libgcj-4.0.1-4.fc4.

Comment 4 Andrew Overholt 2005-11-01 21:18:25 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > I'm curious as to why you have filenames and line numbers in the backtrace.  Are
> > you sure you're running with gij?
> 
> How would I check?  If this is affected by alternatives, that reports
> that java points to /usr/lib/jvm/jre-1.5.0-sun/bin/java (which is installed from
> JPackage and is currently java-1.50.-sun-1.5.0.04-1.jpp).

Well, we only support running with gij (and the natively-compiled .sos).  I just
tried with the Sun JVM for fun and I cannot duplicate there either.  I don't
know what to suggest other than to see if you can reproduce with gij.

Comment 5 Matthew Saltzman 2005-11-01 22:30:41 UTC
OK I set alternatives to /usr/lib/jvm/jre-1.4.2-gcj/bin/java.  I uninstalled and
reinstalled all eclipse components (including eclipse-cdt), cleared my workspace
and .eclipse, and started fresh. I still got the failure.  I tried again without
ecipse-cdt and it works.

So it's apparently not a bug in the eclipse base packages.  But the eclipse-cdt
package apparently doesn't work with the latest base packages.

Hopefully, there will be a usable CDT package soon.  Shold this bug be closed or
switched to eclipse-cdt?

Comment 6 Matthew Saltzman 2005-11-02 03:04:32 UTC
FWIW, installing the latest CDT build from the tarball at eclipse.org, and it
seems to work fine.

Comment 7 Andrew Overholt 2005-11-02 14:43:44 UTC
Okay, thanks for narrowing this down.  I'm going to build a new CDT once this
update goes out.  Let's switch this to eclipse-cdt for the time being.

Comment 8 Andrew Overholt 2005-11-15 19:37:04 UTC
Can you still reproduce?

Comment 9 Matthew Saltzman 2005-11-16 07:13:14 UTC
Nope, seems OK now.  Thanks.

Comment 10 Andrew Overholt 2005-11-16 14:43:38 UTC
Cool, thanks.  Closing.