Bug 151919 - [mis-compilation] ui.workbench.jar: can't open a file twice
Summary: [mis-compilation] ui.workbench.jar: can't open a file twice
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andrew Overholt
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 159880
TreeView+ depends on / blocked
 
Reported: 2005-03-23 15:55 UTC by Andrew Overholt
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-08 19:13:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Traceback for 151919 (11.59 KB, text/plain)
2005-04-20 21:14 UTC, Phil Muldoon
no flags Details
stack trace for compiler problem (3.79 KB, text/plain)
2005-05-03 04:33 UTC, Ben Konrath
no flags Details
stack trace after compiling with gcj 4.0.0-4 (11.81 KB, text/plain)
2005-05-09 18:48 UTC, Andrew Overholt
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 21517 0 None None None Never

Description Andrew Overholt 2005-03-23 15:55:57 UTC
Description of problem:
Error with native not with interpreted:  The command for the key you pressed failed

Reason:
 org.eclipse.ui.internal.PlaceholderContributionItem cannot be cast to
org.eclipse.jface.action.ToolBarContributionItem

Version-Release number of selected component (if applicable):
eclipse-changelog-2.0.1_fc-18

How reproducible:
Always.

Steps to Reproduce:
1. Run eclipse as normal (ie. native) -> Ctrl-Alt-c throws error.
2. Run eclipse interpreted (ie. temporarily mv /usr/lib/gcj-4.0.0{,.bak})
3. No error on Ctrl-Alt-c
  
Actual results:
Error as above.

Expected results:
No error.

Additional info:
The error happens the first time you try the keyboard shortcut, but not on
subsequent attempts.

Comment 1 Phil Muldoon 2005-03-23 19:48:09 UTC
Apparently this only happens the first time the plugin is invoked, and the
changelog should work everytime after, so that might be a workaround. I'll get
it fixed for the next release in the interim.

Comment 2 Phil Muldoon 2005-03-24 18:50:37 UTC
Ok more info. This happens when the ChangeLog plug-in asks Eclipse to open the
ChangeLog file, if it is not already open in the editor. You can replicate this
error by opening the ChangeLog file manually (double clicking on the ChangeLog
file in the Navigator) if it is not already open in an editor. The same error
will occur. It only does this on the first attempt to open. 

If the ChangeLog file is already open in the editor, ChangeLog works fine. This
seems like an Eclipse Platform error more than a ChangeLog error, as it happens
when either the user manually tries to open the ChangeLog, or when the ChangeLog
plugin makes the request.


Comment 3 Phil Muldoon 2005-03-24 19:01:10 UTC
In addition, I see the same error when trying to open any plugin.xml for the
first time too (ie not already in the editor)

Comment 4 Rick Moseley 2005-03-24 20:12:24 UTC
I see the problem on all of the files under the "src" directory:
build.properties, plugin.xml, etc.  When you double-click(or right-click and
select "Open with..." _. build.xml editor) on build.xml for example, an error
window pops up and an editor window pops up, but the editor window is not
populated.  In fact, if you activate a window that covers the build.xml editor
window and then minimize it, the build.xml window keeps the remains of the
minimized window inside it.  So, this problem is not just a Changelog problem
and is a more general problem.  When I try to bring up a .java file, I get no
problems.  Not sure if it because of the java editor being more stable or what.

None of these errors occur when I use the -vm option and bring up eclipse, BTW.

Comment 5 Rick Moseley 2005-03-24 21:10:20 UTC
Here is the traceback for the errors:


!SESSION 2005-03-24 15:58:16.634 -----------------------------------------------
eclipse.buildId=I20050219-1500
java.fullversion=GNU libgcj 4.0.0 20050320 (Red Hat 4.0.0-0.35)
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86 -data workspace-HEAD

!ENTRY org.eclipse.jface 4 2 2005-03-24 15:58:16.634
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.ClassCastException:
org.eclipse.ui.internal.PlaceholderContributionItem cannot be cast to
org.eclipse.jface.action.ToolBarContributionItem
   at org.eclipse.ui.internal.EditorActionBars.getToolBarManager()
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.part.EditorActionBarContributor.init(org.eclipse.ui.IActionBars)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.editors.text.TextEditorActionContributor.init(org.eclipse.ui.IActionBars)
(/usr/lib/eclipse/plugins/org.eclipse.ui.editors_3.1.0/editors.jar.so)
   at
