Bug 142022 - Invalid pointer crash on closing Calc in VclBuilder::disposeBuilder
Summary: Invalid pointer crash on closing Calc in VclBuilder::disposeBuilder
Status: RESOLVED DUPLICATE of bug 141769
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
: 142023 142025 142026 142027 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-01 17:15 UTC by Nico
Modified: 2021-06-07 07:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["cppu::OInterfaceContainerHelper::disposeAndClear(com::sun::star::lang::EventObject const &)"]


Attachments
Skia from Options>LO>Display (123.71 KB, image/png)
2021-05-01 21:13 UTC, Nico
Details
Skia from Advanced > Advanced config (123.02 KB, image/png)
2021-05-01 21:33 UTC, Nico
Details
7.1.1.2 trace (47.94 KB, text/plain)
2021-05-02 11:56 UTC, Nico
Details
7.1.3.2 trace (50.13 KB, text/plain)
2021-05-02 12:00 UTC, Nico
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nico 2021-05-01 17:15:11 UTC
This bug was filed from the crash reporting server and is br-72108637-dd4b-44fb-8e36-2b521ecde571.
=========================================
Hi
Whenever I create a new Calc file, open an existing one, when exiting, I crash LO Calc.
No issue with Text.
Uninstalled my updated version, 
Deleted my LO profile
Remains as is.
7.x crashes... with various crash debug reoprts I will post
HTH
Comment 1 Julien Nabet 2021-05-01 18:11:53 UTC
Before reporting new bugs which are quite similar, could you give a try at https://wiki.documentfoundation.org/QA/FirstSteps ?
Comment 2 Julien Nabet 2021-05-01 18:14:43 UTC
*** Bug 142023 has been marked as a duplicate of this bug. ***
Comment 3 Nico 2021-05-01 18:59:22 UTC
Hi Julien
Thanks for comments,
Reported duplicate as not same exact for me so, many causes same effect... up for you to delete if real duplicate... Sorry for so.
As for the 1st steps...
I was using LO for years with no issue. May be caused by Windows 20H2 update or hardware/driver update from Lenovo...
7.1.2 latest used on a fresh install (after uninstall previous)
Profile deleted (no matter on it)
Graphic issue (no GL, but not default either)
  Version: 7.1.2.2 (x64) / LibreOffice Community
  Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
  CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
  Locale: fr-FR (fr_FR); UI: fr-FR
  Calc: threaded
