Issue 108138 - crash with non-initialized PrinterGraphics
Summary: crash with non-initialized PrinterGraphics
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: DEV300m66
Hardware: All All
: P2 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: h.ilter
QA Contact: issues@gsl
URL:
Keywords: crash, regression
: 108652 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-01-07 16:53 UTC by hdu@apache.org
Modified: 2017-05-20 10:23 UTC (History)
6 users (show)

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


Attachments
reduced bugdoc (12.24 KB, application/vnd.oasis.opendocument.text)
2010-01-07 16:56 UTC, hdu@apache.org
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description hdu@apache.org 2010-01-07 16:53:08 UTC
Something with printing and/or meta-file handling must have changed between the OOO320 branch-off 
point and DEV300_m68 as printing even trivial documents results in a crash. In the stack I'll attach the 
problem is simply that in an if-printer branch the OutputDevice::mpGraphics member is used without 
checking that the pointer is non-NULL. Since that code there is ancient (from the original OOo CVS import) 
I suspect there are many other unchecked accesses.

@pl and @aw: either we find the change in the CWS that changed metafile-handling and/or printing or we 
have to check every printing-related mpGraphics access...
Comment 1 hdu@apache.org 2010-01-07 16:56:05 UTC
Created attachment 67064 [details]
reduced bugdoc
Comment 2 hdu@apache.org 2010-01-07 17:01:07 UTC
Here is the relevant stack-excerpt for the invalid PrinterGraphics access through the NULL pointer:
  #0  0xf6dabba4 in OutputDevice::ImplInitClipRegion (this=0xed5852c0)
    at /net/so-cwsserv01/export/cws/vcl109/DEV300/ooo/vcl/source/gdi/outdev.cxx:1091
  #1 OutputDevice::DrawTextArray (this=0xed5852c0, rStartPt=@0xedff1d0c, rStr=@0xedff1d14,
          pDXAry=0xed5a9128, nIndex=0, nLen=1) at vcl/source/gdi/outdev3.cxx:5605
  #2  MetaTextArrayAction::Execute (this=0xedff1d00, pOut=0xed5852c0)
    at vcl/source/gdi/metaact.cxx:1371
  #3  0xf6e4a7a8 in ImplQPrinter::ImplPrintMtf ()
  #4  0xf6e4a93b in ImplQPrinter::ImplPrintHdl ()
Comment 3 hdu@apache.org 2010-01-08 09:48:19 UTC
Isolating the problem further shows that the problem happens at least since DEV300_m66. OOO320_mX 
and <=DEV300_m65 do not have the problem.

One of the CWSses that were integrated for DEV300_m66 but not into OOO320 must be the culprit: buildtool07, calc32stopper4, cmcfixes64, controltextrendering, hr67, impress180, jl133, jl139, 
linuxhppa1, native271, ooo32gsl01, ooo32gsl02, sw33bf01, writerfilter32bugfixes01, 
dev300m66masterfix

It's "only" 156 commits, 255 changed files and 22000 changed lines...
Comment 4 hdu@apache.org 2010-01-08 10:04:26 UTC
Found the commit
http://hg.services.openoffice.org/DEV300/diff/f622379e3c76/vcl/source/gdi/outdev3.cxx
to be the culprit...
Comment 5 hdu@apache.org 2010-01-08 12:00:06 UTC
Fixed in CWS vcl108.
Comment 6 hdu@apache.org 2010-01-08 12:00:53 UTC
.
Comment 7 hdu@apache.org 2010-01-08 12:10:19 UTC
@hi: please verify in CWS vcl108
Comment 8 h.ilter 2010-01-19 14:49:34 UTC
Verified with cws vcl108 = ok
Comment 9 philipp.lohmann 2010-01-26 15:01:59 UTC
*** Issue 108652 has been marked as a duplicate of this issue. ***