OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
686 stars 95 forks source link

pivotTable.refreshAll() crashes Excel #464

Closed harri-rajala-koivu-solutions closed 7 months ago

harri-rajala-koivu-solutions commented 5 years ago

Message from office-js bot: We’re closing this issue because it has been inactive for a long time. We’re doing this to keep the issues list manageable and useful for everyone. If this issue is still relevant for you, please create a new issue. Thank you for your understanding and continued feedback.

Using office-js Excel API, Excel crashes and restarts when pivotTables.refreshAll() is called.

Expected Behavior

Excel should refresh pivot table and not crash.

Current Behavior

Excel crashes and restarts.

Steps to Reproduce, or Live Example

Summary of reproduce steps:

Detailed steps:

Step 1

Execute following code:

    private excelCrashStep1 = async () => {
        await Excel.run(async (context: Excel.RequestContext) => {
            const sheet = context.workbook.worksheets.getActiveWorksheet();

            // Delete existing pivot and table.
            let pivotTable = sheet.pivotTables.getItemOrNullObject("TestPivot");
            let table = sheet.tables.getItemOrNullObject("TestTable");
            await context.sync();
            if (pivotTable && !pivotTable.isNullObject) {
                pivotTable.delete();
            }
            if (table && !table.isNullObject) {
                table.delete();
            }

            // Create data table for pivot
            table = sheet.tables.add("A1:C1", true);
            table.name = "TestTable";
            table.getHeaderRowRange().values = [["Test1", "Test2", "Test3"]];
            table.rows.add(undefined, [
                ["a1", "b1", "c1"]
            ]);
            await context.sync();

            // Create pivot and set layout to "Tabular"
            pivotTable = sheet.pivotTables.add("TestPivot", "A1:C2", "E1");
            pivotTable.rowHierarchies.add(pivotTable.hierarchies.getItem("Test1"));
            pivotTable.rowHierarchies.add(pivotTable.hierarchies.getItem("Test2"));
            pivotTable.rowHierarchies.add(pivotTable.hierarchies.getItem("Test3"));
            pivotTable.layout.layoutType = "Tabular";
            await context.sync();
        });
    }

Step 2

!!! IMPORTANT NOTE !!! This must be done manually because we don't know how to set "Merge and center cells with labels" using Excel JS.

Step 3

Execute following code:

    private excelCrashStep3 = async () => {
        await Excel.run(async (context: Excel.RequestContext) => {
            const sheet = context.workbook.worksheets.getActiveWorksheet();

            // Add new row
            const table = sheet.tables.getItem("TestTable");
            table.rows.add(undefined, [
                ["a2", "b2", "c2"]
            ]);
            await context.sync();

            // Refresh all pivot tables
            sheet.pivotTables.refreshAll(); // !!! Excel crashes here
        });
    }

Context

This is one case where we have found Excel crashing with office-js API and are able to reliable repeat it. There seems to be many other cases, too, that we are still studying and trying to find code to repeat them.

Note that without "Merge and center cells with labels" Excel does not crash. But in our case "Merge and center cells with labels" (and Tabular layout) is what we want to use.

Your Environment

Useful logs

Faulting application name: EXCEL.EXE, version: 16.0.11328.20222, time stamp: 0x5c95d1e1
Faulting module name: EXCEL.EXE, version: 16.0.11328.20222, time stamp: 0x5c95d1e1
Exception code: 0xc0000005
Fault offset: 0x000185ee
Faulting process id: 0x4d38
Faulting application start time: 0x01d4eb8554b3b00d
Faulting application path: C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE
Faulting module path: C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE
Report Id: a8c26bba-f98b-49ae-82ea-00c6715d61da
Faulting package full name: 
Faulting package-relative application ID: 

Problem signature: P1: EXCEL.EXE P2: 16.0.11328.20222 P3: 5c95d1e1 P4: EXCEL.EXE P5: 16.0.11328.20222 P6: 5c95d1e1 P7: c0000005 P8: 000185ee P9: P10:

Attached files: \?\C:\Users\Harri\AppData\Local\Temp{BD64DE78-4CCA-4B96-9A8E-37C906559B51} - OProcSessId.dat \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA500.tmp.WERInternalMetadata.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA530.tmp.xml \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA54E.tmp.csv \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERA55F.tmp.txt

