Issue 112566 - [sfx2] crash in SfxViewShell::GetActivePrinter
Summary: [sfx2] crash in SfxViewShell::GetActivePrinter
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: DEV300m83
Hardware: All All
: P2 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: michael.ruess
QA Contact: issues@framework
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2010-06-21 10:17 UTC by helge.delfs
Modified: 2010-08-06 08:15 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Buugdoc (9.12 KB, application/vnd.oasis.opendocument.text)
2010-06-21 10:19 UTC, helge.delfs
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description helge.delfs 2010-06-21 10:17:27 UTC
Open bugdoc and execute macro 'Main' crashes office
Tools->Macro->Run Macro->i64991.odt->Standard->check_page_style->Main
Comment 1 helge.delfs 2010-06-21 10:19:25 UTC
Created attachment 70115 [details]
Buugdoc
Comment 2 mst.ooo 2010-06-22 17:34:33 UTC
(gdb) bt
#0  0x0254e9d0 in vcl::PrinterController::getPrinter (this=0x72)
    at vcl/source/gdi/print3.cxx:702#1  0x011d328a in
SfxViewShell::GetActivePrinter (this=0xb18a4324)
    at sfx2/source/view/viewprn.cxx:664
#2  0x01087151 in SfxPrintHelper::getPrinter (this=0xb3412f10)
    at sfx2/source/doc/printhelper.cxx:275
#3  0x011426e1 in SfxBaseModel::getPrinter (this=0xb360f6d8)
    at sfx2/source/doc/sfxbasemodel.cxx:1442


reason seems to be that the SfxViewShell_Impl::pPrinterController member is not
initialized before actually printing, but is read by GetActivePrinter().

also, the mix of boost::shared_ptr and plain pointer for the PrinterController
in the SfxViewShell::ExecPrint() method seems very fishy.
Comment 3 mst.ooo 2010-07-01 17:50:23 UTC
fixed in cws sw33bf06:
http://hg.services.openoffice.org/hg/cws/sw33bf06/rev/03bac0b76e87
Comment 4 mst.ooo 2010-07-02 14:40:18 UTC
please verify
Comment 5 mst.ooo 2010-07-02 14:41:44 UTC
.
Comment 6 michael.ruess 2010-07-07 10:54:53 UTC
Verified fix in CWS sw33bf06 using w_issuezilla_regression.bas on Win and sols.
Comment 7 michael.ruess 2010-08-06 08:15:05 UTC
Checked in OOO330m2.