Apache OpenOffice (AOO) Bugzilla – Issue 44695
No error dialog on print failure / cupsd is down
Last modified: 2006-04-06 16:39:36 UTC
Steps. 1. Manually down the cups daemon. 2. Print from OOo. It doesnt give any pop-up error dialog.
Created attachment 23631 [details] Proposed patch
defect -> patch
cp->pl: please have a look ...
pl->cd: looks good to me, could you please have a look at the sfx part of the patch ?
cd->sragavan: I looked over you changes in the sfx2 code part and I am sorry, but I don't know why you want to exchange AbortJob with SetErrorHdl. May be AbortJob leads to another call of PrintErrorNotify? Please tell me more about your fix. /src680-m79.bak/sfx2/source/view/prnmon.cxx IMPL_LINK_INLINE_START( SfxPrintProgress, PrintErrorNotify, void *, pvoid ) { if ( pImp->pMonitor ) pImp->pMonitor->Hide(); - pImp->pPrinter->AbortJob(); + pImp->pPrinter->SetErrorHdl( Link() ); InfoBox( pImp->GetViewShell()->GetWindow(), String( SfxResId(STR_ERROR_PRINT) ) ).Execute(); if ( pImp->bRestoreFlag && pImp->pViewShell->GetObjectShell()->IsEnableSetModified() != pImp->bOldFlag ) ...
cd: I just brought the error to the vcl plug. Then i figured out that AbortJob call just crashes inside AbortJob when it tries to free resources. Then i figured out some old patch from ooo-build and took this sfx2 code from there and pasted here and it worked. Really speaking cd, it was just a fwd port of one patch and some more work from my side to pass the error to the higher levels. Please give me the rit idea to proceed on this, if this is wrong.
cd->sragavan: Sorry for the late answer, but currently I am very busy to fix bugs in my area for OOo final. I have a bad feeling to change this part of code without heavy testing (on all supported platforms as sfx2 is not platform dependent), which I think is not possible anymore short before final. I think it makes more sense to track down the crash and leave AbortJob in the sfx2 code. Can you please give me or pl more information about the crash in AbortJob.
This is the trace of the dump im facing. #0 0x440860d8 in SfxPrintProgress::PrintErrorNotify (this=0x47ec2250, pvoid=0x475e3480) at /root/cvs/m79/ooo-build/build/src680-m79/sfx2/source/view/prnmon.cxx:407 #1 0x44085642 in SfxPrintProgress::LinkStubPrintErrorNotify (pThis=0x47ec2250, pCaller=0x475e3480) at /root/cvs/m79/ooo-build/build/src680-m79/sfx2/source/view/prnmon.cxx:412 #2 0x4022dee5 in Printer::Error () from ./libvcl680li.so #3 0x401d1b1a in ImplQPrinter::ImplPrintHdl () from ./libvcl680li.so #4 0x401d1a3a in ImplQPrinter::LinkStubImplPrintHdl () from ./libvcl680li.so #5 0x40174955 in Timer::Timeout () from ./libvcl680li.so #6 0x40174659 in ImplTimerCallbackProc () from ./libvcl680li.so #7 0x42393b8c in SalData::Timeout () from ./libvclplug_gen680li.so #8 0x41e8a64f in GtkXLib::timeoutFn () from ./libvclplug_gtk680li.so #9 0x422c8a76 in g_timeout_dispatch () from /opt/gnome/lib/libglib-2.0.so.0 #10 0x422c7e87 in g_main_context_dispatch () from /opt/gnome/lib/libglib-2.0.so.0 #11 0x422ca5c7 in g_main_context_iterate () from /opt/gnome/lib/libglib-2.0.so.0 #12 0x422ca6c3 in g_main_context_iteration () from /opt/gnome/lib/libglib-2.0.so.0 #13 0x41e8a9e2 in GtkXLib::Yield () from ./libvclplug_gtk680li.so #14 0x4239d62f in X11SalInstance::Yield () from ./libvclplug_gen680li.so #15 0x4016df12 in Application::Yield () from ./libvcl680li.so #16 0x4016de29 in Application::Execute () from ./libvcl680li.so #17 0x080796f5 in desktop::Desktop::Main () #18 0x40173ac0 in SVMain () from ./libvcl680li.so #19 0x0807284d in sal_main () #20 0x080727fc in main () So, i saw the old patch, and copied those changes and pasted and it worked. If you just comment the function Abort job or return just before freeing objects in side Abort Job it works. So some issue there. Before digging more inside that, i saw the older patch which - pImp->pPrinter->AbortJob(); + pImp->pPrinter->SetErrorHdl( Link() ); Hope ivegiven enough information. Im going for brainshare and will be available after a week for any more queries.
cd: I wasn't able to reproduce this issue. These kind of changes should be carefully tested and therefor I want to check this issue for 2.0.1 again. Thanks to sragavan to reveal a potential problem and providing a patch for this.
cd: Due to heavy workload we have to retarget this issue. I was also not able to reproduce this problem.
cd->sragavan: I just want to check your patch again. Can you reproduce the described crash with the current OOo 2.0.1 or the lastet OOo 2.0.2rc? Please give some up to date information.
cd: this was long time back srcm72 branches. Im no longer working on OOo. Sorry I could test this with latest build.
cd->sragavan: It would be great if you could check it again on the latest version. If you can reproduce it, please give me a step by step description. Thanks for your help.
cd: No response from sragavan and nobody else could reproduce it with later versions. There I close this patch request. Please open it again, if someone is able to reproduce it.
cd: Closed.