Excel 2010 32-bit crashes in .xls with Macros

Bug #1213557 reported by penalvch
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wine
Fix Released
Medium
wine (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

lsb_release -rd
Description: Ubuntu 13.04
Release: 13.04

What happens in both Linux:
apt-cache policy wine1.6
wine1.6:
  Installed: 1.6-0ubuntu1~ppa1
  Candidate: 1.6-0ubuntu1~ppa1
  Version table:
 *** 1.6-0ubuntu1~ppa1 0
        500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ raring/main i386
Packages
        100 /var/lib/dpkg/status

and Mac OSX with wine 1.7, is that Excel 2010 32-bit crashes with attachment
clicking cell D5 dropdown -> click Albania -> then click button "Refresh
Customer List".

Not reproducible in Windows Vista x86 with Microsoft Office Professional Plus
2010 Excel Version 14.0.7015.1000 (32-bit) so it's a WINE bug.

Revision history for this message
In , Dimesio (dimesio) wrote :

Opening a new bug now that it's clear bug 25754 is not the same problem.

All versions of Excel that I tested (97, 2003, 2007, and 2010) crash trying to run a macro.

To reproduce, go to Tools, Macro (in 97 and 2003) or View, Macro (in 2007 and 2010) and select record. Type something in a cell and press enter, then click the stop button. Go back to the Macro menu and run the macro that was recorded.

Regression test results:

c0f120db5d6b72917dd9bb1e4630f2b6ff6960a6 is first bad commit
commit c0f120db5d6b72917dd9bb1e4630f2b6ff6960a6
Author: Andrew Eikum <email address hidden>
Date: Tue Nov 9 16:04:10 2010 -0600

    oleaut32: Search inherited interfaces again in ITypeComp::Bind.

:040000 040000 3b22bce11b0e5dc9df0c30658009c45a0bae7955
add823888e853fc234e1991a6aed674b456c56e8 M dlls

Reverting that commit fixes the crash.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

Okay, I spent some time looking at this this morning and I think it's not actually a regression.

There are two commits involved here. The first, 3173305e, modifies ITypeComp::Bind to not return an error code if it fails to find the member being requested. However, a mistake in the patch introduced a problem, where parent interfaces were no longer being searched when looking for that member. This was fixed a couple of months later in c0f120db.

Before 3173305e, this sequence would cause Excel to crash. Between 3173305e and c0f120db, Excel no longer crashes because it's returning a failure code and not searching parent interfaces. This is "less correct" than the crash. After c0f120db it's back to the original behavior of searching the parent interfaces and subsequently crashing.

So, this isn't a regression caused by that commit. Obviously still a bug, though :)

Revision history for this message
In , Dimesio (dimesio) wrote :

Still present in 1.3.28.

Revision history for this message
In , Dimesio (dimesio) wrote :

Still present in 1.3.36.

Revision history for this message
In , Frenchman20 (frenchman20) wrote :

Created attachment 39439
Problem remains in 1.5.0

Wine does not support this command from VBA: Range("A1").Select, where A2 represents any cell. When a macro runs, Excel will freeze once it gets to this command.

Hope this helps!

Revision history for this message
In , Frenchman20 (frenchman20) wrote :

(In reply to comment #4)
> Created attachment 39439 [details]
> Problem remains in 1.5.0
>
> Wine does not support this command from VBA: Range("A1").Select, where *A1
> represents any cell. When a macro runs, Excel will freeze once it gets to this
> command.
>
> Hope this helps!

*A2 should be A1

Revision history for this message
In , David Sempsrott (dsempsro) wrote :

Here's another scenario that might give some leads. I created a macro in Excel 2010 (using the 2003 file format .xls), and then tried to run it in Excel 2007 under Wine 1.4. It ran fine until it got to a statement that was supposed to copy a range of data:

MySheet1.Range("A1").CurrentRegion.Copy MySheet2.Range("A1")

At this point Excel crashed. I reopened the workbook and modified the statement as follows:

MySheet1.Cells(1, 1).CurrentRegion.Copy MySheet2.Cells(1, 1)

That worked. But then it came to the following code:

With MySheet2.Range("K1").Cells
    .Offset(0, -2).Value = "Status"
    .Offset(0, -1).Value = "Coverage"
    .Value = "Test case(s)"
    .EntireColumn.AutoFilter Field:=1, VisibleDropDown:=True
End With

And Excel crashed at the autofilter statement. Then I changed the Range("K1").Cells to Cells(1, 11) and again it worked flawlessly. So it seems fairly clear to me that the Range part is where the problem is -- although apparently it's only methods, and not properties, that don't work.

I did get a complaint from Wine several times about not finding Windows Common Controls:
fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)

Sorry I'm not very experienced with Wine or VBA, but I hope that might give a few hints as to where the problem might be.

Revision history for this message
In , mr.larch (bunglehead) wrote :

Please attach +ole,+typelib,+tid log as a text file running current dev. version 1.5.4.

Revision history for this message
In , Dimesio (dimesio) wrote :

The log, even compressed, is too big to attach. I've uploaded it here: https://docs.google.com/open?id=0B98fpwZrfFafdVVNTXFoWW12S0U

Revision history for this message
In , Modestas Vainius (geromanas) wrote :

Just in case somebody needs to get macros working quickly, the workaround for this bug is use native oleaut32.dll (e.g. from Windows XP installation). It helped for me on wine 1.4.1.

Revision history for this message
In , Andrew Steffey (asteffey) wrote :

In wine-1.5.22 I was having some trouble with VBA in Excel. Specifically, Excel would crash whenever it tried to autocomplete any of the built-in excel add-ons.

Fixed the problem by using winetricks riched20

The issue seems to be related to http://bugs.winehq.org/show_bug.cgi?id=12458

Revision history for this message
In , Ubrammer (ubrammer) wrote :

Created attachment 45340
The file contains the debuglog wine.log from calling the macro to the crash.

I made another log of the error with +ole,+typelib,+tid. The log just starts with the call of the Macro1, which moves one cell down.

It was made with wine 1.6 and excel from Office 2000.

Revision history for this message
In , penalvch (penalvch) wrote :

What happens in both Linux:
apt-cache policy wine1.6
wine1.6:
  Installed: 1.6-0ubuntu1~ppa1
  Candidate: 1.6-0ubuntu1~ppa1
  Version table:
 *** 1.6-0ubuntu1~ppa1 0
        500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ raring/main i386 Packages
        100 /var/lib/dpkg/status

and Mac OSX with wine 1.7, is that Excel 2010 32-bit crashes with attachment clicking cell D5 dropdown -> click Albania -> then click button "Refresh Customer List".

Not reproducible in Windows Vista x86 with Microsoft Office Professional Plus 2010 Excel Version 14.0.7015.1000 (32-bit) so it's a WINE bug.

Revision history for this message
In , penalvch (penalvch) wrote :
Revision history for this message
In , Dimesio (dimesio) wrote :
Revision history for this message
In , Dimesio (dimesio) wrote :

Duplicate of bug 25762.

*** This bug has been marked as a duplicate of bug 25762 ***

Revision history for this message
In , Dimesio (dimesio) wrote :

*** Bug 34287 has been marked as a duplicate of this bug. ***

penalvch (penalvch)
summary: - Excel 2010 32-bit crashes with specific .xls
+ Excel 2010 32-bit crashes in .xls with Macros
Revision history for this message
In , penalvch (penalvch) wrote :

Excel Macro crashing reproducible in wine 1.7 on Linux and Mac OSX as per my duplicate http://bugs.winehq.org/show_bug.cgi?id=34287 .

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

Christopher, could you please email the spreadsheet to me at <email address hidden>? I'd like to confirm that this is the same issue. Thanks!

Changed in wine:
importance: Unknown → Medium
status: Unknown → Invalid
Revision history for this message
In , Austin English (austinenglish) wrote :

Closing.

Revision history for this message
In , Piotr-caban (piotr-caban) wrote :

This bug is caused by incorrect FUNCDESC structure returned for IRange::Select function (defined in typelib inside EXCEL.EXE).

In this case both calling convention and number of parameters is incorrect. In order to make EXCEL working only calling convention needs to be changed to FUNC_DISPATCH.

I'll try to find why it's incorrect.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

Created attachment 45863
oleaut32: Apply TKIND_DISPATCH changes to FUNCDESC results from ITypeComp::Bind

Good find, Piotr! This patch lets the macro run. I'm working on tests.

Revision history for this message
In , Piotr-caban (piotr-caban) wrote :

It works for me now. Marking as fixed.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

If you have an Excel spreadsheet with macros that are still failing, please file a new bug and add me to the CC list. Thanks!

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

Closing bugs fixed in 1.7.2.

Revision history for this message
In , Wcrfrench (wcrfrench) wrote :

How do you apply this fix? I am getting a similar sounding error when I call a worksheet function utilising a named range....

Excel just freezes and then must be forced closed.

For instance:

Sub Run()

Dim Num1 As Integer

Num1 = WorksheetFunction.Counta(Range(Range("A1"),Range("A100")))

End Sub

I am new to Linux and wine btw.

Very grateful for any help, determined not to go back to windows, but desperately need VBA for work!

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

(In reply to wcrfrench from comment #20)
> How do you apply this fix? I am getting a similar sounding error when I call
> a worksheet function utilising a named range....
>

Please be sure you're using the latest version of Wine (currently 1.7.27). If you are, you are probably encountering a different bug. Please open a new bug report with details on how to reproduce.

Feel free to add my email to the CC list. I like to be informed of typelib bugs.

Revision history for this message
In , Wcrfrench (wcrfrench) wrote :

Updating Wine fixed the problem. Many Many Thanks

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wine (Ubuntu):
status: New → Confirmed
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Reproduced with 1.7.50-0ubuntu1 on Ubuntu 14.04.3

Anybody knows why ?

Changed in wine:
importance: Medium → Unknown
status: Invalid → Unknown
Changed in wine:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
penalvch (penalvch) wrote :

This issue is resolved for me (Original Reporter). If you have an issue with WINE please file a new report.

Changed in wine (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.