Bug 105188 - Crash when closing LibreOffice after opening Master Pages deck in SfxModule::GetResMgr()
Summary: Crash when closing LibreOffice after opening Master Pages deck in SfxModule::...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.3.0.0.beta2
Hardware: All All
: highest critical
Assignee: Michael Stahl (allotropia)
URL: http://crashreport.libreoffice.org/st...
Whiteboard: target:5.4.0 target:5.3.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-01-08 14:40 UTC by Telesto
Modified: 2017-01-16 11:34 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: ["SfxModule::GetResMgr()"]


Attachments
bt with symbols (12.34 KB, text/plain)
2017-01-08 21:49 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-01-08 14:40:17 UTC
Description:
LibreOffice will when closing Impress after opening the Master Pages deck

Steps to Reproduce:
1.Open Impress
2. Select a template -> Cancel
3. Click the Master Pages button in the Sidebar
4. Close Impress/Libreoffice

Actual Results:  
LibreOffice will crash

Expected Results:
No crash


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 5.4.0.0.alpha0+
Build ID: 92a1ad1f36b6d3cc13135a8c0805508933011577
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-06_23:42:59
Locale: nl-NL (nl_NL); Calc: CL

and in
Version: 5.4.0.0.alpha0+
Build ID: 7a1add76d542e9929c1feab9e06949990e236616
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-12-22_23:56:14
Locale: nl-NL (nl_NL); Calc: CL

and in
Version: 5.3.0.0.beta2+
Build ID: f4b7650ecd46e5404b35dccfb8b7d3b0a385d633
CPU Threads: 4; OS Version: Windows 6.2; UI Render: GL; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-3, Time: 2016-12-16_12:19:09
Locale: nl-NL (nl_NL); Calc: CL



User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 V Stuart Foote 2017-01-08 16:04:53 UTC
Confirming with STR listed.

On Windows 10 Pro 64-bit en-US with
Version: 5.3.0.1 (x64)
Build ID: 3b800451b1d0c48045de03b5b3c7bbbac87f20d9
CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: CL

Version: 5.3.0.0.beta2 (x64)
Build ID: a7e30712ad6d8bc9286007b37aa581983e0caba3
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: en-US (en_US); Calc: CL

stacktrace shows against Crashreport signature SfxModule::GetResMgr()

5.3.0.1 64-bit en-US
http://crashreport.libreoffice.org/stats/crash_details/fe7dd781-988c-49a3-a5f7-ecbb089c1380

5.3.0beta2 64-bit en-US
http://crashreport.libreoffice.org/stats/crash_details/88dbc276-1e00-44d4-8be1-b79beaeff7a3
Comment 2 Julien Nabet 2017-01-08 21:49:15 UTC
Created attachment 130267 [details]
bt with symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 3 Julien Nabet 2017-01-08 21:51:57 UTC
Mark/Noel: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=f7b1cd66167050afecf487e3d89ea12de74200b5, thought you might be interested in this one.
Comment 4 Xisco Faulí 2017-01-10 13:56:13 UTC
Regression introduced by:

author	Mark Page <aptitude@btconnect.com>	2016-07-04 16:30:42 (GMT)
committer	Noel Grandin <noelgrandin@gmail.com>	2016-07-13 06:32:46 (GMT)
commit f7b1cd66167050afecf487e3d89ea12de74200b5 (patch)
tree 75381b63bb5dca7ed1fa2ff5602064750f46f042
parent 633413a37ee7442cd899db1269fd3ef404efe58a (diff)
Moved SfxModule owner to SfxApplication
::GetAppData replaced with SfxApplication::GetModule
that now returns SfxModule*

SfxModule no longer registers self for ownership
instead it is now registered using SfxApplication::SetModule

Change-Id: Ifbbe1b2b4c5122da8e643b7926d47878d116c6c8
Reviewed-on: https://gerrit.libreoffice.org/26914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>

Adding Cc: to Mark Page
Comment 5 aptitude 2017-01-10 14:40:54 UTC
That was unexpected. I am unsure what is wrong without delving back into the code
Comment 6 Xisco Faulí 2017-01-10 14:48:34 UTC
maybe Noel can provide some insights here...(In reply to aptitude from comment #5)
> That was unexpected. I am unsure what is wrong without delving back into the
> code

@Noel, Do you have any idea why the code is crashing?
Comment 7 Michael Stahl (allotropia) 2017-01-12 23:30:48 UTC
well that was a subtle change... goes to show that there's no such thing as a risk-free change to destruction order in c++...

fixed on master.
Comment 8 Commit Notification 2017-01-12 23:31:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=983ac87793a891855c7d25c42fe795908543716c

tdf#105188 sd: fix shutdown crash after accessing master pages

It will be available in 5.4.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.
Comment 9 Commit Notification 2017-01-16 11:34:33 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=821b9ee9ba4ab13c3525009eb7e6a8fd60176dd7&h=libreoffice-5-3

tdf#105188 sd: fix shutdown crash after accessing master pages

It will be available in 5.3.0.2.

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.