Apache OpenOffice (AOO) Bugzilla – Issue 13031
Application hangs if I try to print to a printer which is not set as default on RedHat 6.2
Last modified: 2003-06-30 11:52:12 UTC
OpenOffice.org 1.0.3 (builda) Linux RedHat6.2 User cannot print documents from OO.org, when user selects OK in the print dialog OO.org appears to hang. I have tested print with OO.org 1.0.1 and 1.0.2 on the same system with the same user and there appears to be no problems, i.e. print works for these versions of OO.org. It would appear that it is a problem with print in OO.org 1.0.3, but maybe it is my print setup ??. Can anyone else recreate this error??. A workaround for the problem is to print to a file and then from the command line issue lpr -P printer filename.
On RedHat8.0 using the same type of printer setup, I cannot reproduce this error. Also Martin Hollmichel reported that he can print on Suse 8.1 with OO.org 1.0.3. This issue appears to be specific to RH6.2, downgrading priority as per guidelines. Setting target milestone to 1.0.4.
joost reported this running on a Redhat 6.2 system, so I would like to declare this is a non stopper, nonetheless reassigning to robert for further investigation.
after configuring the generic printer properties using spadmin, found that OO.org 1.0.3 successfully prints a document, when using the generic printer choice. If the user uses any other listed printers, OO.org hangs.
JA: old title: cannot print files using non generic printer JA: changed priority from P3 to P2 JA: If I configure two printers and set one printer as default printer but print on the printer which is not configured as default printer then the application hangs. This was reproducible by me on RedHat 6.2 with OOo 1.03. With OOo 1.02 this wasn't reproducible. JA->PL: you can find a RH 6.2 installation at MRU. Reassigned this issue to you
This also happens under windows (tom@alterworld.net) in 1.0.3
I see the same behavior on Mdk 8.2, kernel 2.4.18. Printing to non-generic printer locks the app. Printing to generic printer doesn't lock but neither does it print. I think this should be a blocking issue.
mh->ja: do we have similar behaviour in SO ?
I'm just about to test the german 1.0.3 rc for windows (XP). OOo crashes with an unrecoverable error, when I try to print to any printer that is not the system's default printer! Can you verify if this is the same issue and set OS to all? Andre
can someone provide a stacktrace of the hanging application ?
JA: here you are... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (runnable)] 0x405b12b0 in rtl_freeMemory () from /home/qs1/OpenOffice.org1.0.3/program/libsal.so.3 (gdb) where #0 0x405b12b0 in rtl_freeMemory () from /home/qs1/OpenOffice.org1.0.3/program/libsal.so.3 #1 0x4029788f in Printer::ImplInit(SalPrinterQueueInfo*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #2 0x40299cbf in Printer::SetPrinterProps(Printer const*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #3 0x431260d6 in PrintDialog::Execute() () from /home/qs1/OpenOffice.org1.0.3/program/libsvt641li.so #4 0x429a0680 in SfxViewShell::ExecPrint_Impl(SfxRequest&) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #5 0x4299ae0d in SfxStubSfxViewShellExecPrint_Impl(SfxShell*, SfxRequest&) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #6 0x429d281b in SfxShell::ExecuteSlot(SfxRequest&, SfxInterface const*) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #7 0x44868855 in SwView::ExecutePrint(SfxRequest&) () from /home/qs1/OpenOffice.org1.0.3/program/libsw641li.so #8 0x448460cd in SfxStubSwViewExecutePrint(SfxShell*, SfxRequest&) () from /home/qs1/OpenOffice.org1.0.3/program/libsw641li.so #9 0x429c5670 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, unsigned char) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #10 0x429c7dea in SfxDispatcher::PostMsgHandler(SfxRequest*) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #11 0x429c7d1d in SfxDispatcher::LinkStubPostMsgHandler(void*, void*) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #12 0x429e389f in SfxHintPoster::Event(SfxHint*) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #13 0x429e3843 in SfxHintPoster::LinkStubDoEvent_Impl(void*, void*) () from /home/qs1/OpenOffice.org1.0.3/program/libsfx641li.so #14 0x402f8612 in ImplHandleUserEvent(ImplSVEvent*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #15 0x402f8d69 in ImplWindowFrameProc(void*, SalFrame*, unsigned short, void const*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #16 0x4034cd53 in SalFrameData::HandleClientMessage(XClientMessageEvent*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #17 0x4034d44a in SalFrameData::Dispatch(_XEvent*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #18 0x40370341 in SalDisplay::Dispatch(_XEvent*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #19 0x4037009f in SalDisplay::Yield(unsigned char) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #20 0x4036bec5 in DisplayYield(int, SalDisplay*) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #21 0x4036a779 in SalXLib::Yield(unsigned char) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #22 0x4037333c in SalInstance::Yield(unsigned char) () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #23 0x402064dd in Application::Yield() () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #24 0x40206415 in Application::Execute() () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #25 0x080600b7 in Desktop::Main() () #26 0x40208b17 in SVMain() () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #27 0x403696ca in main () from /home/qs1/OpenOffice.org1.0.3/program/libvcl641li.so #28 0x40b289cb in __libc_start_main (main=0x8059b2c <main>, argc=1, argv=0xbffff5b4, init=0x8058c0c <_init>, fini=0x8077ce4 <_fini>, rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffff5ac) at ../sysdeps/generic/libc-start.c:92 (gdb) info threads 10 Thread 8201 (runnable) 0x00000000 in ?? () 9 Thread 7176 (runnable) 0x00000000 in ?? () 8 Thread 6151 (runnable) 0x40bbbf50 in __poll (fds=0xbedffbf4, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:45 7 Thread 5126 (runnable) 0x40ba1c61 in __libc_nanosleep () from /lib/libc.so.6 6 Thread 4101 (runnable) 0x40b2edeb in __sigsuspend (set=0xbf1ffc18) at ../sysdeps/unix/sysv/linux/sigsuspend.c:48 5 Thread 3076 (runnable) 0x40bc2a02 in __libc_accept () from /lib/libc.so.6 4 Thread 2051 (runnable) 0x40ba1c61 in __libc_nanosleep () from /lib/libc.so.6 3 Thread 1026 (runnable) 0x40bbbf50 in __poll (fds=0x40d22e78, nfds=1, timeout=400) at ../sysdeps/unix/sysv/linux/poll.c:45 2 Thread 2049 (runnable) 0x40bbbf50 in __poll (fds=0x8091014, nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:45 * 1 Thread 1024 (runnable) 0x405b12b0 in rtl_freeMemory () from /home/qs1/OpenOffice.org1.0.3/program/libsal.so.3
Hi, We seem to be using free on an address that could be created by new? Is that right? From vcl/source/gdi/jobset.cxx here we use new to create a Byte Array for the mpDriverData field. ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) : maPrinterName( rJobSetup.maPrinterName ), maDriver( rJobSetup.maDriver ) { mnRefCount = 1; mnSystem = rJobSetup.mnSystem; meOrientation = rJobSetup.meOrientation; mnPaperBin = rJobSetup.mnPaperBin; mePaperFormat = rJobSetup.mePaperFormat; mnPaperWidth = rJobSetup.mnPaperWidth; mnPaperHeight = rJobSetup.mnPaperHeight; mnDriverDataLen = rJobSetup.mnDriverDataLen; if ( rJobSetup.mpDriverData ) { mpDriverData = new BYTE[mnDriverDataLen]; memcpy( mpDriverData, rJobSetup.mpDriverData, mnDriverDataLen ); } else mpDriverData = NULL; But in vcl/source/gdi/print.cxx in Printer::ImplInit we do the following: // Testen, ob Treiber ueberhaupt mit dem JobSetup uebereinstimmt ImplJobSetup* pJobSetup = maJobSetup.ImplGetData(); if ( pJobSetup->mpDriverData ) { if ( (pJobSetup->maPrinterName != pInfo->maPrinterName) || (pJobSetup->maDriver != pInfo->maDriver) ) { rtl_freeMemory( pJobSetup->mpDriverData ); pJobSetup->mpDriverData = NULL; pJobSetup->mnDriverDataLen = 0; } } So aren't we mixing new and free and should we be using an array delete[] here? What am I missing? Kevin
fixed an allocator/deallocator mismatch
pl->rkinsella: there is a new version of gsl/vcl/source/gdi/print.cxx on OOO_STABLE_1 (rev 1.24.4.5), please update pl->kevin: you nailed it
sorry, the revision is of course 1.24.4.6; i'm an idiot
will you be able to release the updated program component or will have to wait for 1.0.4 ?
Just FYI - same crash, complete freeze with 'OK' button pressed down in printing dialog, on a slackware linux 8.0 system. Is this worthy of a re-release? When is 1.0.4 due?
I fixed this issue in PORTS a _long_ time ago as it was crashing the OS X builds as far back as October 2002. Has it just appeared for Linux, or did something regress? http://porting.openoffice.org/issues/show_bug.cgi?id=7453 We had discussed this in the mailing list too and someone said that a bunch of allocator/deallocator mismatches had been fixed but I guess this one slipped through. Dan
Further comments in this issue. We've been here before. http://porting.openoffice.org/issues/show_bug.cgi?id=8012 Dan
*** Issue 13547 has been marked as a duplicate of this issue. ***
*** Issue 13364 has been marked as a duplicate of this issue. ***
*** Issue 13403 has been marked as a duplicate of this issue. ***
*** Issue 13438 has been marked as a duplicate of this issue. ***
*** Issue 13490 has been marked as a duplicate of this issue. ***
*** Issue 13526 has been marked as a duplicate of this issue. ***
*** Issue 13559 has been marked as a duplicate of this issue. ***
fixed in build 1.0.3.1 - tested on Solaris, RH6.2 and windows2000
verified fixed
*** Issue 13513 has been marked as a duplicate of this issue. ***
*** Issue 8627 has been marked as a duplicate of this issue. ***
*** Issue 13668 has been marked as a duplicate of this issue. ***
*** Issue 13525 has been marked as a duplicate of this issue. ***
*** Issue 13855 has been marked as a duplicate of this issue. ***
*** Issue 13646 has been marked as a duplicate of this issue. ***
*** Issue 15817 has been marked as a duplicate of this issue. ***
verified fixed - closing issue