org.eclipse.ui.part.EditorActionBarContributor.init(org.eclipse.ui.IActionBars,
org.eclipse.ui.IWorkbenchPage)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.EditorManager.createEditorActionBars(org.eclipse.ui.internal.registry.EditorDescriptor)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.EditorManager.createSite(org.eclipse.ui.IEditorReference,
org.eclipse.ui.IEditorPart, org.eclipse.ui.internal.registry.EditorDescriptor,
org.eclipse.ui.IEditorInput)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.EditorManager.openInternalEditor(org.eclipse.ui.IEditorReference,
org.eclipse.ui.internal.registry.EditorDescriptor, org.eclipse.ui.IEditorInput,
boolean) (/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(org.eclipse.ui.IEditorReference,
org.eclipse.ui.internal.registry.EditorDescriptor, org.eclipse.ui.IEditorInput)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at org.eclipse.ui.internal.EditorManager.openEditor(java.lang.String,
org.eclipse.ui.IEditorInput, boolean)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(org.eclipse.ui.IEditorInput,
java.lang.String, boolean)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(org.eclipse.ui.IEditorInput,
java.lang.String, boolean)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.WorkbenchPage.access$8(org.eclipse.ui.internal.WorkbenchPage,
org.eclipse.ui.IEditorInput, java.lang.String, boolean)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at org.eclipse.ui.internal.WorkbenchPage$10.run()
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.swt.custom.BusyIndicator.showWhile(org.eclipse.swt.widgets.Display,
java.lang.Runnable)
(/usr/lib/eclipse/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt.jar.so)
   at
org.eclipse.ui.internal.WorkbenchPage.openEditor(org.eclipse.ui.IEditorInput,
java.lang.String, boolean)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at org.eclipse.ui.ide.IDE.openEditor(org.eclipse.ui.IWorkbenchPage,
org.eclipse.core.resources.IFile, boolean)
(/usr/lib/eclipse/plugins/org.eclipse.ui.ide_3.1.0/ide.jar.so)
   at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(org.eclipse.core.resources.IFile,
boolean) (/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(java.lang.Object,
boolean) (/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(java.lang.Object,
boolean) (/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at org.eclipse.jdt.ui.actions.OpenAction.run(java.lang.Object[])
(/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at
org.eclipse.jdt.ui.actions.OpenAction.run(org.eclipse.jface.viewers.IStructuredSelection)
(/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(org.eclipse.jface.viewers.ISelection)
(/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run()
(/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(org.eclipse.jface.viewers.OpenEvent)
(/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(org.eclipse.jface.viewers.OpenEvent)
(/usr/lib/eclipse/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so)
   at org.eclipse.jface.viewers.StructuredViewer$2.run()
(/usr/lib/eclipse/plugins/org.eclipse.jface_3.1.0/jface.jar.so)
   at
org.eclipse.core.internal.runtime.InternalPlatform.run(org.eclipse.core.runtime.ISafeRunnable)
(/usr/lib/eclipse/plugins/org.eclipse.core.runtime_3.1.0/runtime.jar.so)
   at
org.eclipse.core.runtime.Platform.run(org.eclipse.core.runtime.ISafeRunnable)
(/usr/lib/eclipse/plugins/org.eclipse.core.runtime_3.1.0/runtime.jar.so)
   at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(org.eclipse.jface.viewers.OpenEvent)
(/usr/lib/eclipse/plugins/org.eclipse.jface_3.1.0/jface.jar.so)
   at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(org.eclipse.swt.events.SelectionEvent)
(/usr/lib/eclipse/plugins/org.eclipse.jface_3.1.0/jface.jar.so)
   at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(org.eclipse.swt.events.SelectionEvent)
(/usr/lib/eclipse/plugins/org.eclipse.jface_3.1.0/jface.jar.so)
   at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(org.eclipse.swt.events.SelectionEvent)
(/usr/lib/eclipse/plugins/org.eclipse.jface_3.1.0/jface.jar.so)
   at
org.eclipse.jface.util.OpenStrategy.access$2(org.eclipse.jface.util.OpenStrategy,
org.eclipse.swt.events.SelectionEvent)
(/usr/lib/eclipse/plugins/org.eclipse.jface_3.1.0/jface.jar.so)
   at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(org.eclipse.swt.widgets.Event)
(/usr/lib/eclipse/plugins/org.eclipse.jface_3.1.0/jface.jar.so)
   at
org.eclipse.swt.widgets.EventTable.sendEvent(org.eclipse.swt.widgets.Event)
(/usr/lib/eclipse/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt.jar.so)
   at org.eclipse.swt.widgets.Widget.sendEvent(org.eclipse.swt.widgets.Event)
(/usr/lib/eclipse/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt.jar.so)
   at org.eclipse.swt.widgets.Display.runDeferredEvents()
(/usr/lib/eclipse/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt.jar.so)
   at org.eclipse.swt.widgets.Display.readAndDispatch()
(/usr/lib/eclipse/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt.jar.so)
   at
org.eclipse.ui.internal.Workbench.runEventLoop(org.eclipse.jface.window.Window$IExceptionHandler,
org.eclipse.swt.widgets.Display)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at org.eclipse.ui.internal.Workbench.runUI()
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(org.eclipse.swt.widgets.Display,
org.eclipse.ui.application.WorkbenchAdvisor)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(org.eclipse.swt.widgets.Display,
org.eclipse.ui.application.WorkbenchAdvisor)
(/usr/lib/eclipse/plugins/org.eclipse.ui.workbench_3.1.0/workbench.jar.so)
   at org.eclipse.ui.internal.ide.IDEApplication.run(java.lang.Object)
(/usr/lib/eclipse/plugins/org.eclipse.ui.ide_3.1.0/ide.jar.so)
   at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(java.lang.Object)
(/usr/lib/eclipse/plugins/org.eclipse.core.runtime_3.1.0/runtime.jar.so)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.Object)
(Unknown Source)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(java.lang.String[],
java.lang.Runnable) (Unknown Source)
   at java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
(/usr/lib/libgcj.so.6.0.0)
   at org.eclipse.core.launcher.Main.invokeFramework(java.lang.String[],
java.net.URL[]) (Unknown Source)
   at org.eclipse.core.launcher.Main.basicRun(java.lang.String[]) (Unknown Source)
   at org.eclipse.core.launcher.Main.run(java.lang.String[]) (Unknown Source)
   at org.eclipse.core.launcher.Main.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)


Comment 6 Phil Muldoon 2005-04-20 21:14:28 UTC
Created attachment 113438 [details]
Traceback for 151919

Comment 7 Phil Muldoon 2005-04-20 21:18:12 UTC
Comment on attachment 113438 [details]
Traceback for 151919



Bug is a little more severe in this version, as the file will now open once,
and never again. Even inbetween sessions. 

Removed .eclipse and started with a fresh workspace

rpm -q eclipse-platform
eclipse-platform-3.1.0_fc-0.M6.7

rpm -q gcc-java
gcc-java-4.0.0-0.42

rpm -q libgcj
libgcj-4.0.0-0.42

Comment 8 Phil Muldoon 2005-04-20 23:59:15 UTC
Reassigned back to eclipse-bugs. This is not a changelog bug, but an
eclipse bug

Comment 9 Ben Konrath 2005-04-21 04:12:35 UTC
This is a mis-compilation of org.eclipse.ui.workbench.jar -> .so. I'm going to
temporarily remove this shared object until this is sorted out.

Comment 10 Ben Konrath 2005-04-21 22:07:00 UTC
Changing summary.

Comment 11 Andrew Overholt 2005-04-26 18:28:28 UTC
I just verified that this happens with our current packages, gcc*-4.0.0-1 and
eclipse-platform-3.1.0_fc-0.M6.11.

Comment 12 Ben Konrath 2005-05-03 04:33:30 UTC
Created attachment 113955 [details]
stack trace for compiler problem

I tried to investigate this a bit but I couldn't get anywwhere becuase Eclipse
would not run if used org.eclipse.ui.workbench_3.1.0.jar with ECJ. The stack
trace for this is attached. This is a little strange becuase it's not the same
problem as is happening when org.eclipse.ui.workbench_3.1.0.jar compiled with
the "stable compiler" as part of the build.

I also compiled org.eclipse.ui.workbench_3.1.0.jar with Sun's javac and then
compiled that jar to jar.so. I didn't observe either problem when I did this.

Thinking out loud here ... we know that the M6 ECJ is not able to bootstrap
with GIJ, so there's probably going to be problems with GIJ and ECJ in our M6
builds. I wonder if this is the same problem as the one that we had with the
bootstrap?

Comment 13 Andrew Overholt 2005-05-09 18:48:38 UTC
Created attachment 114175 [details]
stack trace after compiling with gcj 4.0.0-4

I still get this when I compile org.eclipse.ui.workbench_3.1.0.jar.so with gcj
4.0.0-4.  I'm attaching my stack trace just to make sure it isn't somehow more
informative than previously.  I can't open files at all with this .jar.so

Comment 14 Andrew Overholt 2005-05-11 18:45:18 UTC
I've filed an upstream bug report about this:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21517

Comment 15 Andrew Overholt 2005-06-08 17:33:33 UTC
This is still happening as of gcj 4.0.0-11.

Comment 16 Andrew Overholt 2005-10-08 19:13:40 UTC
I've re-enabled this in the build that will show up in rawhide soon
(3.1.0_fc-15) as I've tested it and with the latest gcc (4.0.2-3), and it's fixed.

Comment 17 Ben Konrath 2006-01-04 19:00:27 UTC
Confirming this fix is in updates-testing with the following package versions:

gcc-4.0.2-8.fc4
eclipse-platform-3.1.1-1jpp_1fc.FC4.1


Comment 18 Ben Konrath 2006-01-04 19:18:15 UTC
Correction, the eclipse package that has the fix is:

eclipse-platform-3.1.1-1jpp_1fc.FC4.11


Note You need to log in before you can comment on or make changes to this bug.