These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_EXCEL.EXE_d52f04e8cac6b5fa48c8bcfc3bc6c2d35ba28fd_00000000_7c9eb0e7

Analysis symbol: Rechecking for solution: 0 Report Id: a8c26bba-f98b-49ae-82ea-00c6715d61da Report Status: 268435456 Hashed bucket: 6fe40635ab4bf0f0d38c0d556fc860a2 Cab Guid: 0


Content of **Report.wer** file in C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_EXCEL.EXE_d52f04e8cac6b5fa48c8bcfc3bc6c2d35ba28fd_00000000_7c9eb0e7

Version=1 EventType=APPCRASH EventTime=131989247187960281 ReportType=2 Consent=1 UploadTime=131989247189431804 ReportStatus=268435456 ReportIdentifier=f6cb2eed-9282-49cc-b691-315110361e51 IntegratorReportIdentifier=a8c26bba-f98b-49ae-82ea-00c6715d61da Wow64Host=34404 Wow64Guest=332 OriginalFilename=Excel.exe AppSessionGuid=00004d38-0003-0034-0db0-b35485ebd401 TargetAppId=W:0006171b160a18280e1fd3d283a4a4d72d1b00000000!000015b3fc229f08917df241d927aedd61d8b7dc5f52!EXCEL.EXE TargetAppVer=2019//03//23:06:27:45!2973cfd!EXCEL.EXE BootId=4294967295 TargetAsId=32458 IsFatal=4294967295 Response.BucketId=6fe40635ab4bf0f0d38c0d556fc860a2 Response.BucketTable=1 Response.LegacyBucketId=1408515444058906786 Response.type=4 Sig[0].Name=Application Name Sig[0].Value=EXCEL.EXE Sig[1].Name=Application Version Sig[1].Value=16.0.11328.20222 Sig[2].Name=Application Timestamp Sig[2].Value=5c95d1e1 Sig[3].Name=Fault Module Name Sig[3].Value=EXCEL.EXE Sig[4].Name=Fault Module Version Sig[4].Value=16.0.11328.20222 Sig[5].Name=Fault Module Timestamp Sig[5].Value=5c95d1e1 Sig[6].Name=Exception Code Sig[6].Value=c0000005 Sig[7].Name=Exception Offset Sig[7].Value=000185ee DynamicSig[1].Name=OS Version DynamicSig[1].Value=10.0.17134.2.0.0.768.101 DynamicSig[2].Name=Locale ID DynamicSig[2].Value=8192 UI[2]=C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE LoadedModule[0]=C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll LoadedModule[2]=C:\WINDOWS\System32\KERNEL32.DLL LoadedModule[3]=C:\WINDOWS\System32\KERNELBASE.dll LoadedModule[4]=C:\WINDOWS\SYSTEM32\apphelp.dll LoadedModule[5]=C:\WINDOWS\System32\ole32.dll LoadedModule[6]=C:\WINDOWS\System32\combase.dll LoadedModule[7]=C:\WINDOWS\System32\ucrtbase.dll LoadedModule[8]=C:\Program Files (x86)\Microsoft Office\root\Office16\AppVIsvSubsystems32.dll LoadedModule[9]=C:\WINDOWS\System32\RPCRT4.dll LoadedModule[10]=C:\WINDOWS\System32\SspiCli.dll LoadedModule[11]=C:\WINDOWS\System32\CRYPTBASE.dll LoadedModule[12]=C:\WINDOWS\System32\bcryptPrimitives.dll LoadedModule[13]=C:\WINDOWS\System32\sechost.dll LoadedModule[14]=C:\WINDOWS\System32\GDI32.dll LoadedModule[15]=C:\WINDOWS\System32\gdi32full.dll LoadedModule[16]=C:\WINDOWS\System32\USER32.dll LoadedModule[17]=C:\WINDOWS\System32\msvcp_win.dll LoadedModule[18]=C:\WINDOWS\System32\win32u.dll LoadedModule[19]=C:\WINDOWS\System32\ADVAPI32.dll LoadedModule[20]=C:\Program Files (x86)\Microsoft Office\root\Office16\c2r32.dll LoadedModule[21]=C:\WINDOWS\System32\msvcrt.dll LoadedModule[22]=C:\WINDOWS\System32\OLEAUT32.dll LoadedModule[23]=C:\WINDOWS\System32\SHELL32.dll LoadedModule[24]=C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll LoadedModule[25]=C:\WINDOWS\System32\cfgmgr32.dll LoadedModule[26]=C:\WINDOWS\SYSTEM32\MSVCP140.dll LoadedModule[27]=C:\WINDOWS\System32\shcore.dll LoadedModule[28]=C:\WINDOWS\System32\windows.storage.dll LoadedModule[29]=C:\WINDOWS\System32\shlwapi.dll LoadedModule[30]=C:\WINDOWS\System32\kernel.appcore.dll LoadedModule[31]=C:\WINDOWS\System32\profapi.dll LoadedModule[32]=C:\WINDOWS\System32\powrprof.dll LoadedModule[33]=C:\WINDOWS\System32\FLTLIB.DLL LoadedModule[34]=C:\WINDOWS\SYSTEM32\USERENV.dll LoadedModule[35]=C:\WINDOWS\System32\IMM32.DLL LoadedModule[36]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\mso20win32client.dll LoadedModule[37]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\mso30win32client.dll LoadedModule[38]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\mso40uiwin32client.dll LoadedModule[39]=C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.17134.648_none_73ddcaa59f7149a6\gdiplus.dll LoadedModule[40]=C:\WINDOWS\SYSTEM32\dwmapi.dll LoadedModule[41]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\mso50win32client.dll LoadedModule[42]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\mso98win32client.dll LoadedModule[43]=C:\WINDOWS\SYSTEM32\WTSAPI32.dll LoadedModule[44]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\mso.dll LoadedModule[45]=C:\WINDOWS\SYSTEM32\VERSION.dll LoadedModule[46]=C:\WINDOWS\SYSTEM32\msi.dll LoadedModule[47]=C:\WINDOWS\SYSTEM32\bcrypt.dll LoadedModule[48]=C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.648_none_42f2d7c044decfd8\Comctl32.dll LoadedModule[49]=C:\WINDOWS\SYSTEM32\d2d1.dll LoadedModule[50]=C:\WINDOWS\system32\uxtheme.dll LoadedModule[51]=C:\WINDOWS\System32\MSCTF.dll LoadedModule[52]=C:\WINDOWS\SYSTEM32\WINSTA.dll LoadedModule[53]=C:\WINDOWS\SYSTEM32\dxgi.dll LoadedModule[54]=C:\WINDOWS\SYSTEM32\d3d11.dll LoadedModule[55]=C:\WINDOWS\System32\DriverStore\FileRepository\igdlh64.inf_amd64_f1d1d01ad984f535\igd10iumd32.dll LoadedModule[56]=C:\WINDOWS\SYSTEM32\ncrypt.dll LoadedModule[57]=C:\WINDOWS\SYSTEM32\NTASN1.dll LoadedModule[58]=C:\WINDOWS\System32\DriverStore\FileRepository\igdlh64.inf_amd64_f1d1d01ad984f535\igc32.dll LoadedModule[59]=C:\WINDOWS\SYSTEM32\ntmarta.dll LoadedModule[60]=C:\WINDOWS\SYSTEM32\Secur32.dll LoadedModule[61]=C:\WINDOWS\System32\clbcatq.dll LoadedModule[62]=C:\Windows\System32\Windows.Security.Authentication.Web.Core.dll LoadedModule[63]=C:\WINDOWS\System32\CRYPT32.dll LoadedModule[64]=C:\WINDOWS\System32\MSASN1.dll LoadedModule[65]=C:\Windows\System32\AppXDeploymentClient.dll LoadedModule[66]=C:\WINDOWS\SYSTEM32\wintypes.dll LoadedModule[67]=C:\Windows\System32\twinapi.appcore.dll LoadedModule[68]=C:\Windows\System32\StateRepository.Core.dll LoadedModule[69]=C:\Windows\System32\RMCLIENT.dll LoadedModule[70]=C:\WINDOWS\SYSTEM32\mscoree.dll LoadedModule[71]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll LoadedModule[72]=C:\WINDOWS\SYSTEM32\DWrite.dll LoadedModule[73]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\riched20.dll LoadedModule[74]=C:\WINDOWS\SYSTEM32\XmlLite.dll LoadedModule[75]=C:\WINDOWS\System32\netprofm.dll LoadedModule[76]=C:\WINDOWS\System32\WS2_32.dll LoadedModule[77]=C:\WINDOWS\System32\npmproxy.dll LoadedModule[78]=C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL LoadedModule[79]=C:\WINDOWS\System32\NSI.dll LoadedModule[80]=C:\WINDOWS\SYSTEM32\webservices.dll LoadedModule[81]=C:\Windows\System32\Windows.System.Profile.RetailInfo.dll LoadedModule[82]=C:\WINDOWS\SYSTEM32\sppc.dll LoadedModule[83]=C:\Windows\System32\iertutil.dll LoadedModule[84]=C:\Windows\System32\OneCoreCommonProxyStub.dll LoadedModule[85]=C:\Windows\System32\vaultcli.dll LoadedModule[86]=C:\WINDOWS\System32\Normaliz.dll LoadedModule[87]=C:\WINDOWS\SYSTEM32\CRYPTSP.dll LoadedModule[88]=C:\WINDOWS\SYSTEM32\WINHTTP.dll LoadedModule[89]=C:\WINDOWS\system32\rsaenh.dll LoadedModule[90]=C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL LoadedModule[91]=C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL LoadedModule[92]=C:\Windows\System32\Windows.Web.dll LoadedModule[93]=C:\WINDOWS\System32\DPAPI.dll LoadedModule[94]=C:\WINDOWS\SYSTEM32\urlmon.dll LoadedModule[95]=C:\Windows\System32\aadWamExtension.dll LoadedModule[96]=C:\WINDOWS\SYSTEM32\WININET.dll LoadedModule[97]=C:\WINDOWS\SYSTEM32\ondemandconnroutehelper.dll LoadedModule[98]=C:\WINDOWS\system32\mswsock.dll LoadedModule[99]=C:\WINDOWS\SYSTEM32\WINNSI.DLL LoadedModule[100]=C:\WINDOWS\SYSTEM32\webio.dll LoadedModule[101]=C:\WINDOWS\SYSTEM32\DNSAPI.dll LoadedModule[102]=C:\Windows\System32\rasadhlp.dll LoadedModule[103]=C:\Program Files (x86)\Microsoft Office\root\Office16\oart.dll LoadedModule[104]=C:\WINDOWS\System32\fwpuclnt.dll LoadedModule[105]=C:\WINDOWS\SYSTEM32\dcomp.dll LoadedModule[106]=C:\WINDOWS\system32\twinapi.dll LoadedModule[107]=C:\WINDOWS\system32\TextInputFramework.dll LoadedModule[108]=C:\WINDOWS\system32\CoreUIComponents.dll LoadedModule[109]=C:\WINDOWS\system32\CoreMessaging.dll LoadedModule[110]=C:\Windows\System32\msxml6.dll LoadedModule[111]=C:\WINDOWS\System32\schannel.dll LoadedModule[112]=C:\WINDOWS\SYSTEM32\mskeyprotect.dll LoadedModule[113]=C:\WINDOWS\system32\ncryptsslp.dll LoadedModule[114]=C:\WINDOWS\SYSTEM32\d3d10_1.dll LoadedModule[115]=C:\WINDOWS\SYSTEM32\d3d10_1core.dll LoadedModule[116]=C:\WINDOWS\SYSTEM32\WindowsCodecs.dll LoadedModule[117]=c:\Program Files (x86)\Common Files\Microsoft Shared\VSTO\vstoee.dll LoadedModule[118]=c:\Program Files (x86)\Common Files\Microsoft Shared\VSTO\10.0\VSTOLoader.dll LoadedModule[119]=C:\WINDOWS\SYSTEM32\MSVCR100.dll LoadedModule[120]=C:\WINDOWS\SYSTEM32\MSVCP100.dll LoadedModule[121]=C:\WINDOWS\SYSTEM32\oledlg.dll LoadedModule[122]=C:\WINDOWS\system32\directmanipulation.dll LoadedModule[123]=C:\WINDOWS\SYSTEM32\MSIMG32.dll LoadedModule[124]=C:\WINDOWS\SYSTEM32\usp10.dll LoadedModule[125]=C:\Windows\System32\Windows.Globalization.dll LoadedModule[126]=C:\Windows\System32\Bcp47Langs.dll LoadedModule[127]=C:\Windows\System32\bcp47mrm.dll LoadedModule[128]=C:\WINDOWS\SYSTEM32\globinputhost.dll LoadedModule[129]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\MSPTLS.DLL LoadedModule[130]=C:\WINDOWS\System32\msxml3.dll LoadedModule[131]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll LoadedModule[132]=C:\WINDOWS\SYSTEM32\MSVCR120_CLR0400.dll LoadedModule[133]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\mscorlib\9e5fb54bb42672f30445fd7d36d2f815\mscorlib.ni.dll LoadedModule[134]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System\c0994859a3042efc9742c38560611eaf\System.ni.dll LoadedModule[135]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.V5499e76b#\93f3d4e86e4bff84085175fe00dc761f\Microsoft.VisualStudio.Tools.Office.Runtime.Internal.ni.dll LoadedModule[136]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.O5949707a#\a22222fab8f47de52a828a5368bfaf06\Microsoft.Office.Tools.ni.dll LoadedModule[137]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Core\4f172eb9ef81ba1bd6013111bb28d877\System.Core.ni.dll LoadedModule[138]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.V883708cb#\f8b0a8d460b43e38600d63e271f23cb4\Microsoft.VisualStudio.Tools.Applications.Runtime.ni.dll LoadedModule[139]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.Vf9a08577#\fe911a10b6d5f83c7938d1efd2f9ca03\Microsoft.VisualStudio.Tools.Applications.Hosting.ni.dll LoadedModule[140]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.Oe2e369ff#\e6228106873186d522570e010c939560\Microsoft.Office.Tools.Excel.Implementation.ni.dll LoadedModule[141]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.O4a946565#\eda2ce1daf82b162a8881c4893d43755\Microsoft.Office.Tools.Common.Implementation.ni.dll LoadedModule[142]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.O854200f9#\fd4a3ca6a5bf12e47584dd2037be7fd9\Microsoft.Office.Tools.Common.ni.dll LoadedModule[143]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.O4161a3a3#\8ebd0d9b4e6f6becfcf9c737c0d96ec6\Microsoft.Office.Tools.Excel.ni.dll LoadedModule[144]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.O2eb0cc9a#\83237a09f5fa65c83dffae5756f31771\Microsoft.Office.Tools.v4.0.Framework.ni.dll LoadedModule[145]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Drawing\ea30ae1302ede2b30d7b70fe65cf12d8\System.Drawing.ni.dll LoadedModule[146]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\63fd619b39b7d0d303607ce0f7132db8\System.Windows.Forms.ni.dll LoadedModule[147]=C:\WINDOWS\system32\mlang.dll LoadedModule[148]=C:\Windows\System32\cryptnet.dll LoadedModule[149]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll LoadedModule[150]=C:\Program Files\Common Files\Microsoft Shared\Team Foundation Server\15.0\x86\TFSOfficeAdd-in.dll LoadedModule[151]=C:\WINDOWS\SYSTEM32\sxs.dll LoadedModule[152]=C:\WINDOWS\system32\dataexchange.dll LoadedModule[153]=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\x86\VSTOExcelAdaptor.dll LoadedModule[154]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Xml\f71225c38cd3420200689412958881f6\System.Xml.ni.dll LoadedModule[155]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Security\36effc9dd742489d9037858081b86f7d\System.Security.ni.dll LoadedModule[156]=C:\WINDOWS\SYSTEM32\PROPSYS.dll LoadedModule[157]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Configuration\0c052fccd4c571e447fdc8dd115777d8\System.Configuration.ni.dll LoadedModule[158]=C:\Program Files (x86)\Microsoft Office\root\Office16\gfx.dll LoadedModule[159]=C:\WINDOWS\SYSTEM32\srpapi.dll LoadedModule[160]=C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA7.1\VBE7.DLL LoadedModule[161]=C:\WINDOWS\SYSTEM32\UIAutomationCore.DLL LoadedModule[162]=C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.17134.648_none_40ff37d245123ba5\COMCTL32.dll LoadedModule[163]=C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA7.1\VBEUI.DLL LoadedModule[164]=C:\WINDOWS\System32\WINTRUST.dll LoadedModule[165]=C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA7.1\1033\VBE7INTL.DLL LoadedModule[166]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\CustomMarshalers\9ae32454132e4f0849753062ec6e2834\CustomMarshalers.ni.dll LoadedModule[167]=C:\WINDOWS\Microsoft.Net\assembly\GAC_32\CustomMarshalers\v4.0_4.0.0.0b03f5f7f11d50a3a\CustomMarshalers.dll LoadedModule[168]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\Microsoft.CSharp\50563b84d4b178cb6ace5be511a2f534\Microsoft.CSharp.ni.dll LoadedModule[169]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Dynamic\08f0eb5ea222045a383e2ada47f96532\System.Dynamic.ni.dll LoadedModule[170]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Data\dc4dceb5cb327e684dd93ea13ef9a286\System.Data.ni.dll LoadedModule[171]=C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0b77a5c561934e089\System.Data.dll LoadedModule[172]=C:\Program Files (x86)\Microsoft Office\root\Office16\OSFSHARED.DLL LoadedModule[173]=C:\Program Files (x86)\Microsoft Office\root\Office16\MSOHEV.DLL LoadedModule[174]=C:\WINDOWS\SYSTEM32\LINKINFO.dll LoadedModule[175]=C:\Program Files (x86)\Microsoft Office\Root\Office16\MSIPC\msipc.dll LoadedModule[176]=C:\Program Files (x86)\Microsoft Office\Root\Office16\MSIPC\ipcsecproc.dll LoadedModule[177]=C:\WINDOWS\SYSTEM32\edputil.dll LoadedModule[178]=C:\Program Files (x86)\Microsoft Office\root\Office16\MsoAriaNext.dll LoadedModule[179]=C:\Windows\System32\Windows.Networking.Connectivity.dll LoadedModule[180]=C:\Windows\System32\Windows.Security.Authentication.OnlineId.dll LoadedModule[181]=C:\Windows\System32\OneCoreUAPCommonProxyStub.dll LoadedModule[182]=C:\Program Files (x86)\Microsoft Office\root\Office16\OSF.DLL LoadedModule[183]=C:\Program Files (x86)\Microsoft Office\root\Office16\OSFUI.DLL LoadedModule[184]=C:\WINDOWS\SYSTEM32\rometadata.dll LoadedModule[185]=C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\1033\OSFINTL.DLL LoadedModule[186]=C:\Windows\System32\ieproxy.dll LoadedModule[187]=C:\Program Files (x86)\Microsoft Office\Root\Office16\OSFROAMINGPROXY.DLL LoadedModule[188]=C:\WINDOWS\SYSTEM32\FirewallAPI.dll LoadedModule[189]=C:\WINDOWS\SYSTEM32\fwbase.dll LoadedModule[190]=C:\WINDOWS\SYSTEM32\D3D10Warp.dll LoadedModule[191]=C:\WINDOWS\SYSTEM32\gpapi.dll State[0].Key=Transport.DoneStage1 State[0].Value=1 ProcessMetadata[0].Key=OfficeProcArch ProcessMetadata[0].Value=x86 ProcessMetadata[1].Key=InstallType ProcessMetadata[1].Value=2 ProcessMetadata[2].Key=DeviceClass ProcessMetadata[3].Key=Channel ProcessMetadata[3].Value=CC ProcessMetadata[4].Key=AudienceGroup ProcessMetadata[4].Value=Production OsInfo[0].Key=vermaj OsInfo[0].Value=10 OsInfo[1].Key=vermin OsInfo[1].Value=0 OsInfo[2].Key=verbld OsInfo[2].Value=17134 OsInfo[3].Key=ubr OsInfo[3].Value=648 OsInfo[4].Key=versp OsInfo[4].Value=0 OsInfo[5].Key=arch OsInfo[5].Value=9 OsInfo[6].Key=lcid OsInfo[6].Value=1033 OsInfo[7].Key=geoid OsInfo[7].Value=77 OsInfo[8].Key=sku OsInfo[8].Value=101 OsInfo[9].Key=domain OsInfo[9].Value=0 OsInfo[10].Key=prodsuite OsInfo[10].Value=768 OsInfo[11].Key=ntprodtype OsInfo[11].Value=1 OsInfo[12].Key=platid OsInfo[12].Value=10 OsInfo[13].Key=sr OsInfo[13].Value=0 OsInfo[14].Key=tmsi OsInfo[14].Value=423424 OsInfo[15].Key=osinsty OsInfo[15].Value=1 OsInfo[16].Key=iever OsInfo[16].Value=11.648.17134.0-11.0.115 OsInfo[17].Key=portos OsInfo[17].Value=0 OsInfo[18].Key=ram OsInfo[18].Value=16270 OsInfo[19].Key=svolsz OsInfo[19].Value=475 OsInfo[20].Key=wimbt OsInfo[20].Value=0 OsInfo[21].Key=blddt OsInfo[21].Value=180410 OsInfo[22].Key=bldtm OsInfo[22].Value=1804 OsInfo[23].Key=bldbrch OsInfo[23].Value=rs4_release OsInfo[24].Key=bldchk OsInfo[24].Value=0 OsInfo[25].Key=wpvermaj OsInfo[25].Value=0 OsInfo[26].Key=wpvermin OsInfo[26].Value=0 OsInfo[27].Key=wpbuildmaj OsInfo[27].Value=0 OsInfo[28].Key=wpbuildmin OsInfo[28].Value=0 OsInfo[29].Key=osver OsInfo[29].Value=10.0.17134.648.amd64fre.rs4_release.180410-1804 OsInfo[30].Key=buildflightid OsInfo[30].Value=0AA5E289-E8CB-4F08-ACEB-971D71933A65.1 OsInfo[31].Key=edition OsInfo[31].Value=Core OsInfo[32].Key=ring OsInfo[33].Key=expid OsInfo[34].Key=containerid OsInfo[35].Key=containertype OsInfo[36].Key=edu OsInfo[36].Value=0 FriendlyEventName=Stopped working ConsentKey=APPCRASH AppName=Microsoft Excel AppPath=C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE ApplicationIdentity=00000000000000000000000000000000 MetadataHash=-282913291