Computation-related : NA as am not even using, just open, close (using x) and I fail.
As about Skia... am really unclear where to go to change... just found in some similar params screen (as am FR and menue does not reallt fit translated ones from the help file) ForceSkiaRaster = true...
And I still have the issue...
So, what's next doctor ?
Comment 4 Julien Nabet 2021-05-01 19:05:50 UTC Comment hidden (obsolete)
Comment 5 V Stuart Foote 2021-05-01 20:52:33 UTC
(In reply to Julien Nabet from comment #4)
> If you have last graphic driver + last Windows updates + I must recognize
> I'm stuck.
> 
> V Stuart: any idea here? (thought you might have some hints for a Windows
> specific problem)

Nothing jumps out, though the Intel UHD Graphics 620 (0x5917) DCH driver 27.20.100.8854 is a bit dated--current is 27.20.100.9466. 

And, looking at the crash reports the Vulkan driver 0.402.662 and API 1.2.151 seems off.  Current for 9477 DCH pkg is Vulkan driver 0.402.1274 and API 1.2.170

Since both crash reports were with Calc, guess it could be OpenCL related.

For OP, does issue with crash with Calc stop if you disable the Skia/Vulkan by forcing Skia/Raster?  Or disable Skia rendering completely?  

Done by check box from Tools -> Options -> View and restart LO.

=-ref-=
[1] https://downloadcenter.intel.com/download/30381/Intel-Graphics-Windows-10-DCH-Drivers
Comment 6 Nico 2021-05-01 21:13:49 UTC
Created attachment 171577 [details]
Skia from Options>LO>Display
Comment 7 Nico 2021-05-01 21:33:02 UTC
Created attachment 171578 [details]
Skia from Advanced > Advanced config
Comment 8 Nico 2021-05-01 21:41:07 UTC
Hi Guys,

As from 1st steps help files mentioned previously, I uninstalled latest 7.1.2 and removed my profile (deleted LO folder from AppData).
Reboot,
Back to 7.0.5. 
Worked like a charm :D

In the meantime I upgraded Java that was outdated...

Upgraded to latest 7.1.2 and back to crash !
As for the drivers, I trust Windows Update and Lenovo Vantage Update, and none of the both warn about vidéo driver update :/
BTW, jumped to Intel Drivers Update for a quick check... am just late for BT and NVMe according to Intel compared to Lenovo Vantage
https://www.intel.com/content/www/us/en/support/intel-driver-support-assistant.html report the same updates whenever I look to FR or US site...

Just pushed screen shots

As for #1, from regular options checked boxes, and I still crash :/

As for #2, from advanced options I found, ForceSkiaRaster, I set to TRUE (was FALSE), and not better....

BTW, when crashing, most of the time, LO closes properly (and warn for recovery at next startup), but sometimes, it keeps looping the splash screen at startup. At that time I have 2 processes running : 2x soffice.exe and 2x soffice.bin 

It does crash only with Calc, new file, exit is enough to crash.
Text works like a charm.

What else could I check ?
Not to fancy to update drivers, to prevent jeopardize config which is safe...

As about Skia, does not even know about and where it comes from and/or updates...

Should i have a try to nightly builds or RC ? LibreOffice_7.1.3.2_Win_x64.msi ?

Best
Comment 9 Nico 2021-05-01 22:25:18 UTC
LibreOffice_7.1.3.2 fails the same way
Tried both params, disable Skia and force raster

Thx Julien, Stuart for comment'n clues ;o)
Comment 10 V Stuart Foote 2021-05-01 22:34:44 UTC
Might also check the Tools -> Options -> LibreOffice -> OpenCL, is its checkbox enabled? If so, uncheck and retest.
Comment 11 Nico 2021-05-01 22:42:20 UTC Comment hidden (obsolete)
Comment 12 V Stuart Foote 2021-05-02 03:46:54 UTC
(In reply to Nico from comment #11)
> Not checked by default...
> Checked, and same crash.
> 
> Gave a try, after deleting my LO profile, I checked it (along with Skia
> which came back)... and also failing :/

OK those were all the simple steps, next would be to obtain a back trace. It will work better against the 7.1 builds compared to against master/7.2 because the symbols are fully published for the release builds, but it is involved to get set up. Steps are here:

https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg

It is a hassle but it would really help to isolate the component causing the crashes on your system.  Unfortunately the generic !analyze -v (or !analyze -f) command will often not resolve, and you have to use a "~* kp" to list the stack with symbols for all the threads to tease out the call(s) causing the crash.

A local WinDbg run can do a more complete stack trace than what is submitted by the automated mini-dump based crash reporting mechanism, which you have already reported against the generic mergedlo.dll.

The whole WinDbg tool can be a challenge.
Comment 13 QA Administrators 2021-05-02 03:50:32 UTC Comment hidden (obsolete)
Comment 14 Nico 2021-05-02 11:56:16 UTC
Created attachment 171588 [details]
7.1.1.2 trace
Comment 15 Nico 2021-05-02 12:00:10 UTC
Created attachment 171589 [details]
7.1.3.2 trace
Comment 16 Nico 2021-05-02 12:01:23 UTC
Hey !
Yes, a challenge and hassle but am not alone, hopefully ;o)
Main issue is there for the now : which version of LO should I install and run ? Puzzled with 7.1 and 7.2 from manual and downloads ?
Does 7.1 stands for 7.1.1.x ?
I have 7.1.1.2 fresh installed, and LO user profile deleted.
Attached are both trace for 7.1.1.2 (and 7.1.3.2)
Let me know if matching your needs
Comment 17 Julien Nabet 2021-05-02 14:54:38 UTC
Let's focus on the 7.1.2.2 (7.1.3 hasn't been released yet).
It shows vclplug_winlo!dtrans_CWinClipboard_get_implementation.
Did you install any software or enable any specific option concerning clipboard?
If yes, could you uninstall/disable it for a try?

