Bug 91333 - EDITING / FORMATTING: Crash when formatting header / footer
Summary: EDITING / FORMATTING: Crash when formatting header / footer
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.7.2 release
Hardware: All All
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2015-05-16 19:10 UTC by conrad_heimbold
Modified: 2016-06-03 15:56 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace for this bug (8.12 KB, text/plain)
2015-05-19 09:06 UTC, conrad_heimbold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description conrad_heimbold 2015-05-16 19:10:06 UTC
How to reproduce this problem (does not alway work):  
1. Open an new Calc Document
(2. Enter some random content / some letters in some cells.)
3. Save the document somewhere. 
(4. Make the document READ-ONLY (e.g. with the button on the toolbar)).  
5. Go to Edit > Headers and Footers
(6. Select one of the options in the bottom Drop-Down-List on either the 'Header' or 'Footer' tab.)
7. Press the first button ('Text Attributes') right from "Custom Header" / "Custom Footer". 
=> LibreOffice often crashs now!

Sometimes, you don't have to do the steps with round brackets to make LibreOffice crash (2,4,5); but sometimes, they are also necessary.
Comment 1 A (Andy) 2015-05-16 20:04:48 UTC
For me not reproducible with LO 4.4.3.2, Win 8.1
Comment 2 conrad_heimbold 2015-05-16 21:01:47 UTC
Ok, I have to correct myself a little bit: 
1. Open a new Calc Document
2. Save the (empty or filled, doesn't matter) document somewhere (it mostly works also with empty documents, but not always). 
(3. Make the document READ-ONLY.)
4. Go to Edit > Headers & Footers...
5. DON'T switch the now visible tabs 
   (tab 1: Header / tab 2: footer); 
   DON'T CLICK into one of the three fields of every tab 
   (field 1: left; field 2: middle; field 3: right) 
   DON'T select anything from the Drop-Down-List at the bottom. 
6. Press the first button ('Text Attributes') at the bottom. 
=> LibreOffice crashs mostly. 

I tried it now a couple of times (and it worked quite often with the procedure mentioned above); but NOW when I tried it again, it somehow doesn't work anymore. 
Strange.
Comment 3 conrad_heimbold 2015-05-16 21:08:47 UTC
(In reply to C_Heim from comment #2)
> Ok, I have to correct myself a little bit: 
> 1. Open a new Calc Document
> 2. Save the (empty or filled, doesn't matter) document somewhere (it mostly
> works also with empty documents, but not always). 
> (3. Make the document READ-ONLY.)
> 4. Go to Edit > Headers & Footers...
> 5. DON'T switch the now visible tabs 
>    (tab 1: Header / tab 2: footer); 
>    DON'T CLICK into one of the three fields of every tab 
>    (field 1: left; field 2: middle; field 3: right) 
>    DON'T select anything from the Drop-Down-List at the bottom. 
> 6. Press the first button ('Text Attributes') at the bottom. 
> => LibreOffice crashs mostly. 
> 
> I tried it now a couple of times (and it worked quite often with the
> procedure mentioned above); but NOW when I tried it again, it somehow
> doesn't work anymore. 
> Strange.

If it doesn't work this way, try switching to Page Preview (Ctrl + Shift + O) between step 3 and 4.
Comment 4 A (Andy) 2015-05-16 21:19:22 UTC
Thanks for your very fast reply.

I tried it several times, also with the modified procedure, but unfortunately it was not reproducible for me.
Comment 5 conrad_heimbold 2015-05-16 21:23:35 UTC
Ok, I hope it is really fixed in 4.4.3.2.
Comment 6 Buovjaga 2015-05-18 15:54:03 UTC
No crash. Nothing happens, when I click Text attribs.
Tried also with ctrl-shift-o mode.

Win 7 Pro 64-bit, Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Locale: fi_FI
Comment 7 raal 2015-05-19 07:00:22 UTC
I can reproduce crash with steps from comment 2. Only points 4 and 5 I did twice. At first opening of dialog crash didn't occured.

LO 4.4.3.2, win7

Error in module:	editenglo.dll
Comment 8 raal 2015-05-19 07:04:27 UTC
Conrad, 
if possible, please could you follow the instructions provided at this link < https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg > and submit a backtrace? That way a developer can look into the underlying reason of the crash. Thank you
Comment 9 conrad_heimbold 2015-05-19 09:06:19 UTC
Created attachment 115704 [details]
backtrace for this bug

Unfortunately, reproducing the bug didn't work the first time when windbg was hooked to LibreOffice, I had to go through the mentioned steps a couple of times; that's why the backtrace might be a little bit longer. But after all, I could reproduce it!
Comment 10 mungo 2015-07-11 21:55:11 UTC
I am using Linux Mint 17.2 Cinnamon.

When upgrading from 17.1, LibreOffice was upgraded as well.

Since then I can reproduce the bug in Calc, as well with new as with old documents.
Comment 11 Joel Madero 2015-07-11 22:06:15 UTC
Please don't change the upper section of bug reports unless you know what you're doing. Reverting all changes.
Comment 12 Julien Nabet 2016-05-29 14:27:35 UTC
4.x version are EOL (as 5.0.X), any update with recent LO version (last one is 5.1.3)?
Comment 13 Caolán McNamara 2016-06-03 15:56:44 UTC
hmm, I can't reproduce anywhere, but the last frame is ScHFEditPage::ClickHdl and the call on SetCharAttributes.

The SetCharAttributes used to be called on the result of ::GetScEditWindow and is now called on a m_pEditFocus member since...

commit 5fe66069010e9afc3a16d238592c3b672850514c
Author: Michael Stahl <mstahl@redhat.com>
Date:   Thu Nov 12 23:37:12 2015 +0100

    sc: loplugin:badstatics: remove pActiveEdWnd global variable

because that was a particularly dubious piece of code. I suspect that the focus never got set into the dialog editboxes of the current dialog so this should have been null, but that the focus got set in some earlier dialog and so was still pointing to something now dead or something of that nature.

So I'm reasonably confident that mstahl happened to fix this problem with that commit which is available in 5-1