Bug 65450 - Writer crash on File->Open
Summary: Writer crash on File->Open
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Isamu Mogi
URL:
Whiteboard: target:4.2.0 target:4.1.0.1
Keywords: regression
Depends on:
Blocks: mab4.1
  Show dependency treegraph
 
Reported: 2013-06-06 10:20 UTC by Pierre-Eric Pelloux-Prayer
Modified: 2013-06-11 11:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Stacktrace (2.33 KB, text/plain)
2013-06-06 10:20 UTC, Pierre-Eric Pelloux-Prayer
Details
bibisect4.0+ result (3.16 KB, text/plain)
2013-06-06 10:20 UTC, Pierre-Eric Pelloux-Prayer
Details
Minimal patch to fix the issue (1.11 KB, patch)
2013-06-06 12:18 UTC, Pierre-Eric Pelloux-Prayer
Details
Patch to keep it alive rollover effect (1.23 KB, patch)
2013-06-07 10:53 UTC, Isamu Mogi
Details
smallest version of p-e's patch (532 bytes, patch)
2013-06-07 11:37 UTC, Caolán McNamara
Details
Not to call Menubar selection logic (4.32 KB, patch)
2013-06-08 12:54 UTC, Isamu Mogi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Eric Pelloux-Prayer 2013-06-06 10:20:20 UTC
Created attachment 80388 [details]
Stacktrace

Writer crashes here when reproducing those steps:
  1) start LO and create a new Writer document
  2) File -> New and create a new Presentation
  3) Move the Presentation Windows, and click File -> Open on Writer _without_ focusing the windows first
Comment 1 Pierre-Eric Pelloux-Prayer 2013-06-06 10:20:50 UTC
Created attachment 80389 [details]
bibisect4.0+ result
Comment 2 Pierre-Eric Pelloux-Prayer 2013-06-06 10:56:41 UTC
And I'm using Gnome3 - maybe it's relevant here.

Also, the crash is reproducible when using "SAL_USE_VCLPLUGIN=gen" too.
Comment 3 Pierre-Eric Pelloux-Prayer 2013-06-06 12:01:54 UTC
Reverting 8eb1fb9eff4d4eea9c0c1c2e8d3b380e227b5d50 seems to fix the issue.
Comment 4 Pierre-Eric Pelloux-Prayer 2013-06-06 12:18:20 UTC
Created attachment 80396 [details]
Minimal patch to fix the issue

This patch prevents the crash, but it probably breaks rollover effect added in 8eb1fb9eff4d4eea9c0c1c2e8d3b380e227b5d50
Comment 5 Pierre-Eric Pelloux-Prayer 2013-06-06 12:28:02 UTC
Adding original author to CC
Comment 6 Julien Nabet 2013-06-06 21:43:08 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this crash.
Comment 7 Julien Nabet 2013-06-06 21:45:12 UTC
Increase importance since it's a crash + regression
Comment 8 Isamu Mogi 2013-06-07 09:06:30 UTC
Oops

Reproduced on Ubuntu 13.04 x64
commit: 61ba279242ef4ee8f8989c26c6c7291e07949ada
Comment 9 Julien Nabet 2013-06-07 10:28:26 UTC
Caolán: the stacktrace retrieved by Pierre-Eric shows vcl part. Moreover he bibisected + provided a patch. I don't know if it has an impact on other env than Linux but with Isamu and me, we're 2 people to reproduce this bug.
Would you have some time to take a look?
Comment 10 Isamu Mogi 2013-06-07 10:53:51 UTC
Created attachment 80470 [details]
Patch to keep it alive rollover effect
Comment 11 Isamu Mogi 2013-06-07 11:00:59 UTC
Current code calls GrabFocus() on background window's MenuBarWindow. And it seems to be illegal and additionally no good ui behavior. 

https://bugs.freedesktop.org/attachment.cgi?id=80470 will fix it. 
But this patch disables line 5520: "// #58935# #73659# Focus, if no popup underneath...".
Comment 12 Isamu Mogi 2013-06-07 11:04:59 UTC
Please replace:
s/MenuBarWindow/MenuBarWindow during rollover/
Comment 13 Caolán McNamara 2013-06-07 11:34:10 UTC
#11 makes it not crash, but then (for me under GNOME) the impress window I moved out of the way pops into the foreground and the file open dialog appears between the writer and impress window, i.e. in the middle of the stack of windows.
Comment 14 Caolán McNamara 2013-06-07 11:37:14 UTC
Created attachment 80473 [details]
smallest version of p-e's patch

how about this minimal patch, does this break the rollover stuff ?
Comment 15 Isamu Mogi 2013-06-08 10:26:50 UTC
Unfortunatelly patch #14 disables rollover effect on windows8 x64.
Comment 16 Isamu Mogi 2013-06-08 12:54:55 UTC
Created attachment 80524 [details]
Not to call Menubar selection logic

New patch uploaded. I believe that this patch completely fixes bug 65450. I tested on Windows8, WindowsXP, Ubuntu13.04. Please review it.

This patch makes that rollover effect doesn't call MenuBar's selection logic.

Currently when we rollovers on MenuBar, MenuBar's selection logic (ChangeHighlightItem et al) is called. But calling these logic on background window seems to illegal and causes fdo#65450.
Comment 17 Commit Notification 2013-06-11 10:39:02 UTC
Isamu Mogi committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=29474304550512f56ef597464bfdb5304bf56bb1

fdo#65450 Not to call MenuBar's selection logic for rollover effect



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 18 Commit Notification 2013-06-11 11:20:33 UTC
Isamu Mogi committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cbfc61a6ca075eb3fbd9a41dea7f9489c5d56770&h=libreoffice-4-1

fdo#65450 Not to call MenuBar's selection logic for rollover effect


It will be available in LibreOffice 4.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 19 Caolán McNamara 2013-06-11 11:21:26 UTC
that works for me anyway, so lets give it a go