Microsoft KB Archive/304442

From BetaArchive Wiki
Knowledge Base


FIX: Excel 2000 May Fault in MSO9.DLL When Calling an XLL Function that Takes an Array

Article ID: 304442

Article Last Modified on 10/19/2005



APPLIES TO

  • Microsoft Excel 2000 Standard Edition



This article was previously published under Q304442

SYMPTOMS

Complex workbooks that require heavy recalculation may encounter a situation that can cause Excel 2000 to accidentally attempt to free an invalid address for an array of doubles being passed as an argument to an XLL function call, causing the Office library (Mso9.dll) to crash Excel and generate one of the following error messages:

Unhandled exception in Excel.exe: C0000005: Access Violation.

-or-

The instruction at "0x308C9EBB" referenced memory at "0xFFFF0000". The memory could not be "read".

The problem only occurs when very complex workbooks that make heavy use of custom XLLs are recalculated, and may not crash Excel even when it is hit based on the values that are inside the array.

The problem does not occur with public versions of Excel 97 (but may occur with some QFE versions), nor does it occur with Excel 2002.

CAUSE

When it prepares to call an XLL function during a recalculation, Excel calculates all dependent cells that are needed to produce the arguments to pass to the XLL function. If one of the dependent cell values is changed by outside code (such as DDE or Automation) after this calculation, but before the XLL function is called, Excel must postpone the XLL call and again recalculate the dependent cells.

Under this condition, if the dependent values are being passed as an array (XLOPER type = xltypeMulti|xltypeNum), Excel 2000 may improperly attempt to free an invalid memory block that is based on the contents of the array value preceding the uncalculated entry. This condition is very rare and cannot be reproduced on demand.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:

   Date          Time   Version     Size        File name     
   --------------------------------------------------------
   29-Jul-2001   13:27              1,822,592   Q304442.msp
                

After the hotfix is installed, the following files will have the listed attributes or later:

   Date          Time    Version      Size        File name     
   -----------------------------------------------------------
   27-Jul-2001   18:53   9.0.0.5526   7,159,853   Excel.exe
   07-Mar-2001   14:25   2.0.4807.0      86,016   Msstko32.dll (optional)
                



STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Keywords: kbbug kbfix kbqfe kbhotfixserver KB304442