Bug 126006 - Calc with Tabbed UI used to crash after File>>Reload; many toolbar items aren't working including save
Summary: Calc with Tabbed UI used to crash after File>>Reload; many toolbar items aren...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: All All
: medium major
Assignee: Justin L
Whiteboard: target:24.2.0
Keywords: haveBacktrace, implementationError
: 151066 (view as bug list)
Depends on:
Blocks: AutoFilter Notebookbar-Tabbed
  Show dependency treegraph
Reported: 2019-06-19 15:31 UTC by Doug B
Modified: 2023-10-17 22:41 UTC (History)
7 users (show)

See Also:
Crash report or crash signature: ["SfxViewFrame::GetFrame()"]

Example CSV file (19 bytes, text/csv)
2019-06-26 21:33 UTC, Doug B
bt with debug symbols (4.56 KB, text/plain)
2019-09-17 18:10 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description Doug B 2019-06-19 15:31:58 UTC
If you add auto filter, reload the doc, and then try to toggle auto filter, the program will crash.

I used the CSV file format.

I've never looked at the Libreoffice code, but I have a feeling the solution is to update the state of the auto filter button after a document reload is performed.

Steps to Reproduce:
1.) Open a document. I used a CSV.
2.) Turn on the auto filter.
2.) Edit the file in another program. I used a text editor.
4.) In Libreoffice, go to File>>Reload.
5.) Try to toggle the auto filter. It will crash.

Actual Results:
Crashy, crash crash

Expected Results:
No crash

Reproducible: Always

User Profile Reset: No

Additional Info:
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 m_a_riosv 2019-06-19 22:41:22 UTC Comment hidden (obsolete)
Comment 2 Doug B 2019-06-20 13:06:46 UTC
Just figured out a new piece of the puzzle. (Tried it in safe mode)

It's a problem with the Auto Filter button in the Tabbed user interface mode. Will update the reproduction steps.
Comment 3 Doug B 2019-06-20 13:12:42 UTC
Ok, I don't think it's possible for me to edit the Steps to Reproduce, so I'll put it here.

Steps to Reproduce:
1.) Open a document. I used a CSV.
2.) If it is not already enabled, turn on the Tabbed User Interface mode
3.) Turn on the auto filter.
4.) In Libreoffice, go to File>>Reload.
5.) Try to toggle the auto filter. It will crash.
Comment 4 Roman Kuznetsov 2019-06-26 20:52:18 UTC
no crash in

Version: (x64)
Build ID: c0d1bdbb8a9aca2ef2e475268a953da995567700
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-06-22_23:10:51
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

please attach your CSV file here
Comment 5 Doug B 2019-06-26 21:33:21 UTC
Created attachment 152434 [details]
Example CSV file

CSV is attached.

Here is a screencast: https://youtu.be/4eHJYB688as

Also worth mentioning my desktop environment is KDE.

I cannot generate a backtrace, but I do see this error: 

Executable: soffice PID: 12665 Signal: Segmentation fault (11) Time: 6/26/19 17:26:33
Comment 6 Doug B 2019-06-26 21:35:14 UTC
If I start KDE from the terminal, here is the output that happens during a crash:

