Bug 318391 - Crash when adding "Printer Class"
Summary: Crash when adding "Printer Class"
Status: RESOLVED FIXED
Alias: None
Product: print-manager
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.10.2
Platform: Chakra Linux
: NOR crash
Target Milestone: ---
Assignee: Daniel Nicoletti
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2013-04-15 14:12 UTC by Richard Llom
Modified: 2013-05-21 22:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (7.21 KB, text/plain)
2013-04-26 18:02 UTC, Richard Llom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Llom 2013-04-15 14:12:35 UTC
Application: add-printer (0.3.0)
KDE Platform Version: 4.10.2
Qt Version: 4.8.4
Operating System: Linux 3.7.6-2-CHAKRA x86_64
Distribution: "Chakra Linux"

-- Information about the crash:
- What I was doing when the application crashed:

In the system-config-printer-kde tool, I tried the menu on Add Printer and a "Printer Class".

I can reproduce this, if needed I can try to create a valgrind trace.


Attached is a 3-star backtrace

The crash can be reproduced every time.

-- Backtrace:
Application: AddPrinter (add-printer), signal: Aborted
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f1cc6bde780 (LWP 2705))]

Thread 2 (Thread 0x7f1cb3e3f700 (LWP 2706)):
#0  0x00007f1cc1dc9dc5 in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0x00007f1cbff0d161 in g_mutex_lock () from /usr/lib/libglib-2.0.so.0
#2  0x00007f1cbfecffab in g_main_context_query () from /usr/lib/libglib-2.0.so.0
#3  0x00007f1cbfed05b9 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007f1cbfed0764 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007f1cc419afb6 in QEventDispatcherGlib::processEvents (this=0x7f1cac0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007f1cc4167d2f in QEventLoop::processEvents (this=this@entry=0x7f1cb3e3edc0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f1cc4167f88 in QEventLoop::exec (this=0x7f1cb3e3edc0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f1cc405c76d in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#9  0x00007f1cc59864c5 in KCupsConnection::run() () from /usr/lib/libkcupslib.so
#10 0x00007f1cc405f519 in QThreadPrivate::start (arg=0x1612e70) at thread/qthread_unix.cpp:338
#11 0x00007f1cc1dc7e0e in start_thread () from /lib/libpthread.so.0
#12 0x00007f1cc3a221dd in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7f1cc6bde780 (LWP 2705)):
[KCrash Handler]
#6  0x00007f1cc3972c45 in raise () from /lib/libc.so.6
#7  0x00007f1cc39740c8 in abort () from /lib/libc.so.6
#8  0x00007f1cc4054dff in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2323
#9  0x00007f1cc4054f78 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=0x7f1cc41d41e8 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=ap@entry=0x7fffa31c8508) at global/qglobal.cpp:2369
#10 0x00007f1cc4055104 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2552
#11 0x00007f1cc4169084 in QCoreApplicationPrivate::checkReceiverThread (this=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.cpp:524
#12 0x00007f1cc4df8f0d in QApplication::notify (this=0x7fffa31c9d10, receiver=0x15bee90, e=0x7fffa31c8ba0) at kernel/qapplication.cpp:3841
#13 0x00007f1cc65e46e6 in KApplication::notify (this=0x7fffa31c9d10, receiver=0x15bee90, event=0x7fffa31c8ba0) at /chakra/desktop-testing/kdelibs/src/kdelibs-4.10.2/kdeui/kernel/kapplication.cpp:311
#14 0x00007f1cc41697ee in QCoreApplication::notifyInternal (this=0x7fffa31c9d10, receiver=0x15bee90, event=0x7fffa31c8ba0) at kernel/qcoreapplication.cpp:946
#15 0x00007f1cc41856eb in sendEvent (event=0x7fffa31c8ba0, receiver=0x15bee90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#16 QObject::setProperty (this=0x15bee90, name=0x7f1cc59a0950 "reqDestName", value=...) at kernel/qobject.cpp:3707
#17 0x00007f1cc59984b6 in ClassListWidget::reload(QString const&, QStringList const&) () from /usr/lib/libkcupslib.so
#18 0x0000000000421d5a in _start ()

Reported using DrKonqi
Comment 1 Christoph Feck 2013-04-15 18:53:27 UTC
> system-config-printer-kde