xiruatms commented 5 years ago

Thanks a lot for reporting this issue, the information you've provided are clear and enough. It's confirmed that this issue can be reproduced with Office version number: 1902 32-bit following your steps.

If you have subscriptions to Office 365, will you please upgrade to the latest one ( Office version number: 1903 Build 11425.20202 32-bit or newer) ? Your steps should be working well.

Please take a try to see whether it works for you.

harri-rajala-koivu-solutions commented 5 years ago

I updated to 1903 Build 11425.20202 32-bit and Excel does not crash any more. It is good that Excel does crash, but now pivotTable.refreshAll() does not work correctly.

After calling pivotTable.refreshAll() pivot table is broken in your Excel sheet. You can reproduce that by adding more lines to Step 3.

Change this from Step 3:

            table.rows.add(undefined, [
                ["a2", "b2", "c2"],
            ]);

To this:

            table.rows.add(undefined, [
                ["a2", "b2", "c2"],
                ["x1", "e", "q"],
                ["x1", "g", "q"],
                ["x2", "b", "q"],
                ["x3", "b", "q"],
                ["x4", "c", "q"],
                ["x4", "g", "q"],
                ["x5", "a", "q"],
                ["x6", "d", "q"],
                ["x7", "c", "q"],
                ["x7", "f", "q"],
                ["x7", "g", "q"]
            ]);

And then do the exact same steps 1, 2 and 3 (remember to select "Merge and center cells with labels").

You can see that after Step 3 Pivot table is broken. Pivot colors are wrong and if you go to for example cell "x4" (Test1 column in pivot table) you can see that Excel does not recognize that cell as a part of Pivot Table.

Please let me know if you where able to reproduce this issue.

dmahugh commented 5 years ago

Thanks for the detailed information and repro steps, @harri-rajala-koivu-solutions . @JuaneloJuanelo and/or @keyur32, can you take a look at this and/or assign to somebody else who can?

tutieu commented 5 years ago

Tracking bug #3287759