(soffice:13638): Gdk-WARNING **: 17:34:07.442: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = soffice.bin path = /usr/lib/libreoffice/program pid = 13638
KCrash: Arguments: /usr/lib/libreoffice/program/soffice.bin --nocrashhandler 
KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
Comment 7 Doug B 2019-06-26 21:35:38 UTC
Apologies. I meant "If I start Libreoffice"
Comment 8 QA Administrators 2019-06-27 02:57:21 UTC Comment hidden (obsolete)
Comment 9 Timur 2019-09-12 09:08:41 UTC
KDE is not necessary, I reproduced with LO6.3 and 6.4+ in Mint's gtk3.
Interesting, no Reload in Tabbed UI in File tab, so I had to use menu. 
On Reload, I Cancel All Changes. Filter seems lost, but icon stays on in Data tab. (that's the difference to old toolbar icon, that one would be turned off).
When I try to turn it off (to turn it on again) Lo crashes with crash report.
I have an issue that I don't see a link in crash report. Doug, if you do, please add it to "Crash report or crash signature:" field.
Comment 10 Xisco Faulí 2019-09-17 14:03:33 UTC
Also reproduced in

Versión: (x86)
Id. de compilación: b79626edf0065ac373bd1df5c28bd630b4424273
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded
Comment 11 Xisco Faulí 2019-09-17 14:06:33 UTC Comment hidden (obsolete)
Comment 12 Julien Nabet 2019-09-17 18:10:11 UTC
Created attachment 154236 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today + gtk3, I could reproduce this.
Comment 13 Timur 2021-04-07 09:17:34 UTC Comment hidden (obsolete)
Comment 14 Timur 2021-04-07 09:24:53 UTC
Repro 7.2+, only with Reload via File in Menubar. No repro with Close.
Comment 15 Stéphane Guillou (stragu) 2021-06-19 23:33:19 UTC
Reproduced with:

Version: / LibreOffice Community
Build ID: 94d552f94b427f884c004dba5d4619ecf729d605
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-18_13:30:27
Calc: threaded

Couldn't find "reload" so used the new command palette shortcut Ctrl + F1 and searched for "reload".
Comment 16 QA Administrators 2023-06-20 03:13:17 UTC Comment hidden (obsolete, spam)
Comment 17 Justin L 2023-06-29 13:33:17 UTC
It isn't just filter, it is pretty much anything.
For example, before a reload I can freeze/split windows, but after a reload, nothing works.

I don't see the same problem in Writer.
Comment 18 Justin L 2023-06-29 16:14:04 UTC
*** Bug 151066 has been marked as a duplicate of this bug. ***
Comment 19 ady 2023-06-30 02:13:57 UTC
(In reply to Justin L from comment #18)
> *** Bug 151066 has been marked as a duplicate of this bug. ***

I am not sure that bug 151066 should be considered as duplicate of bug 126006.

If the crash that was reproduced in this bug 126006 is no longer so, but the behavior as described in bug 151066 still is, then this bug 126006 could be closed and bug 151066 could be kept opened, to be resolved.
Comment 20 Justin L 2023-06-30 14:47:14 UTC
(In reply to ady from comment #19)
> I am not sure that bug 151066 should be considered as duplicate of bug
> 126006.
Actually, the crash information is an excellent clue for finding the root of the problem. A crash usually means that a pointer no longer points to something valid. Well, that makes sense in this case. If the toolbar points to something that no longer exists, then it will not work.  Fixing the crash generally just means ignoring the bad pointer, so now we no longer crash, but still do nothing. And that is exactly what we are seeing with this bug report.

The crash was fixed in LO 7.3/7.2.x/7.1.x with commit 7cbd6d768d282077053c354254315f3dc89bf254
Author: Michael Stahl on Wed Jun 30 13:26:59 2021 +0200
    sfx2: try to fix lifecycle of SfxOfficeDispatch

Comment 21 Justin L 2023-06-30 19:03:42 UTC
The first difference I noticed is in sfx2/source/control/unoctitm.cxx dispatch,
where if ( !pDispatcher && pBindings ) has neither pDispatcher nor pBindings after a reload.

The old SfxDispatchController_Impl notified SfxHintId::Dying, and a new SfxDispatchController_Impl has been created, but when clicking on the button, the old SfxDispatchController_Impl is responding.
Comment 22 Commit Notification 2023-07-01 10:36:57 UTC Comment hidden (obsolete)
Comment 23 Commit Notification 2023-07-01 17:00:30 UTC Comment hidden (obsolete)
Comment 24 Justin L 2023-07-03 15:20:48 UTC
Comment 22 contains a patch that "fixes" the problem. However, in testing it appeared that UITests got hung up more easily with this change. So it was reverted.

Looking at the Writer fixes this copied, they all seem rather fragile. So while it is a nice code pointer, it probably needs so more fundamental analysis and fix.
Comment 25 Commit Notification 2023-07-17 22:01:07 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":


Revert "Revert "tdf#126006 sc SID_RELOAD: restart notebookbar""

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.