Apache OpenOffice (AOO) Bugzilla – Issue 112566
[sfx2] crash in SfxViewShell::GetActivePrinter
Last modified: 2010-08-06 08:15:05 UTC
Open bugdoc and execute macro 'Main' crashes office Tools->Macro->Run Macro->i64991.odt->Standard->check_page_style->Main
Created attachment 70115 [details] Buugdoc
(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.
fixed in cws sw33bf06: http://hg.services.openoffice.org/hg/cws/sw33bf06/rev/03bac0b76e87
please verify
.
Verified fix in CWS sw33bf06 using w_issuezilla_regression.bas on Win and sols.
Checked in OOO330m2.