Bug 138524 - Crash: Change User Interface mode on inserted OLE object.
Summary: Crash: Change User Interface mode on inserted OLE object.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Notebookbar-Tabbed
  Show dependency treegraph
 
Reported: 2020-11-27 11:39 UTC by sawakaze
Modified: 2021-08-07 11:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
ScreenCast (1.35 MB, video/x-matroska)
2020-11-27 11:41 UTC, sawakaze
Details
bt with debug symbols (6.13 KB, text/plain)
2020-11-27 17:41 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sawakaze 2020-11-27 11:39:51 UTC
Description:
after following steps, libreoffice was crashed.
if my description is uncleared, please see screencast.

Steps to Reproduce:
1. Open Calc
2. menu -> View -> User interface..
-> launch "Selecy You Preferred User Interface" dialog
3. UI variant -> Tabbed
4. press "Apply to All"
5. press close 
-> close dialog
6. press Insert tab and OLE Object
7. Select Presentation
-> insert presentation
8. menu -> User interface...
9. set UI variants to "sidebar" ,press Apply to All and close.
10. click any cell
-> application crash.
 

Actual Results:
application crash.
after this crash, when open impress, impress is crashed.
On step.6, Impress UI was not TabUI

Expected Results:
Not crash


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I confirm this version

Version: 7.1.0.0.beta1
Build ID: 828a45a14a0b954e0e539f5a9a10ca31c81d8f53
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (C); UI: en-US
Calc: threaded

----
I downloaded from 
https://dev-builds.libreoffice.org/pre-releases/deb/x86_64/
----

OS :Linux Ubuntu MATE
Desktop Env: MATE
Comment 1 sawakaze 2020-11-27 11:41:10 UTC
Created attachment 167617 [details]
ScreenCast

if my report is uncleared, please see screencast
Comment 2 Julien Nabet 2020-11-27 17:41:47 UTC
Created attachment 167623 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got a crash but not exactly at the same time.
Comment 3 Julien Nabet 2020-11-28 12:46:54 UTC
After some debugging, the root cause is in sfx2/source/notebookbar/SfxNotebookBar.cxx here:
OUString sFile = lcl_getNotebookbarFileName( eApp );
See https://opengrok.libreoffice.org/xref/core/sfx2/source/notebookbar/SfxNotebookBar.cxx?r=d5552b8b#345
    345         OUString sFile = lcl_getNotebookbarFileName( eApp );
=> sFile = "Sidebar"
    346         OUString sNewFile = rUIFile + sFile;
=> sNewFile=modules/simpress/ui/Sidebar
    347         OUString sCurrentFile;
    348         VclPtr<NotebookBar> pNotebookBar = pSysWindow->GetNotebookBar();
    349         if ( pNotebookBar )
    350             sCurrentFile = pNotebookBar->GetUIFilePath();
=> sCurrentFile=modules/scalc/ui/notebookbar.ui
    351 
    352         bool bChangedFile = sNewFile != sCurrentFile;
=> bChangedFile = true
    353 
    354         if ((!sFile.isEmpty() && bChangedFile) || !pNotebookBar || !pNotebookBar->IsVisible()
    355             || bReloadNotebookbar || comphelper::LibreOfficeKit::isActive())
    356         {
...
    372             OUString aBuf = rUIFile + sFile;
=> aBuf=modules/simpress/ui/Sidebar (why not reusing sNewFile?)
...
    390             pSysWindow->SetNotebookBar(aBuf, xFrame, aNotebookBarAddonsItem , bReloadNotebookbar);
=> crash because SetNotebookBar expects a ui file

However not sure what's the right thing to do, return false after line 345 is sFile doesn't start with notebookbar (since there are several ui files:
notebookbar.ui, notebookbar_compact.ui, notebookbar_groupedbar_full.ui, etc.)?

Andreas: any thoughts here?