Bug 86508 - konqueror crashes at print dialog when printing system is cups on solaris
Summary: konqueror crashes at print dialog when printing system is cups on solaris
Status: CLOSED NOT A BUG
Alias: None
Product: kdeprint
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Solaris
: NOR crash
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-03 17:57 UTC by Andrew Bird
Modified: 2008-12-31 17:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (4.89 KB, text/plain)
2004-08-04 19:07 UTC, Andrew Bird
Details
Backtrace with cups --enable-debug (4.87 KB, text/plain)
2004-08-06 08:55 UTC, Andrew Bird
Details
first log - with additional debug - CUPS_SERVER not set (23.51 KB, text/plain)
2004-08-06 11:03 UTC, Andrew Bird
Details
additional logging with CUPS_SERVER=yrprnt (23.84 KB, text/plain)
2004-08-06 11:05 UTC, Andrew Bird
Details
New Backtrace (4.77 KB, text/plain)
2004-08-11 14:09 UTC, Andrew Bird
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bird 2004-08-03 17:57:27 UTC
Version:           3.2.3 (using KDE 3.2.3, compiled sources)
Compiler:          gcc version 3.2
OS:                SunOS (sun4u) release 5.9

Konqueror crashes when trying to print if selected print system is cups. This occurs on Solaris Sparc but not Linux x86. If alternatively I start konqueror from konsole then it does not crash and prints successfully. This problem occurs
on both 3.2.2 with --enable-debug --disable-final and on 3.2.3 with --disable-debug --enable-final.
Comment 1 Stephan Kulow 2004-08-03 20:39:28 UTC
and the stacktrace is? 
Comment 2 Michael Goffioul 2004-08-04 09:04:09 UTC
Please, could you provide a backtrace (for example from the crash dialog that should appear). As it looks like you have a KDE compiled with debug enabled, please provide a backtrace using that version.
Comment 3 Andrew Bird 2004-08-04 19:07:01 UTC
Created attachment 6999 [details]
Backtrace

Here is the backtrace from the 3.2.2 release, which I compiled with debug on

Also - the cups printers are remote ones. i.e. I have 'ServerName yrprnt' in
/etc/cups/client.conf
Comment 4 Michael Goffioul 2004-08-05 09:01:42 UTC
Just for the record, does it change anything if you use a local CUPS server? (it shouldn't, but you never know...).

The backtrace you provided shows the problem occurs in the CUPS library. Which version are you using? Is it possible for you to upgrade it? If you do, can you compile CUPS with debug enabled and provide another backtrace along with debug output on STDOUT?

I guess the print manager doesn't work neither: "kcmshell printmgr".
Comment 5 Andrew Bird 2004-08-05 21:32:44 UTC
Michael
	It's cups 1.1.19 on both remote server and the local libs kde is linked against. I'll try to compile 1.1.20 tommorrow. I won't be able to swap the version on the server but the local libs / kde recompile should be possible.

Or would you rather me try the 1.1.21 release candidate?

Best Regards

Andrew
Comment 6 Andrew Bird 2004-08-06 08:09:55 UTC
Michael
1/ Tried local cups spooler - exactly the same effect.
2/ Tried kcmshell printmgr - works just fine.

Thought I ought to mention that the same print dialog that crashes under konqueror, is OK when called from kmail.

I'll try out the rebuild with cups debug enabled first just by compiling cups and dropping in the new libcups.so. because it's a major event to build kde on sparc.

Andrew 
Comment 7 Andrew Bird 2004-08-06 08:55:05 UTC
Created attachment 7017 [details]
Backtrace with cups --enable-debug

Michael
	Here is the backtrace with cups debug enabled. Note this is 1.1.21rc1
with debug. I have just replaced the libcups.so.2 in my /usr/lib with this
version, not compiled kde against it.

Thanks

Andrew
Comment 8 Michael Goffioul 2004-08-06 09:40:07 UTC
Huh, it's getting weird...
1) the crash doesn't occur at the same place as in your first backtrace
2) it only happens in konqueror, but from the KDEPrint's point of view, it doesn't matter from which application it is used, the behavior is the same