Could you confirm you don't do any copy paste or something before the crash?

Indeed, it makes me think about tdf#62196 (put in See also where last comments indicate the pb would be fixed, at least for Windows, from next release 7.1.3).

Of course, I may be wrong, it's just some hypothesis.
Comment 18 Nico 2021-05-02 15:15:28 UTC
Hi Julien,

To reproduce :
- stat LO from the LO icon on desktop or quicklaunch
- request for a new calc
- close LO from the top right x
100% reproducible.

Sometimes I have a small windows, no file listed, for a crash warning, sometimes, not.
At next startup, I allays have a recovery request.
only for Calc as I tried all other apps, even if no much use.
Since all my changes and tries, I had 2 or 3 freeze, where LO is unable to quit.

Clipboard, feel I have not special tool for so.
Computer is with touch screen, should that be something to deal with Microsoft ink ?

What is certain is that when I start Calc, I do not try to copy or paste
No running tool that catch clipboard or some kind.

Am 7.1.1.2 will move to 7.1.2

Will have a loop at clipboard
Comment 19 V Stuart Foote 2021-05-02 15:38:24 UTC
(In reply to Nico from comment #16)
> Hey !
> Yes, a challenge and hassle but am not alone, hopefully ;o)

;-)

> Main issue is there for the now : which version of LO should I install and
> run ? Puzzled with 7.1 and 7.2 from manual and downloads ?
> Does 7.1 stands for 7.1.1.x ?

No, I was not clear, you did great! 

Next to rule-out issue has already been corrected, you would need to test against a nightly build of master/7.2, except it would be installed in parallel as a /a Administrative install. 

Guidance is here [1], but pay attention to complete the 'User configuration' section to isolate each install from your own Windows user account.

To explain a bit more, 7.1 is the "Fresh" release branch and 7.1.3.2 is just the latest incremental release build of that branch. The release builds are archived and include HASH and Mirror details so you can conveniently download [2].

You said you had no issues with a 7.0 "Still" incremental 7.0.5 build, and this crash on close of Calc started with a 7.1 release 7.1.2.2 build.  So some change has been included in the 7.1 branch that is affecting your system.

The current development master branch against a 7.2 release, and there are nightly test builds on our TinderBox infrastructure.  TB77 is rolling out nightly builds of Windows 64-bit builds of current master against what will become a 7.2 release. [3]

An issue that can be reproduced on current master builds with consistent "Steps to Reproduce" (STR) with a good back trace/stack trace from a release with symbols helps the devs identify what is happening.  But the TB77 nightly Windows builds don't include symbols. 

Obtaining a useful stack trace with symbols against master would require a full Windows Studio install and git fetch of the source to build LibreOffice locally--just like a TinderBox--except you'd have the symbols and source code to run the WinDbg against. We don't expect you to do that!

We just need reproducible STR, and sometimes a problem document to work against. The automated crash reports and now the WinDbg traces you've done also help immensely.  We just need to figure out why installs on your system are crashing but seemingly no one else--Julian and I can not reproduce. Hence his question about memory manager or other 3rd party apps.

Thanks!

=-refs-=
[1] https://wiki.documentfoundation.org/Installing_in_parallel 
[2] https://downloadarchive.documentfoundation.org/libreoffice/old/
[3] https://dev-builds.libreoffice.org/daily/master/
Comment 20 Nico 2021-05-02 18:28:05 UTC
Correct, Went back to Version: 7.0.5.2 (x64)
Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a
and no issue. So easy to reproduce a safe config ;o)

I removed and deleted my profile.
No need of parallel against a stable version right now.

So, getting latest 7.2
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/2021-05-02_04.58.07/LibreOfficeDev_7.2.0.0.alpha0_Win_x64.msi

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: aa38eede9d340cbb11a792ab1ebbe681521a4489
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded

