Bug Hunting Session
Bug 95824 - Crash: when opening Function Wizard
Summary: Crash: when opening Function Wizard
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha1
Hardware: x86-64 (AMD64) Linux (All)
: highest critical
Assignee: Julien Nabet
URL:
Whiteboard: target:5.1.0
Keywords: haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2015-11-14 21:20 UTC by Julien Nabet
Modified: 2016-10-25 19:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (10.76 KB, text/plain)
2015-11-14 21:20 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2015-11-14 21:20:22 UTC
Created attachment 120544 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today (da05c05edef729a2865158db4086b74785c45208), I've got a crash when opening Formula dialog

1) Launch Calc
2) Click Function Wizard button
=> Crash
Comment 1 Buovjaga 2015-11-15 18:34:28 UTC
No repro.

Ubuntu 15.10 64-bit 
Version: 5.1.0.0.alpha1+
Build ID: 7272e8df62a12d6172b297d7a82a0265cd1bc44a
TinderBox: Linux-rpm_deb-x86_64@70-TDF-dbg, Branch:master, Time: 2015-11-15_00:23:07
Locale: en-US (en_US.UTF-8)

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: b216cc1b8096eb60c27f67e8c27b7cd756c75e38
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-11-12_00:06:20
Locale: fi-FI (fi_FI)
Comment 2 raal 2015-11-15 19:38:32 UTC
I can confirm with Version: 5.1.0.0.alpha1+
Build ID: 7272e8df62a12d6172b297d7a82a0265cd1bc44a
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-11-14_23:41:14
Comment 3 Julien Nabet 2015-11-16 18:04:31 UTC
Michael: thought you might have some idea about this one. Could it be related to http://cgit.freedesktop.org/libreoffice/core/commit/?id=ccde2360d5c29bb99008cfae5ab3675bee4ca46c ?
Comment 4 Julien Nabet 2015-11-16 18:15:15 UTC
With this, it seems ok:
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 7e8262e..e4d466e 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -88,8 +88,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
         }
     }
 
-    if (m_pDoc == nullptr)
-        m_pDoc = pViewData->GetDocument();
+    m_pDoc = pViewData->GetDocument();
     m_xParser.set(ScServiceProvider::MakeInstance(SC_SERVICE_FORMULAPARS, static_cast<ScDocShell*>(m_pDoc->GetDocumentShell())),uno::UNO_QUERY);
     uno::Reference< beans::XPropertySet> xSet(m_xParser,uno::UNO_QUERY);
     xSet->setPropertyValue(SC_UNO_COMPILEFAP, uno::makeAny(sal_True));


It seems it's due to conversion static->member, m_pDoc isn't initialized to nullptr.
Comment 5 Julien Nabet 2015-11-16 18:30:26 UTC
I submitted the patch to review, see https://gerrit.libreoffice.org/#/c/20004/
Comment 6 Commit Notification 2015-11-16 19:35:40 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=72ac345ab4eea1654bb5eb01ce9901c90102300c

tdf#95824: Crash: when opening Function Wizard

It will be available in 5.1.0.

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

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