| Summary: | Crash after showing mailmerge toolbar and showing preview | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Arnaud Versini <arnaud.versini> |
| Component: | Writer | Assignee: | Julien Nabet <serval2412> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | arnaud.versini, h3734236, kendy, serval2412 |
| Priority: | high | Keywords: | haveBacktrace, regression |
| Version: | 5.2.0.0.alpha0+ | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:5.2.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | Crash stack trace | ||
Kendy, is this related to your recent modifications on mail merge ? On pc Debian x86-64 with master sources updated today, I could reproduce this.
This straightforward patch avoids the crash but as often, perhaps I just hide/workaround the real problem:
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 9ff9992..a492d9c 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -208,7 +208,11 @@ void SwModule::StateOther(SfxItemSet &rSet)
case FN_MAILMERGE_LAST_ENTRY:
{
SwView* pView = ::GetActiveView();
- SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
+ SwMailMergeConfigItem* pConfigItem = nullptr;
+ if (pView)
+ {
+ pConfigItem = pView->GetMailMergeConfigItem();
+ }
if (!pConfigItem)
rSet.DisableItem(nWhich);
else
Julien: This looks fine to me - can you please push that? I think ideally in the form of -SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem(); +SwMailMergeConfigItem* pConfigItem = pView? pView->GetMailMergeConfigItem(): nullptr; The further code handles the 'pConfigItem == nullptr' just OK. Thanks a lot! No pb, I'll do it tonight when I get back home :-) Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a79b1192c3241a350115e5a653935bb6986a9099 tdf#98787: Crash after showing mailmerge toolbar and showing preview It will be available in 5.2.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. |
Created attachment 123748 [details] Crash stack trace Step to reproduce : - show the mailmerge toolbar, - show the document preview, - Writer crash on a null pointer.