Bug 39159 - PRINTING: Switching radio buttons "Selection <-> All" Crashes
Summary: PRINTING: Switching radio buttons "Selection <-> All" Crashes
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.4.1 release
Hardware: All All
: high critical
Assignee: Caolán McNamara
Keywords: regression
Depends on:
Blocks: mab3.4 38993
  Show dependency treegraph
Reported: 2011-07-12 00:24 UTC by Rainer Bielefeld Retired
Modified: 2011-10-29 08:43 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:

Valgrind log for this... (6.36 KB, application/x-bzip)
2011-07-12 09:47 UTC, Jan Holesovsky
gdb log of where the viewshell gets deleted (6.16 KB, text/plain)
2011-08-10 03:45 UTC, Caolán McNamara

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2011-07-12 00:24:26 UTC
"Nicolas R" found the problem during his tests for "Bug 37488 - PRINTING table borders in Writer not printed if there are also images in the document, DRAW object printed crippled" (with WIN7), and it's "[Reproducible] with "LibreOffice 3.4.1  - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:103)]".

Steps to reproduce:
0. Start LibO from WIN start center
1. Open new WRITER document from LibO Start Center
2. Type "x"
3. <ctrl+a> to slect all
4. Menu 'Print' 
   In "Range and copies" "Selection" is selected
5. In "Range and copies" click "Pages"
   New radio button as expected
6. Click "Range and copies - Selection"
   Expected:  New radio button 
   Actual:  New radio button + CRASH

Same crash result with a daily build based on Build:101 dated 2011-July-08

Can you please do an additional test with Linux?

Please feel free to reassign if it’s not your area!
Comment 1 Rainer Bielefeld Retired 2011-07-12 00:43:39 UTC
Forgot to mention:
- PDF export is not affected
- Also CRASH for "Pages -> Selection"
- No problem with an obsolete LibO Portable version, so REGRESSION.
Comment 2 Jan Holesovsky 2011-07-12 09:47:34 UTC
Created attachment 49011 [details]
Valgrind log for this...
Comment 3 Petr Mladek 2011-07-12 09:51:55 UTC
The bug already is in 3.4.0. It took many weeks to find it => less used scenario => can't be a blocker => lowering the severity a bit.

Cedric has vacation these days. Kendy and Lubos are looking at it. It is not trivial but we will try to fix it for 3.4.2-rc2.
Comment 4 gibi 2011-07-25 14:25:22 UTC
Tested with 3.4.2rc2 Windows XP: crash
Tested with 3.4.2rc2 Linux X86-64 : same crash.
So changing platform to: All / All.
Comment 5 Rainer Bielefeld Retired 2011-07-25 22:03:43 UTC
We somewhere have a modification that in Future "print selection" no longer will be default if some text has been selected. Currently IMHO  
only is in Master, but as soon as that will get into a branch we will run into serious problems.

Modified Status due to facts.
Comment 6 Caolán McNamara 2011-08-09 15:42:54 UTC
calling ViewOptionAdjustStop destroys the current ViewShell
Comment 7 Caolán McNamara 2011-08-09 16:58:31 UTC
I can make the crash go away anyway. Though we have the usual nightmare of writers abundance of illdefined shells and views.
Comment 8 Caolán McNamara 2011-08-10 03:45:59 UTC
Created attachment 50091 [details]
gdb log of where the viewshell gets deleted
Comment 9 Caolán McNamara 2011-08-10 03:47:40 UTC
restore the view options, options might affect selection, temp selection document thrown away, view associated with temp document thrown away, something of that nature.
Comment 10 Caolán McNamara 2011-08-10 04:00:02 UTC
After faffing around with a view possibilities, I've ended up with just


i.e. assume that for the selection case we are dealing with a temporary document, so we don't have to restore the settings on the view as its all going to go away anyway afterwards.
Comment 11 Caolán McNamara 2011-08-11 04:17:08 UTC
pushed to 3-4 now