Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352511 - OLE Excel Automation Error
Summary: OLE Excel Automation Error
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 critical with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 16:58 EDT by Paul Watson CLA
Modified: 2019-11-14 03:45 EST (History)
2 users (show)

See Also:


Attachments
Snippet to reproduce problem (2.26 KB, text/plain)
2011-07-19 16:59 EDT, Paul Watson CLA
no flags Details
Snippet to reproduce (version 2) (2.14 KB, text/plain)
2011-07-20 14:46 EDT, Paul Watson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Watson CLA 2011-07-19 16:58:01 EDT
Build Identifier: Indigo 20110615-0604

I have a simple OLE automation snippet that starts Excel, makes it visible, turns off alerts and opens a file. This runs perfectly on Win XP with Office 2003 and Win 7 with Office 2007, but hangs with Win 7 and Office 2010. I have included the snippet with this bug report.

Reproducible: Always

Steps to Reproduce:
1. Run the attached snippet.
Comment 1 Paul Watson CLA 2011-07-19 16:59:30 EDT
Created attachment 199947 [details]
Snippet to reproduce problem
Comment 2 Felipe Heidrich CLA 2011-07-20 14:15:37 EDT
Where does it hang ? can you kill the hang process and get a stacktrace ?

Note I do not have office 2010 (and it would not be easy for me to get a copy of it). For this reason, I will try to help you find the problem and find a solution by having modifying the testing the SWT code.
Comment 3 Paul Watson CLA 2011-07-20 14:44:52 EDT
Hi Felipe,

So I have added some simple debug output code to the snippet (should be attached).  The output I get is something like this.


Visible property set (last application error) - No Error
DisplayAlerts property set (last application error) - Unable to set the DisplayAlerts property of the Application class
Open method invoked on workbooks (last workbooks error) - Open method of Workbooks class failed


By hanging I mean that that java code executes all the way to the display sleep loop, but the Excel application is unresponsive. Some of the UI elements of Excel work (for example I can change tabs on the ribbon), but nothing works in the application - you cannot even exit the Excel application. 

If you kill the java process the Excel application window remains open and is still non-responsive. The only way to kill it is via the task manager.

The stack trace from killing the java process is pretty uninformative.

<terminated>com.pwatson.msoffice.ui.excel.ExcelOleBug at localhost:50542	
<terminated, exit value: 1>C:\packages\Java\jre6\bin\javaw.exe (Jul 20, 2011 11:31:45 AM)
Comment 4 Paul Watson CLA 2011-07-20 14:46:40 EDT
Created attachment 200033 [details]
Snippet to reproduce (version 2)
Comment 5 Markus Kunde CLA 2011-07-26 10:10:19 EDT
Maybe same error like my bug?  ID 353112
Markus
Comment 6 Paul Watson CLA 2011-07-27 13:45:32 EDT
Hi Markus,

It looks like the same issue. Though(In reply to comment #5)
> Maybe same error like my bug?  ID 353112
> Markus

Hi Markus,

It seems it is related to the COM-Add-Ins issue. It I disable all the COM-Add-Ins in Excel then run the program it works fine. Still I would imagine this is something that should be fixed right?

Cheers,


Paul
Comment 7 Markus Kunde CLA 2011-07-27 15:07:00 EDT
Hi Paul,

Fixing will be great! It took several days to work it out. And all (or most) other programming languages do not care about activated/deactivated COM-Add-Ins. In my opinion it is a real bug and should be fixed. 
My temporary fix is a hard deactivation of the COM-Add-Ins, but imagine the user does not have the right for it or there are more than one Excel-instance that need the add-ins. It is not a good situation when I have to modify users' system preferences.

Voting for fix! :)
btw: I believe I saw this error already in Eclipse 3.6 or 3.5 with Excel 2003. 

Regards,
Markus
Comment 8 Lars Vogel CLA 2019-11-14 03:45:43 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.