Bug 107458 - Crash when just displaying LibreLogo and click >> (accessibility/gtk/gtk3)
Summary: Crash when just displaying LibreLogo and click >> (accessibility/gtk/gtk3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:5.4.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2017-04-26 20:15 UTC by Julien Nabet
Modified: 2017-04-30 20:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (6.48 KB, text/plain)
2017-04-26 20:15 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-04-26 20:15:31 UTC
Created attachment 132874 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated yesterday, I got a crash when trying to use LibreLogo.

1) Open Writer
2) Click menu View
3) Select Toolbars/Logo
4) Click on >> (at right) to display the rest of Logo bar
=> crash
Comment 1 Julien Nabet 2017-04-26 20:17:23 UTC
Caolán: thought you might be interested in this one since it concerns accessibility part through gtk/gtk3 part (see bt)
Comment 2 Julien Nabet 2017-04-26 20:27:53 UTC
I thought about this straightforward patch:
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index aa4cad63acb8..55ab3e7a0899 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -461,8 +461,10 @@ void VCLXAccessibleToolBox::HandleSubToolBarEvent( const VclWindowEvent& rVclWin
         && pToolBox == pChildWindow->GetParent()
         && pChildWindow->GetType() == WindowType::TOOLBOX )
     {
-        ToolBox::ImplToolItems::size_type nIndex = pToolBox->GetItemPos( pToolBox->GetCurItemId() );
-        Reference< XAccessible > xItem = getAccessibleChild( nIndex );
+        sal_Int32 nIndex = static_cast<sal_Int32>(pToolBox->GetItemPos( pToolBox->GetCurItemId() ));
+        if (nIndex < 0)
+            return;
+        Reference< XAccessible > xItem = getAccessibleChild(nIndex);
             //TODO: ToolBox::ImplToolItems::size_type -> sal_Int32!
         if ( xItem.is() )
         {


What do you think?
Comment 3 Xisco Faulí 2017-04-26 22:08:01 UTC
Regression introduced by:

author	Maxim Monastirsky <momonasmon@gmail.com>	2017-02-12 20:14:48 (GMT)
committer	Maxim Monastirsky <momonasmon@gmail.com>	2017-02-12 21:56:29 (GMT)
commit 81d4fbc0daa54889ccb09e6a3fadff9c70d99448 (patch)
tree e76c9281a295dda0e1b25316efc77640ad3dc3bf
parent e5aa7a5b5753c57969fc2e17fb334781bb2a0481 (diff)
tdf#42029 Use a floating toolbar to show clipped items

Bisected with bibisect-linux-64-5.4

Adding Cc: to Maxim Monastirsky
Comment 4 Xisco Faulí 2017-04-26 22:18:46 UTC
In gtk2 it doesn't crash but LibreOffice freezes. Not reproducible on Windows 7
Comment 5 Commit Notification 2017-04-27 06:05:56 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7c4c9947b8e52ce67af1ab131ed583a41f0ddbfa

tdf#107458 No active item for the overflow subtoolbar

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 6 Julien Nabet 2017-04-30 20:35:04 UTC
Thank you Maxim for your patch, I confirm it's ok with it.