Issue 44695 - No error dialog on print failure / cupsd is down
Summary: No error dialog on print failure / cupsd is down
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 2.0 Beta
Hardware: All All
: P3 Trivial (vote)
Target Milestone: AOO PleaseHelp
Assignee: carsten.driesner
QA Contact: issues@gsl
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-03-10 11:18 UTC by sragavan
Modified: 2006-04-06 16:39 UTC (History)
2 users (show)

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


Attachments
Proposed patch (2.00 KB, patch)
2005-03-10 11:20 UTC, sragavan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description sragavan 2005-03-10 11:18:32 UTC
Steps.

1. Manually down the cups daemon.
2. Print from OOo. It doesnt give any pop-up error dialog.
Comment 1 sragavan 2005-03-10 11:20:49 UTC
Created attachment 23631 [details]
Proposed patch
Comment 2 flibby05 2005-03-10 12:01:41 UTC
defect -> patch
Comment 3 christof.pintaske 2005-03-10 16:12:58 UTC
cp->pl: please have a look ...
Comment 4 philipp.lohmann 2005-03-10 17:34:14 UTC
pl->cd: looks good to me, could you please have a look at the sfx part of the
patch ?
Comment 5 carsten.driesner 2005-03-14 16:40:39 UTC
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 )
...
Comment 6 sragavan 2005-03-15 03:51:47 UTC
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. 
Comment 7 carsten.driesner 2005-03-17 08:22:29 UTC
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. 
Comment 8 sragavan 2005-03-18 03:07:06 UTC
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.
Comment 9 carsten.driesner 2005-05-17 16:07:32 UTC
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.
Comment 10 carsten.driesner 2005-05-24 07:47:13 UTC
cd: Due to heavy workload we have to retarget this issue. I was also not able to
reproduce this problem.
Comment 11 carsten.driesner 2006-02-20 13:22:40 UTC
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.
Comment 12 sragavan 2006-02-20 13:43:32 UTC
cd: this was long time back srcm72 branches. Im no longer working on OOo. Sorry
I could test this with latest build.
Comment 13 carsten.driesner 2006-02-28 16:15:33 UTC
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.
Comment 14 carsten.driesner 2006-04-06 16:38:48 UTC
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.
Comment 15 carsten.driesner 2006-04-06 16:39:36 UTC
cd: Closed.