You should not be using this. Since KDE 4.10, the new "print-manager" should be used (C++ based, not Python based). Please check with your distribution, if they are indeed shipping the unmaintained system-config-printer-kde.
Comment 2 Richard Llom 2013-04-15 19:43:18 UTC
(In reply to comment #1)
> > system-config-printer-kde
> 
> You should not be using this. Since KDE 4.10, the new "print-manager" should
> be used (C++ based, not Python based). Please check with your distribution,
> if they are indeed shipping the unmaintained system-config-printer-kde.

How can I find out, which one I'm using?
Comment 3 Christoph Feck 2013-04-15 21:33:54 UTC
> #17 0x00007f1cc59984b6 in ClassListWidget::reload(QString const&, QStringList const&) () from /usr/lib/libkcupslib.so

Actually, from looking at the backtrace, you are indeed using print-manager. Reassigning.
Comment 4 Daniel Nicoletti 2013-04-26 04:44:10 UTC
Can you please install debug symbols?
Tho I have an idea on where it's crashing it's hard to tell why
Comment 5 Richard Llom 2013-04-26 16:14:06 UTC
According to Dr.Konqi I have all debug symbols installed... which one do you miss?
Comment 6 Daniel Nicoletti 2013-04-26 16:31:14 UTC
Print-manager ones, a few questions:
is CUPS running?
can you add a printer class using http://localhost:631
how many printers do you have configured?
thanks
Comment 7 Richard Llom 2013-04-26 17:59:25 UTC
(In reply to comment #6)
> Print-manager ones
Ok, I installed it, bugtrace follows.

> a few questions: is CUPS running?
Yes.

> can you add a printer class using http://localhost:631
Yes.

> how many printers do you have configured?
At first try one, now three (crash all times).

> thanks
You are welcome :-)
Comment 8 Richard Llom 2013-04-26 18:02:04 UTC
Created attachment 79473 [details]
New crash information added by DrKonqi

add-printer (0.3.0) on KDE Platform 4.10.2 using Qt 4.8.4

- What I was doing when the application crashed:

See above.

Now bugtrace with kdeadmin-print-manager-debug 4.10.2-1 installed.

-- Backtrace (Reduced):
#11 0x00007ffb1df58084 in QCoreApplicationPrivate::checkReceiverThread (this=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.cpp:524
#12 0x00007ffb1ebe7f0d in QApplication::notify (this=0x7fffa41fe000, receiver=0x1e053e0, e=0x7fffa41fce90) at kernel/qapplication.cpp:3841
#13 0x00007ffb203d36e6 in KApplication::notify (this=0x7fffa41fe000, receiver=0x1e053e0, event=0x7fffa41fce90) at /chakra/desktop-testing/kdelibs/src/kdelibs-4.10.2/kdeui/kernel/kapplication.cpp:311
#14 0x00007ffb1df587ee in QCoreApplication::notifyInternal (this=0x7fffa41fe000, receiver=0x1e053e0, event=0x7fffa41fce90) at kernel/qcoreapplication.cpp:946
#15 0x00007ffb1df746eb in sendEvent (event=0x7fffa41fce90, receiver=0x1e053e0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
Comment 9 Daniel Nicoletti 2013-04-26 18:14:51 UTC
Ok, now I know where it crashes and I also think I know why, can you compile from git or a patch to so I can be sure this was the issue?
Comment 10 Richard Llom 2013-04-26 18:19:09 UTC
Sorry, I don't know how.
Comment 11 Daniel Nicoletti 2013-04-26 18:27:29 UTC
you could grab the source here
http://anongit.kde.org/print-manager/print-manager-latest.tar.gz
and I tell you what else you would need to do, but if you are not
comfortable with this I'd do what I think should be done so this
issue is fixed and then close as fixed.
Comment 12 Daniel Nicoletti 2013-04-26 20:30:39 UTC
Git commit d43b3b182674807e2207ff230771deb875f361e3 by Daniel Nicoletti.
Committed on 26/04/2013 at 22:28.
Pushed by dantti into branch 'master'.

Fix storing request properties before the object change threads

M  +2    -2    libkcups/ClassListWidget.cpp

http://commits.kde.org/print-manager/d43b3b182674807e2207ff230771deb875f361e3
Comment 13 Richard Llom 2013-05-01 18:46:29 UTC
Thanks for the fix! Can you also push it to 4.10 branch?
Comment 14 Daniel Nicoletti 2013-05-02 02:31:53 UTC
It's there already :)
Comment 15 Richard Llom 2013-05-18 14:08:54 UTC
Hey Daniel, I tried now in 4.10.3 and the crash is indeed fixed, but it still doesn't work.

On the "Please describe you printer" page, when I hit next I get the error:
"Failed to add class: 'The printer or class does not exist.'"
Comment 16 Richard Llom 2013-05-18 14:11:10 UTC
PS:
I just noticed, although there is this error message, when you cancel the printer is created. (I didn't test printing thou, but I guess it will work)
Comment 17 Daniel Nicoletti 2013-05-21 22:29:37 UTC
Git commit e0e0871c0f43c967151dc7c4b4b2a480ad893141 by Daniel Nicoletti.
Committed on 22/05/2013 at 00:25.
Pushed by dantti into branch 'KDE/4.10'.

Fix typo which prevented printer classes to be properly added/modified

M  +1    -1    libkcups/KCupsConnection.h

http://commits.kde.org/print-manager/e0e0871c0f43c967151dc7c4b4b2a480ad893141
Comment 18 Daniel Nicoletti 2013-05-21 22:35:49 UTC
Thanks