Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315005

Summary: Disassembly view is broken in 3.5.2 and CDT 6.0.2
Product: [Tools] CDT Reporter: Omry Yadan <public>
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: major    
Priority: P3 CC: aegges, aleherb+eclipse, cdtdoug, malaperle, marc.khouzam, markdigitalchips, pawel.1.piech, zulliger
Version: 6.0.2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Omry Yadan CLA 2010-05-30 09:47:52 EDT
Build Identifier: 

java.lang.ClassCastException: org.eclipse.ui.part.FileEditorInput cannot be cast to org.eclipse.cdt.debug.internal.ui.disassembly.editor.DisassemblyEditorInput
at org.eclipse.cdt.debug.internal.ui.disassembly.viewer.DisassemblyDocumentProvider.getDocumentPresentation(DisassemblyDocumentProvider.java:204)
at org.eclipse.cdt.debug.internal.ui.disassembly.editor.DisassemblyEditor.dispose(DisassemblyEditor.java:154)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:697)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:286)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2857)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:344)
at org.eclipse.ui.actions.OpenWithMenu$3.handleEvent(OpenWithMenu.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)



Reproducible: Always

Steps to Reproduce:
1. right click a binary file and choose open with Disassembly.
Comment 1 Omry Yadan CLA 2010-05-30 09:48:30 EDT
updated version
Comment 2 Doug Schaefer CLA 2010-08-09 13:28:56 EDT
Wrong component
Comment 3 Marc-André Laperle CLA 2012-02-02 23:20:50 EST
I can also reproduce this on Windows (Vista 64 + MinGW).
Comment 4 Marc-André Laperle CLA 2012-02-02 23:22:34 EST
...with CDT 8.0.2 RC2
Comment 5 Axel Mueller CLA 2013-07-11 17:18:36 EDT
(In reply to comment #4)
> ...with CDT 8.0.2 RC2
Still reproducable on Linux with CDT 8.2
Comment 6 Omry Yadan CLA 2013-07-12 01:00:56 EDT
it's only been 3 years. other eclipse bugs that I reported are are still open after 9 years.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=76646
https://bugs.eclipse.org/bugs/show_bug.cgi?id=114003

Sad to say, but Eclipse smells a kind of dead.
Comment 7 Marc Khouzam CLA 2013-07-12 09:10:06 EDT
(In reply to comment #6)
> it's only been 3 years. other eclipse bugs that I reported are are still
> open after 9 years.
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=76646
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=114003
> 
> Sad to say, but Eclipse smells a kind of dead.

A bug that has no activity for many years will not attract any attention.  If you care about a bug it may help to (politely) ping on the bug, or ask if you can help, or something of the kind.  The idea is to bring the bug back into the spotlight and let people know someone cares about it being fixed.
Comment 8 Anton Leherbauer CLA 2013-07-12 09:32:04 EDT
This is no bug IMO. The Disassembly editor cannot be used for ordinary files. It is solely used as a disassembly view for an active debug context.

I don't see "Disassembly" in the Open with... menu of binary files. I have to choose Other... and then select "Disassembly", but I could as well select any other useless editor, like "Source Not Found" or "Class File Viewer", etc.
Comment 9 Omry Yadan CLA 2013-07-12 11:53:40 EDT
Marc,
I did not mean to insult, just pointing out that it looks like Eclipse lose all it's early momentum.

I opened this bug because this seems like, well - a bug, and I care about Eclipse.
many people after me mentioned that they encountered it too, and cared enough to find this and mentioned that they are still seeing it and have tried to bring it into the spotlight politely. (see all the "me too" comments).


Anton, this is CLEARLY a bug.
ClassCastException triggered by a UI action is a bug, no matter how you spin it.
Comment 10 Doug Schaefer CLA 2013-07-12 12:28:18 EDT
You raise a great point Omry. Enough that I've actually blogged about it. http://cdtdoug.blogspot.ca.

And you are right, Eclipse has lost a lot of steam and we need to figure out how to light the fire again. But it's certainly not dead as you can see by the number of CDT committers that are responding here :)
Comment 11 Marc Khouzam CLA 2013-07-12 15:03:28 EDT
(In reply to comment #9)
> Marc,
> I did not mean to insult, just pointing out that it looks like Eclipse lose
> all it's early momentum.

No insult taken.  I understand your frustration and was trying to give hints on how you can help get your bugs resolved.

> I opened this bug because this seems like, well - a bug, and I care about
> Eclipse.

Thank you for that.  Users that take the time to open bugs should at least get feedback to reward their efforts.  I will personally try to be better at that in the future.

> many people after me mentioned that they encountered it too, and cared
> enough to find this and mentioned that they are still seeing it and have
> tried to bring it into the spotlight politely. (see all the "me too"
> comments).

Sorry, I didn't mean to imply there was impoliteness in this case.  I just mentioned politeness because I personally don't like when people just write "PING!", which I've seen before.  I just didn't want someone to come back and say "But Marc K said to ping the bug, which I did" :)

> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=76646
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=114003

I was referring to the above two bugs.  The first has its last activity in April 2004, while the second has been touched since November 2006.  Speaking for myself, when faced with a huge backlog of bugs, many of which are no longer applicable, I will rarely look at old bugs, simply because newer bugs have an increased chance of being valid.  However, if someone goes back to the bug to say "still happening with version xyz", it pushes the bug up the list, and confirms that someone still is bothered by it.

I can't promise anything, but it is good to get committers to think about this situation.  I hope it will help us improve the CDT community and satisfaction.
Comment 12 Marc-André Laperle CLA 2013-07-12 20:39:46 EDT
(In reply to comment #9)
> Anton, this is CLEARLY a bug.
> ClassCastException triggered by a UI action is a bug, no matter how you spin
> it.

So perhaps this bug should be about improving the error message? From what I understand, if you want to see the disassembly of a binary, you would only have to double click on the binary which would open the "Default Binary File Editor". Unfortunately, this editor has a few problems too which we could address in separate bugs:
- It doesn't work on archives (.a)
- It doesn't seem to work with all toolchains. I got it working only with Cygwin
Comment 13 Omry Yadan CLA 2013-07-13 05:22:33 EDT
Marc K, those two bugs of mine were just my oldest open bugs. not the most important to fix.
one is pretty much irrelevant (almost no one uses CVS these days, maybe it's just time to deprecate CVS in Eclipse).
the other one seems solved (on a vanila new installation of Eclipse, new files no longer has the annoying comment on how to change the annoying comment).
I will post a comment on your blog post, I have a lot to say which is not relevant to this bug.

Marc L:
If, product wise - this is actually not supposed to be supported (I have a sense that it did used to work but after 3 years who knows) - then I am of course fine with removing the UI option or otherwise making sure a user does get an internal Eclipse error.