Is it possible for you to add the line: "req.dump(2);" just after the line "IppRequest req;" in kdelibs/kdeprint/cups/kmcupsmanager.cpp" around line 913, then simply doing a "make && su -c 'make install'" in kdelibs/kdeprint/cups/ to only recompile that little part.

As you compiled cups with debug enabled, there should be some additional message on the standard output when an app is started in a terminal (additional debug output should also result from the little change mentioned above). Could you provide the debug output when konqueror is started in a terminal?
Comment 9 Andrew Bird 2004-08-06 11:03:29 UTC
Created attachment 7020 [details]
first log - with additional debug - CUPS_SERVER not set

This log with the additional logging. Does something surprising (to me). It
contacts the local cups server even though 'Server yrprnt' is specified in
/etc/cups/client.conf
Comment 10 Andrew Bird 2004-08-06 11:05:45 UTC
Created attachment 7021 [details]
additional logging with CUPS_SERVER=yrprnt

This shows that kde will follow the CUPS_SERVER variable. Note - both this and
konq.log didn't crash since they were both run from a terminal.
Comment 11 Michael Goffioul 2004-08-06 14:08:10 UTC
KDEPrint uses the server mentioned in its config file ~/.kde/share/config/kdeprintrc, and can be changed from the KDEPrint settings dialog ("System Options" button in the print dialog, "CUPS" tab; or "kaddprinterwizard --kdeconfig"). On first startup, this is initialized to the same host as CUPS config itself (client.conf or CUPS_SERVER). I should probably fix this.
Now, do you mean that you don't have the problem when konqueror is started from a terminal? And you do when konqueror is started by another mean (for example "Start" menu)?
Comment 12 Andrew Bird 2004-08-06 15:26:14 UTC
Michael
	I just changed the client.conf file and expected konqueror to switch without a full kde restart. Anyway this only really was odd behaviour I noticed. It did not contribute to the original problem.

	Yes the basic problem is that when konqueror is started from start menu or kicker it crashes, but when started from terminal it doesn't.

	I'm now just doing a complete rebuild of qt/kde etc just to be sure it's not a qt issue, since both versions of kde 3.2.[23] were built on the same compiled copy of QT.

Andrew

Best Regards


Andrew
Comment 13 Andrew Bird 2004-08-11 14:09:05 UTC
Created attachment 7077 [details]
New Backtrace

Michael
	I've recompiled it and QT completely but the problem still occurs. I
had thought that the compiler(built on solaris 8) might have been the problem,
since the fault appears to be occuring in a threaded area.
	I notice that the backtrace shows _cupsRestoreLocale being called with
rubbish for arguments. Is cups thread safe do you know?

Regards

Andrew
Comment 14 Andrew Bird 2004-08-27 09:36:34 UTC
Michael
	The problem still persists. I think it's something to do with stdin. As the following happens

1/ Start from 'menu|run command' with command 'konqueror' hit print button, konqueror crashes as before.

2/ Start from 'menu|run command' with command 'konqueror < /dev/null' hit print button, konqueror works properly.
Comment 15 Michael Goffioul 2004-08-30 17:12:01 UTC
I don't know if CUPS is thread safe (I think it is, refer to CUPS doc about that), but the fact that _cupsRestoreLocale is called with weird oldlocale argument might be normal. Indeed, looking at CUPS code, this argument has been previously generated by a call to "setlocale", and if I refer to "man setlocale" under Linux, it says that the returned value is an opaque string, so I don't think it is human-readable. If you have the time, you can try to compile the language.c file in "cups/" subdir of CUPS source with DEBUG defined to turn on some CUPS-specific debug messages (add -DDEBUG in the compile command).
Comment 16 Cristian Tibirna 2005-08-22 22:00:37 UTC
UNCONFIRMED (batch reassigning messed this)
Comment 17 Kurt Pfeifle 2007-01-13 02:08:24 UTC
timeout for this bug.

Reporter didn't respond to Michael's suggestion since more than 2 years.... Other Solaris/KDE users have not complained. And we have KDE 3.5.5 now...
Comment 18 John Layt 2008-12-31 17:33:12 UTC
Closing old Resolved status bug.