Issue 119189 - Print Selection crash Writer when is chosen again
Summary: Print Selection crash Writer when is chosen again
Alias: None
Product: Writer
Classification: Application
Component: printing (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Critical with 3 votes (vote)
Target Milestone: 3.4.1
Assignee: Oliver-Rainer Wittmann
QA Contact:
Depends on:
Reported: 2012-04-05 17:06 UTC by sorath
Modified: 2013-10-08 16:33 UTC (History)
10 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 3.4.1_release_blocker+
jsc: 3.4_release_blocker-

print_selection_crash.odt (8.29 KB, application/vnd.oasis.opendocument.text)
2012-04-05 17:06 UTC, sorath
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description sorath 2012-04-05 17:06:40 UTC
Created attachment 77420 [details]

Reprodused for 
Apache OpenOffice 3.4.0: AOO340m1(Build:9589) rev. 1303653 3.4.0 beta (OOo-dev 3.4.0): OOO340m0 (Build:9583) 3.3.0

1. Open test file "print_selection_crash.odt".
2. Select some text, text in table or whole table.
3.  Go to menu "File" - "Print"
4. Note that "Selected" print item is chosen
5. Choose "All Pages" or "Pages" item
6. Nopw choose "Selection" again - Writer is crashing, Document recovery dialog appears.
Comment 1 Armin Le Grand 2012-04-05 19:41:06 UTC
ALG: Debugged down to SwXTextDocument::getRendererCount line 2726 where on changing back to selection executing ViewOptionAdjustStop destroys pViewShell. I have no knowledge of the new printer dialog nor Writer, evtl. this info helps someone.
Comment 2 Oliver Brinzing 2012-04-06 07:15:43 UTC
confirming crash in writer print dialog

btw: if one select a cell range in spreadsheet application and opens print dialog, "All sheets" (and not Selected cells) is preselected.
Comment 3 Armin Le Grand 2012-04-06 12:37:53 UTC
ALG: I could show that SwRenderData::ViewOptionAdjustStop() deletes the ViewShell which is used in SwXTextDocument::getRendererCount after that call. Trying to  re-get the ViewShell after that call...
Comment 4 Armin Le Grand 2012-04-06 12:52:50 UTC
ALG: Looks like SwXTextDocument::getRendererCount is simply not designed for a ViewShell chane (in pViewShell) when calling ViewOptionAdjustStop(). This needs to be changed principally.

Since it also happens on OOo3.3 (and other derivates) it did not get worse, thus no showstopper from my POV.
Comment 5 jsc 2012-04-08 15:50:14 UTC
based on the analysis of Armin and the fact that this is an older issue I would agree that it is not showstopper for 3.4.
Comment 6 Andrea Pescetti 2012-05-20 13:48:06 UTC
Repeatable crashes should probably be evaluated for fixing in point releases. Adding "?" to 3.4.1_release_blocker as requested by Guillame on ooo-dev.
Comment 7 zhao xia 2012-05-28 07:21:27 UTC
Reproduced against AOO 3.4 publish build on Windos XP platform. Agree this should be AOO 341 relase blocker as changing the section in print dialog is one common scenario,move the version to AOO 341.
Comment 8 papayes 2012-05-28 07:56:32 UTC
I confirm the Issue
"Merle leucomèle" printing test crash :

Inconveniant very serious, because the record "Save As..." with ODF Text Document (.odt) in AOO, produced a new document that reproduces the crash.
Crash also with the "Print to file" option.

Workaround: Ctrl + A and Ctrl + C to copy the contents of the document,
and then pasting into a New Document Writer AOO ...

crash report under MacOsX Lion 10.7.4
Comment 9 Marcus 2012-05-28 09:30:23 UTC
Changed back to AOO340:

Version: This field is to show the version where the problem has occurred first.
Target: This field is to set the release where the problem should be fixed.
Comment 10 Oliver-Rainer Wittmann 2012-05-30 12:33:51 UTC
taking over ownership
Comment 11 jsc 2012-05-31 14:45:57 UTC
set release blocker flag for 3.4.1
Comment 12 Oliver-Rainer Wittmann 2012-06-06 08:33:34 UTC
fixed on AOO34 branch, changed files:
revision 1346776
revision 1346777
Comment 13 Oliver-Rainer Wittmann 2012-06-06 10:03:00 UTC
merged fix into trunk, revision 1346805
Comment 14 binguo 2012-06-19 07:59:08 UTC
Verified it on Aoo_Trunk_20120616.1800.1350879 and it does not reproduce, so close it as fixed.
Comment 15 Li Feng Wang 2012-06-26 08:37:30 UTC
also not reproduce on build r1351960(AOO develop snapshot,AOO341 branch)
Comment 16 jsc 2012-07-25 09:04:25 UTC
set target milestone AOO 3.4.1