Bug 99973 - Crash when changing Locale Setting in options
Summary: Crash when changing Locale Setting in options
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0
Keywords: haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2016-05-20 21:46 UTC by Julien Nabet
Modified: 2016-10-25 19:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt + console logs (5.74 KB, text/plain)
2016-05-20 21:46 UTC, Julien Nabet
Details
Error screenshot (14.07 KB, image/png)
2016-05-20 23:24 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2016-05-20 21:46:44 UTC
Created attachment 125197 [details]
bt + console logs

On pc Debian x86-64 with master sources updated today + brand new profile, I got a crash when changing Locale Settings.

Steps to reproduce:
1) Launch LO
2) Menu Tools/Options
3) Language Settings/Languages
4) Change Locale Setting
5) Click OK
=> Crash
Comment 1 Julien Nabet 2016-05-20 21:48:44 UTC
I don't reproduce this with LO Debian package 5.1.3.2

I found that the commit which caused regression was:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=0f6725454823a5789f3e1c70dad024c46d3f6fc9

this part specifically:
diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx
index 28b64bb..e336775 100644
--- a/unotools/source/config/options.cxx
+++ b/unotools/source/config/options.cxx
@@ -68,8 +68,8 @@ void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint )
         nHint |= m_nBlockedHint;
         m_nBlockedHint = 0;
         if ( mpList ) {
-            for ( size_t n = 0; n < mpList->size(); n++ ) {
-                (*mpList)[ n ]->ConfigurationChanged( this, nHint );
+            for (ConfigurationListener* n : *mpList) {
+                n->ConfigurationChanged( this, nHint );
             }
         }
     }
Comment 2 Aron Budea 2016-05-20 21:55:44 UTC
I got this after building master last weekend on Windows 7, but couldn't reproduce with one of the daily builds this week, so I thought it was gone. Apparently it isn't.

As it's a crash, and right before the beta, raising priority to critical.
Comment 3 Aron Budea 2016-05-20 22:01:16 UTC
Noel, could you take a look?
Comment 4 Julien Nabet 2016-05-20 22:11:24 UTC
gcc (Debian 5.3.1-19)

Noel: I don't know why modernize-loop-convert doesn't work in this specific case.
So for the moment, it seems to me that the only way to avoid the crash is to revert this specific part of the commit.
Any thoughts?
Comment 5 Julien Nabet 2016-05-20 22:13:38 UTC
Sorry Aron, I've overwriten the status when I've applied my changes.
I put it back to NEW/critical
Comment 6 m_a_riosv 2016-05-20 23:24:32 UTC
Created attachment 125201 [details]
Error screenshot

This is the error message with:
Win10x64
Version: 5.2.0.0.alpha1+
Build ID: 7b704dfbdb23540ff6366fa60c73474bbda9dc26
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-05-20_05:45:40

after click on skip (omitir) I can follow without restart.
Comment 7 Commit Notification 2016-05-24 06:55:43 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3a077c0c3f41575cdce7e7e2f65916b0e8eb85dd

tdf#99973 - Crash when changing Locale Setting in options

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.
Comment 8 Caolán McNamara 2016-05-24 10:22:36 UTC
I'll set this as fixed seeing as NoelGs comments suggests that
Comment 9 Julien Nabet 2016-05-24 19:38:34 UTC
On pc Debian x86-64 with master sources updated today, I confirm I don't reproduce this.
Thank you Noel for the fix.