Same issue, new Calc, close, reopen Calc, LO just warn about recovering a file !

So, for the debug (WinDbg (X64)), which version should I target (as I do not have Visual studio ;o)) ?
Let me know what I do to help
Comment 21 V Stuart Foote 2021-05-02 18:38:04 UTC
(In reply to Nico from comment #20)
> 
> Same issue, new Calc, close, reopen Calc, LO just warn about recovering a
> file !
> 

So regards the STR. When you close--are you closing LibreOffice (the big X) or just the Calc document (the smaller X beneath it)?

Also, on your Windows 10 (20H2), did you enable the new built-in Windows Clipboard feature? It is off by default, and not present on Windows 10 releases earlier than 1909 (I think).
Comment 22 Nico 2021-05-02 19:03:59 UTC
Both fail the same way, big X  for LO and the small x for the Calc document.
If I also create a new Text document (so get 2 docs opened the same time, Calc and Text), both crash if I wanna close the Calc !

I did not enabled something for the clipboard... Was not even aware !
But when I use copy/paste, it looks regular... no special panel.
No sync accros devices
The only option I had was Clipboard history, I disabled it and not better.

I was by default as 
https://i.pcmag.com/imagery/lineupitems/06qNyYmYdkYtjcjaTHgfe40.1569506955.fit_lim.size_800x440.png
I cleared, for a try, not better.
I set history to off, and not better !
Am back to on then.

But wonder what could cause so in my profile since 7.1 !
Seems to e profile dependent and not system wide !


As for Dbg, please let me know which version tu test with Win Dbg !
Comment 23 Julien Nabet 2021-05-03 19:14:22 UTC
I succeeded on building LO master sources on Win10.
I use enable-dbgutil and tried with and without Clipboard history enable, not crash.

Do you use any accessibility tools? If yes could you disable them and give a new try?
Also, which locale setting and which language UI do you use? (Tools/Options/Language Settings/Languages).
Comment 24 Nico 2021-05-03 21:01:36 UTC
Accessibility tools : none as far am aware... 
I "just" have a touch screen on computer, dual screen, a dock, my watch dock, a BT mouse
So, side of that, no accessibility... No clipboard tool (side of Windows embed)
Am using FR (by default UI) - FR local params.

I disconnected all, same issue.

I deleted LO user's profile
launch LO, clic on Calc, close using top right X
All looks fine, no warning.

If I delete LO user's profile, all goes fine, I can reproduce what I just explained before. no error.

If I keep LO user's profile, I get the warning to recover a file (but I did not had the warning when closing)

Really wonder what's running making LO failing :/

Any other test I could run ?
Comment 25 Nico 2021-05-03 21:04:17 UTC Comment hidden (obsolete)
Comment 26 Julien Nabet 2021-05-04 17:50:12 UTC
I got no more idea.
Since I can't help here, uncc myself then.
Comment 27 V Stuart Foote 2021-05-04 18:16:00 UTC
@Nico,

When you install are your including the Quick Start -- it leaves an instance of soffice.bin running all the time.  With your 'X' close of LO is it completely shutting down, or not (and leaving an soffice.bin running)?

Check in the Windows WDM "Task Manager" -> Details tab for a still running process.
Comment 28 Nico 2021-05-04 18:43:08 UTC
Hi, 
As from command prompt, after computer reboot...
c:\>tasklist | find "soffice"
reports no instance.
Not normal, as guess I asked for the quick start, but not sure for the dev version am running right now.
When I crash, generally there is no soffice pending.
I just crashed, after couple tries and on this one, I get both .exe and .bin ruunning.
Normal use
C:\>tasklist | find "soffice"
soffice.exe                  17896 Console                    1    14 284 Ko
soffice.bin                   5668 Console                    1   340 888 Ko

When both remains
C:\>tasklist | find "soffice"
soffice.exe                  17896 Console                    1    14 284 Ko
soffice.bin                   5668 Console                    1   340 888 Ko
soffice.exe                  12856 Console                    1    14 268 Ko
soffice.bin                  11572 Console                    1   260 380 Ko

I could get more to test, new nightly or other... Just let me know what to test.
I could remove and reinstall w/without the qui start mode...

This is profile dependent I guess, but unable to focus the differences side of my regular profile and a new one...
Comment 29 Nico 2021-05-08 12:21:52 UTC Comment hidden (obsolete)
Comment 30 V Stuart Foote 2021-05-08 14:02:19 UTC
(In reply to Nico from comment #29)
> Hi Stuart,
> Any update ? hint ?
> Best

Since this crash is Calc module only, could possibly be OpenCL related.

What is the status of the Tools -> Options -> LibreOffice -> OpenCL panel's 'Allow use of OpenCL' checkbox?

And likewise, does toggling a Calc session's Tools -> Options -> LibreOffice Calc -> Calculate panel's 'Enable multi-threaded caclculation' checkbox have any effect?
Comment 31 V Stuart Foote 2021-05-08 14:16:22 UTC
@Eike, other Widnows QA types can't reproduce. But for this user two solid WinDbg traces with 7.1.1 and again at 7.1.3 release builds, same for them on master.  Could this be a "weld" thing?
Comment 32 Nico 2021-05-09 18:07:02 UTC
Looks session dependent and not computer wide...

Open CL is not checked

As other option, it was enabled, so I disabled parallel use of the cpu (latest item on the window), not really better...
1st shot, it worked, on the second one, I had the recovery window, and when closing, LO hangs :(
And finally, Windows sait LO not responding, close or wait...

For a clean new start, I just delete user's profile and then, no warning, no recovery...

Was running Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: aa38eede9d340cbb11a792ab1ebbe681521a4489
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc:

Getting latest build for a try... May 8th

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2ed8c34bca56c1a30d727b21d9096cb77e88197a
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded

ANd same issue.

I noticed that the .lck file remains when starting and recovering.
It is deleted when starting safe mode (but next startup, get the recovery back... so effect is short time !)

Want a new crash debug file ? A new report with latest debug I run ? Other that could help focusing source ?
Comment 33 Nico 2021-05-09 18:16:29 UTC
As WinDbg, if want new test with specific version, please point me to the version to download and I will have a try
Comment 34 Timur 2021-05-12 12:08:56 UTC
Is it Windows 7 64-bit, LO 64-bit?
Bug 142119 could be a duplicate. 
Not sure if dual monitor is of importance, please try without it.
Comment 35 Nico 2021-05-13 15:10:37 UTC
I run W10 Pro 64 20H2 (Version 10.0.19042 Build 19042)

As for LO (Dev version no other installed right now)
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2ed8c34bca56c1a30d727b21d9096cb77e88197a
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded

As for dual monitor, I also tried with just the desktop (no dock station, no usb device, even my BT mouse switched off...)

remains as is, Calc crash each time I exit using the top right big X, the smallest one just bellow

HTH
Comment 36 Timur 2021-05-14 05:40:43 UTC
You can try Lo 32-bit and also see if crash occurs on File-Close or Exit. 
Could be related to bug 141403.
Comment 37 V Stuart Foote 2021-05-14 14:33:48 UTC
*** Bug 142027 has been marked as a duplicate of this bug. ***
Comment 38 V Stuart Foote 2021-05-14 14:34:22 UTC
*** Bug 142026 has been marked as a duplicate of this bug. ***
Comment 39 V Stuart Foote 2021-05-14 14:41:01 UTC
*** Bug 142025 has been marked as a duplicate of this bug. ***
Comment 40 V Stuart Foote 2021-05-14 15:53:29 UTC
@Nico, don't think we confirmed the behavior with the Skia rendering modes disabled.

With Skia checked off, so disabled--and the 'Use hardware acceleration' unchecked (so default GDI rendering on CPU only)--what happens with your test steps?
Comment 41 Xisco Faulí 2021-05-27 15:20:49 UTC
This looks like a dupe of bug 141769

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