Bug 108349 - Assertion failed when opening attachment from tdf#98888
Summary: Assertion failed when opening attachment from tdf#98888
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:5.5.0 target:5.4.0.1
Keywords: haveBacktrace, regression
Depends on:
Blocks: Assert
  Show dependency treegraph
 
Reported: 2017-06-05 20:39 UTC by Julien Nabet
Modified: 2017-06-07 21:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (6.49 KB, text/plain)
2017-06-05 20:39 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2017-06-05 20:39:42 UTC
Created attachment 133864 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got a crash with this step:

Open https://bugs.documentfoundation.org/attachment.cgi?id=123850
=> crash
soffice.bin: /home/julien/lo/libreoffice/include/o3tl/strong_int.hxx:99: constexpr o3tl::strong_int<UNDERLYING_TYPE, PHANTOM_TYPE>::strong_int(T, typename std::enable_if<std::is_integral<T>::value, int>::type) [with T = short int; UNDERLYING_TYPE = short unsigned int; PHANTOM_TYPE = LanguageTypeTag; typename std::enable_if<std::is_integral<T>::value, int>::type = int]: Assertion `detail::isInRange<UNDERLYING_TYPE>(value) && "out of range"' failed.

Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=c70d49c7c888da8cfd73db8585e7be1f37fc398a
Comment 1 Julien Nabet 2017-06-05 20:41:16 UTC
Noel: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=c70d49c7c888da8cfd73db8585e7be1f37fc398a, could you give a look?
Comment 2 Xisco Faulí 2017-06-05 21:04:08 UTC
I can't reproduce it in

Version: 5.5.0.0.alpha0+
Build ID: f2d40b8ba172d90be9a43c30cd5cbd62c0e8e548
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 3 Julien Nabet 2017-06-06 05:13:46 UTC
(In reply to Xisco Faulí from comment #2)
> I can't reproduce it in
> 
> Version: 5.5.0.0.alpha0+
> Build ID: f2d40b8ba172d90be9a43c30cd5cbd62c0e8e548
> CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
> Locale: ca-ES (ca_ES.UTF-8); Calc: group

I think it's because it needs enable-dbgutil to reproduce this.
Comment 4 Eike Rathke 2017-06-06 21:06:30 UTC
And that's why we should not call it "crash" but "assertion failed" instead ;-)
Comment 5 Michael Stahl (CIB) 2017-06-06 21:59:46 UTC
i have a fix, but need to ask jenkins which compilers are ok with it

https://gerrit.libreoffice.org/38473
Comment 6 Commit Notification 2017-06-07 11:00:28 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=93a41b20538f18344eb1b8c23b1eae134212b141

tdf#108349: fix LanguageType conversions from UNO "short"

It will be available in 5.5.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 7 Michael Stahl (CIB) 2017-06-07 11:28:00 UTC
foxed pm ,aster
Comment 8 Julien Nabet 2017-06-07 12:17:52 UTC
Michael: do you think it could help to backport the patch on 5.4 branch? Indeed, even if it's an assert, perhaps this could trigger other bugs?
(I can cherry-pick it, quite straightforward to do)
Comment 9 Eike Rathke 2017-06-07 13:08:58 UTC
Just cherry-pick to 5-4.
Comment 10 Commit Notification 2017-06-07 13:57:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2e5e92eed940ea1992f7962b43b6bfcea0daf08b&h=libreoffice-5-4

tdf#108349: fix LanguageType conversions from UNO "short"

It will be available in 5.4.0.1.

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 11 Julien Nabet 2017-06-07 21:07:21 UTC
With master sources updated today (815324285b994036299fe7bbf47d61e07322ffcc), I don't reproduce this.
Thank you Michael!