Apache OpenOffice (AOO) Bugzilla – Issue 8012
OOO_STABLE_1_PORTS/X11: pJobSetup->mpDriverData needs correct deallocation
Last modified: 2006-11-15 17:52:01 UTC
In vcl/source/gdi/print.cxx, pJobSetup->mpDriverData should be 'deleted' not deallocated with rtl_freeMemory(). The mpDriverData structure is created in source/gdi/jobset.cxx: if ( rJobSetup.mpDriverData ) { mpDriverData = new BYTE[mnDriverDataLen]; memcpy( mpDriverData, rJobSetup.mpDriverData, mnDriverDataLen ); } and also deleted there as well: ImplJobSetup::~ImplJobSetup() { delete[] mpDriverData; } However, when VCL needs to delete it in print.cxx, it gets rtl_freeMemory()'ed. This is incorrect and causes a crash or freeze when printing in MacOS X. Dan
Created attachment 3034 [details] cd to SRC_ROOT/vcl, patch -p0 < /path/to/patchfile, rebuild VCL
cp->pl: please take care of this one (also for beta)
That conflict was resolved by using rtl_allocateMemory and rtl_freeMemory consistently. I'm not sure why some of the matching files were never update in OOO_STABLE_PORTS; probably they were changed after that branch was invented since the allocator/deallocator mix was a major issue throughout the whole office. Please note that mpDriverData may also be allocated in psprint. Please update to the file revisions below. pl->mh: please update the following files for ooo1.0: vcl/source/gdi/jobset.cxx to rev 1.7 vcl/unx/source/gdi/salprnpsp.cxx to rev 1.16 psprint/source/printer/jobdata.cxx to rev 1.2 psprint/source/helper/strhelper.cxx to rev 1.3 psprint/source/helper/helper.cxx to rev 1.9
Created attachment 3055 [details] Adds retrieval of locale information from sal for Mac OS X. Supercedes previous patch. Apply to a clean checkout of the vcl module using the following commands: cd $SRC_ROOT/vcl ; patch -po < /path/to/patch/file
Reassigning issue to me, adding approval_pending
Note that issue 7453 is an earlier iteration of this and the fix for print.cxx was committed to _PORTS. The rest of the files listed below need to have OOO_STABLE_1_PORTS added to their taglist however. http://www.openoffice.org/issues/show_bug.cgi?id=7453 Dan
Approved vcl 100202 patch Kevin
Created attachment 3700 [details] cd to SRC_ROOT/vcl and patch -p0 < /path/to/patchfile
112002 patch removes patching of print.cxx delete/free changes as this has already been done elsewhere. Otherwise, patch is same as what was approved by Kevin. 112002 patch committed to OOO_STABLE_1_PORTS. Dan
Changed to merge_pending. Merge: 1) vcl.OOO_STABLE_1_PORTS.112002.patch 2) And update tags as relfected below. Dan
removed keyword "ooo1.0" in favour of a target milestone "OOo 1.0.2".
*** Issue 7453 has been marked as a duplicate of this issue. ***
Fixed in 103 GM.
closing