Bug 228333 - kpixmapcache crashing when creating lock file
Summary: kpixmapcache crashing when creating lock file
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-24 16:58 UTC by Vangelis
Modified: 2010-10-14 00:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vangelis 2010-02-24 16:58:06 UTC
Application: plasma-desktop (0.3)
KDE Platform Version: 4.4.00 (KDE 4.4.0)
Qt Version: 4.6.1
Operating System: Linux 2.6.31-19-generic x86_64
Distribution: Ubuntu 9.10

-- Information about the crash:
Title says everything..
Most probably there is already a report of this bug but I cannot be 100% sure and the dump shown me three stars of usefulness. That`s why I`m reporting it.

The crash can be reproduced some of the time.

 -- Backtrace:
Application: Plasma Workspace (kdeinit4), signal: Aborted
The current source language is "auto; currently c".
[Current thread is 1 (Thread 0x7f9cc83357f0 (LWP 2243))]

Thread 4 (Thread 0x7f9ca0d16910 (LWP 2386)):
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
#1  0x00007f9cc52dfb11 in _L_lock_9274 () from /lib/libc.so.6
#2  0x00007f9cc52dd741 in *__GI___libc_free (mem=0x7f9cc55cde40) at malloc.c:3714
#3  0x00007f9cc1b074f3 in ?? () from /lib/libglib-2.0.so.0
#4  0x00007f9cc692af5f in ~QEventDispatcherGlib (this=0x2e3f220, __in_chrg=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:366
#5  0x00007f9cc680c334 in QThreadPrivate::finish (arg=<value optimized out>) at thread/qthread_unix.cpp:284
#6  0x00007f9cc680c74d in ~__pthread_cleanup_class (arg=0x7f9cc6c14f20) at /usr/include/pthread.h:535
#7  QThreadPrivate::start (arg=0x7f9cc6c14f20) at thread/qthread_unix.cpp:253
#8  0x00007f9cc657da04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007f9cc534280d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f9ca2b7d910 (LWP 23832)):
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x00007f9cc6582662 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:353
#2  0x00007f9cc680be73 in QMutexPrivate::wait (this=0x2ca95c0, timeout=-1) at thread/qmutex_unix.cpp:84
#3  0x00007f9cc68079f5 in QMutex::lock (this=0x2ca9598) at thread/qmutex.cpp:205
#4  0x00007f9ca48fdfba in ?? () from /usr/lib/kde4/plasma_applet_cwp.so
#5  0x00007f9cc680c745 in QThreadPrivate::start (arg=0x2ca9570) at thread/qthread_unix.cpp:248
#6  0x00007f9cc657da04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#7  0x00007f9cc534280d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()
The current source language is "auto; currently asm".

Thread 2 (Thread 0x7f9ca2367910 (LWP 17320)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220
#1  0x00007f9cc680c0b5 in thread_sleep (ti=0x7f9ca2366f00) at thread/qthread_unix.cpp:398
#2  0x00007f9cc680c220 in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:424
#3  0x00007f9ca48fe0af in ?? () from /usr/lib/kde4/plasma_applet_cwp.so
#4  0x00007f9cc680c745 in QThreadPrivate::start (arg=0x30ed260) at thread/qthread_unix.cpp:248
#5  0x00007f9cc657da04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#6  0x00007f9cc534280d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f9cc83357f0 (LWP 2243)):
[KCrash Handler]
#5  0x00007f9cc52964b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#6  0x00007f9cc5299f50 in *__GI_abort () at abort.c:92
#7  0x00007f9cc52cec97 in __libc_message (do_abort=<value optimized out>, fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#8  0x00007f9cc52d8dd6 in malloc_printerr (action=3, str=0x7f9cc53977db "corrupted double-linked list", ptr=<value optimized out>) at malloc.c:6217
#9  0x00007f9cc52da8a2 in _int_free (av=0x7f9cc55cde40, p=0x2ca96b0) at malloc.c:4912
#10 0x00007f9cc52de090 in _int_realloc (av=0x7f9cc55cde40, oldp=0x2ca9620, oldsize=<value optimized out>, nb=<value optimized out>) at malloc.c:5303
#11 0x00007f9cc52de5f0 in *__GI___libc_realloc (oldmem=0x2ca9630, bytes=128) at malloc.c:3799
#12 0x00007f9cc680f59a in QByteArray::realloc (this=0x7fff4f3bc5f0, alloc=<value optimized out>) at tools/qbytearray.cpp:1423
#13 0x00007f9cc680f979 in QByteArray::resize (this=0x7fff4f3bc5f0, size=54) at tools/qbytearray.cpp:1379
#14 0x00007f9cc69340bb in QUtf8::convertFromUnicode (uc=0x304dcd8, len=<value optimized out>, state=0x0) at codecs/qutfcodec.cpp:129
#15 0x00007f9cc6934211 in QUtf8Codec::convertFromUnicode (this=<value optimized out>, uc=0x8c3, len=6, state=0x0) at codecs/qutfcodec.cpp:508
#16 0x00007f9cc692ff57 in QTextCodec::fromUnicode (this=0x8c3, str=<value optimized out>) at codecs/qtextcodec.cpp:1195
#17 0x00007f9cc68511c1 in QString::toLocal8Bit (this=0x7fff4f3bc630) at tools/qstring.cpp:3511
#18 0x00007f9cc688b1a9 in locale_encode (f=...) at io/qfile.cpp:66
#19 0x00007f9cc688b02a in QFile::encodeName (fileName=...) at io/qfile.cpp:477
#20 0x00007f9cc7ecc7ba in lockFile (this=0x5ec80b0, options=) at ../../kdecore/io/klockfile_unix.cpp:154
#21 KLockFile::lock (this=0x5ec80b0, options=) at ../../kdecore/io/klockfile_unix.cpp:264
#22 0x00007f9cc6ecd7bc in KPCLockFile (this=0x1eec980, key=..., pix=...) at ../../kdeui/util/kpixmapcache.cpp:79
#23 KPixmapCache::find (this=0x1eec980, key=..., pix=...) at ../../kdeui/util/kpixmapcache.cpp:1310
#24 0x00007f9cc6e1d33a in KIconCache::find (this=0x1eec980, key=..., pix=..., path=0x0) at ../../kdeui/icons/kiconcache.cpp:277
#25 0x00007f9cc6e10c93 in KIconLoader::loadIcon (this=0x1edc340, _name=..., group=<value optimized out>, size=32, state=<value optimized out>, overlays=..., path_store=0x0, canReturnNull=false)
    at ../../kdeui/icons/kiconloader.cpp:1092
#26 0x00007f9cc6e0874d in KIconEngine::pixmap (this=<value optimized out>, size=..., mode=<value optimized out>, state=<value optimized out>) at ../../kdeui/icons/kiconengine.cpp:119
#27 0x00007f9cc5b51995 in QIcon::pixmap (this=<value optimized out>, size=..., mode=4294967295, state=QIcon::On) at image/qicon.cpp:669
#28 0x00007f9cbe96407a in Plasma::IconWidgetPrivate::decoration (this=0x2910b70, option=<value optimized out>, useHoverEffect=false, usePressedEffect=false) at ../../plasma/widgets/iconwidget.cpp:702
#29 0x00007f9cbe9656ac in Plasma::IconWidget::paint (this=0x24c7470, painter=0x7fff4f3bd7e0, option=0x1fdb308, widget=<value optimized out>) at ../../plasma/widgets/iconwidget.cpp:1013
#30 0x00007f9cc60ab0ea in _q_paintItem (item=<value optimized out>, painter=0x7fff4f3bd7e0, option=0x1fdb308, widget=0x0, useWindowOpacity=<value optimized out>, 
    painterStateProtection=<value optimized out>) at graphicsview/qgraphicsscene.cpp:4218
#31 0x00007f9cc60ab37c in _q_paintIntoCache (pix=0x7fff4f3bde70, item=<value optimized out>, pixmapExposed=..., itemToPixmap=<value optimized out>, renderHints=)
    at graphicsview/qgraphicsscene.cpp:4256
#32 0x00007f9cc60bf283 in QGraphicsScenePrivate::drawItemHelper (this=<value optimized out>, item=0x24c7480, painter=0x7fff4f3bf530, option=0x1fdb308, widget=<value optimized out>, 
    painterStateProtection=<value optimized out>) at graphicsview/qgraphicsscene.cpp:4549
#33 0x00007f9cc60bfdcd in QGraphicsScenePrivate::draw (this=<value optimized out>, item=0x24c7480, painter=0x7fff4f3bf530, viewTransform=<value optimized out>, transformPtr=<value optimized out>, 
    exposedRegion=<value optimized out>, widget=0x26cf420, opacity=<value optimized out>, effectTransform=0x0, wasDirtyParentSceneTransform=false, drawItem=true)
    at graphicsview/qgraphicsscene.cpp:4767
#34 0x00007f9cc60c0702 in QGraphicsScenePrivate::drawSubtreeRecursive (this=<value optimized out>, item=0x24c7480, painter=0x7fff4f3bf530, viewTransform=0x7fff4f3bf2e0, exposedRegion=0x2f78c20, 
    widget=0x26cf420, parentOpacity=<value optimized out>, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4700
#35 0x00007f9cc60bfc68 in QGraphicsScenePrivate::draw (this=<value optimized out>, item=0x24caae0, painter=0x7fff4f3bf530, viewTransform=<value optimized out>, transformPtr=<value optimized out>, 
    exposedRegion=<value optimized out>, widget=0x26cf420, opacity=<value optimized out>, effectTransform=0x0, wasDirtyParentSceneTransform=false, drawItem=true)
    at graphicsview/qgraphicsscene.cpp:4781
#36 0x00007f9cc60c0702 in QGraphicsScenePrivate::drawSubtreeRecursive (this=<value optimized out>, item=0x24caae0, painter=0x7fff4f3bf530, viewTransform=0x7fff4f3bf2e0, exposedRegion=0x2f78c20, 
    widget=0x26cf420, parentOpacity=<value optimized out>, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4700
#37 0x00007f9cc60bfc68 in QGraphicsScenePrivate::draw (this=<value optimized out>, item=0x2272c30, painter=0x7fff4f3bf530, viewTransform=<value optimized out>, transformPtr=<value optimized out>, 
    exposedRegion=<value optimized out>, widget=0x26cf420, opacity=<value optimized out>, effectTransform=0x0, wasDirtyParentSceneTransform=false, drawItem=true)
    at graphicsview/qgraphicsscene.cpp:4781
#38 0x00007f9cc60c0702 in QGraphicsScenePrivate::drawSubtreeRecursive (this=<value optimized out>, item=0x2272c30, painter=0x7fff4f3bf530, viewTransform=0x7fff4f3bf2e0, exposedRegion=0x2f78c20, 
    widget=0x26cf420, parentOpacity=<value optimized out>, effectTransform=0x0) at graphicsview/qgraphicsscene.cpp:4700
#39 0x00007f9cc60c0e6c in QGraphicsScenePrivate::drawItems (this=0x1fdb0b0, painter=0x7fff4f3bf530, viewTransform=0x7fff4f3bf2e0, exposedRegion=0x2f78c20, widget=0x26cf420)
    at graphicsview/qgraphicsscene.cpp:4593
#40 0x00007f9cc60e0125 in QGraphicsView::paintEvent (this=0x2f0ae00, event=<value optimized out>) at graphicsview/qgraphicsview.cpp:3394
#41 0x00007f9cba199bf9 in ?? () from /usr/lib/libkdeinit4_plasma-desktop.so
#42 0x00007f9cc5af5f32 in QWidget::event (this=0x2f0ae00, event=0x7fff4f3bfe70) at kernel/qwidget.cpp:8124
#43 0x00007f9cc5e9c0d6 in QFrame::event (this=0x2f0ae00, e=0x7fff4f3bfe70) at widgets/qframe.cpp:557
#44 0x00007f9cc60db49b in QGraphicsView::viewportEvent (this=0x2f0ae00, event=0x7fff4f3bfe70) at graphicsview/qgraphicsview.cpp:2788
#45 0x00007f9cc6900357 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x26cf420, event=0x7fff4f3bfe70) at kernel/qcoreapplication.cpp:819
#46 0x00007f9cc5a9ff7c in QApplicationPrivate::notify_helper (this=0x1edc510, receiver=0x26cf420, e=0x7fff4f3bfe70) at kernel/qapplication.cpp:4294
#47 0x00007f9cc5aa659b in QApplication::notify (this=0x1ec65c0, receiver=0x26cf420, e=0x7fff4f3bfe70) at kernel/qapplication.cpp:4181
#48 0x00007f9cc6e48d16 in KApplication::notify (this=0x1ec65c0, receiver=0x26cf420, event=0x7fff4f3bfe70) at ../../kdeui/kernel/kapplication.cpp:302
#49 0x00007f9cc6900f3c in QCoreApplication::notifyInternal (this=0x1ec65c0, receiver=0x26cf420, event=0x7fff4f3bfe70) at kernel/qcoreapplication.cpp:704
#50 0x00007f9cc5afe48d in QCoreApplication::sendSpontaneousEvent (this=0x2f67e50, pdev=<value optimized out>, rgn=..., offset=<value optimized out>, flags=<value optimized out>, sharedPainter=0x0, 
    backingStore=0x28a4420) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#51 QWidgetPrivate::drawWidget (this=0x2f67e50, pdev=<value optimized out>, rgn=..., offset=<value optimized out>, flags=<value optimized out>, sharedPainter=0x0, backingStore=0x28a4420)
    at kernel/qwidget.cpp:5321
#52 0x00007f9cc5aff128 in QWidgetPrivate::paintSiblingsRecursive (this=<value optimized out>, pdev=<value optimized out>, siblings=..., index=2, rgn=<value optimized out>, 
    offset=<value optimized out>, flags=4, sharedPainter=0x0, backingStore=0x28a4420) at kernel/qwidget.cpp:5434
#53 0x00007f9cc5afe1ea in QWidgetPrivate::drawWidget (this=0x2f78760, pdev=<value optimized out>, rgn=..., offset=<value optimized out>, flags=<value optimized out>, sharedPainter=0x0, 
    backingStore=0x28a4420) at kernel/qwidget.cpp:5370
#54 0x00007f9cc5cb7545 in QWidgetBackingStore::sync (this=0x28a4420) at painting/qbackingstore.cpp:1291
#55 0x00007f9cc5aefee0 in QWidgetPrivate::syncBackingStore (this=0x2f78760) at kernel/qwidget.cpp:1663
#56 0x00007f9cc5af6635 in QWidget::event (this=0x2f0ae00, event=0x615acb0) at kernel/qwidget.cpp:8271
#57 0x00007f9cc5e9c0d6 in QFrame::event (this=0x2f0ae00, e=0x615acb0) at widgets/qframe.cpp:557
#58 0x00007f9cc5f2751b in QAbstractScrollArea::event (this=0x2f0ae00, e=0x615acb0) at widgets/qabstractscrollarea.cpp:989
#59 0x00007f9cba19bf50 in ?? () from /usr/lib/libkdeinit4_plasma-desktop.so
#60 0x00007f9cc5a9ffac in QApplicationPrivate::notify_helper (this=0x1edc510, receiver=0x2f0ae00, e=0x615acb0) at kernel/qapplication.cpp:4298
#61 0x00007f9cc5aa659b in QApplication::notify (this=0x1ec65c0, receiver=0x2f0ae00, e=0x615acb0) at kernel/qapplication.cpp:4181
#62 0x00007f9cc6e48d16 in KApplication::notify (this=0x1ec65c0, receiver=0x2f0ae00, event=0x615acb0) at ../../kdeui/kernel/kapplication.cpp:302
#63 0x00007f9cc6900f3c in QCoreApplication::notifyInternal (this=0x1ec65c0, receiver=0x2f0ae00, event=0x615acb0) at kernel/qcoreapplication.cpp:704
#64 0x00007f9cc69036b7 in QCoreApplication::sendEvent (receiver=0x2f0ae00, event_type=<value optimized out>, data=0x1e58cb0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#65 QCoreApplicationPrivate::sendPostedEvents (receiver=0x2f0ae00, event_type=<value optimized out>, data=0x1e58cb0) at kernel/qcoreapplication.cpp:1345
#66 0x00007f9cc60c7a7a in QGraphicsViewPrivate::dispatchPendingUpdateRequests (this=0x1fdb0b0) at ../../include/QtGui/private/../../../src/gui/graphicsview/qgraphicsview_p.h:184
#67 QGraphicsScenePrivate::_q_processDirtyItems (this=0x1fdb0b0) at graphicsview/qgraphicsscene.cpp:490
#68 0x00007f9cc60c8002 in QGraphicsScene::qt_metacall (this=0x1fda690, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x5fe4b70) at .moc/release-shared/moc_qgraphicsscene.cpp:130
#69 0x00007f9cbe8b4565 in Plasma::Corona::qt_metacall (this=0x8c3, _c=2243, _id=6, _a=0xffffffffffffffff) at ./corona.moc:107
#70 0x00007f9cba18bde3 in ?? () from /usr/lib/libkdeinit4_plasma-desktop.so
#71 0x00007f9cc6910c79 in QObject::event (this=0x1fda690, e=0x304bfe0) at kernel/qobject.cpp:1248
#72 0x00007f9cc60c3fb0 in QGraphicsScene::event (this=0x1fda690, event=0x304bfe0) at graphicsview/qgraphicsscene.cpp:3475
#73 0x00007f9cc5a9ffac in QApplicationPrivate::notify_helper (this=0x1edc510, receiver=0x1fda690, e=0x304bfe0) at kernel/qapplication.cpp:4298
#74 0x00007f9cc5aa659b in QApplication::notify (this=0x1ec65c0, receiver=0x1fda690, e=0x304bfe0) at kernel/qapplication.cpp:4181
#75 0x00007f9cc6e48d16 in KApplication::notify (this=0x1ec65c0, receiver=0x1fda690, event=0x304bfe0) at ../../kdeui/kernel/kapplication.cpp:302
#76 0x00007f9cc6900f3c in QCoreApplication::notifyInternal (this=0x1ec65c0, receiver=0x1fda690, event=0x304bfe0) at kernel/qcoreapplication.cpp:704
#77 0x00007f9cc69036b7 in QCoreApplication::sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x1e58cb0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#78 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x1e58cb0) at kernel/qcoreapplication.cpp:1345
#79 0x00007f9cc692a923 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#80 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276
#81 0x00007f9cc1b07bce in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#82 0x00007f9cc1b0b598 in ?? () from /lib/libglib-2.0.so.0
#83 0x00007f9cc1b0b6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#84 0x00007f9cc692a463 in QEventDispatcherGlib::processEvents (this=0x1e5a1c0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#85 0x00007f9cc5b4f7ee in QGuiEventDispatcherGlib::processEvents (this=0x8c3, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#86 0x00007f9cc68ff862 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#87 0x00007f9cc68ffc3c in QEventLoop::exec (this=0x7fff4f3c1f60, flags=) at kernel/qeventloop.cpp:201
#88 0x00007f9cc690397b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#89 0x00007f9cba1930a2 in kdemain () from /usr/lib/libkdeinit4_plasma-desktop.so
#90 0x0000000000406fb8 in launch (argc=1, _name=<value optimized out>, args=<value optimized out>, cwd=<value optimized out>, envc=0, envs=<value optimized out>, reset_env=false, tty=0x0, 
    avoid_loops=false, startup_id_str=0x40a499 "0") at ../../kinit/kinit.cpp:717
#91 0x0000000000407c70 in handle_launcher_request (sock=9, who=<value optimized out>) at ../../kinit/kinit.cpp:1209
#92 0x0000000000408121 in handle_requests (waitForPid=0) at ../../kinit/kinit.cpp:1402
#93 0x0000000000408df2 in main (argc=4, argv=<value optimized out>, envp=<value optimized out>) at ../../kinit/kinit.cpp:1841
The current source language is "auto; currently c".

This bug may be a duplicate of or related to bug 196207.

Possible duplicates by query: bug 225166, bug 224688, bug 221616, bug 220452, bug 214562.

Reported using DrKonqi
Comment 1 Jonathan Thomas 2010-02-24 17:03:37 UTC
Could you please paste the output of "apt-cache policy libc6"? This looks like bug 196207, and I'd like to make sure that you have the latest glibc.
Comment 2 Vangelis 2010-02-24 17:19:33 UTC
apt-cache policy libc6
libc6:
  Installed: 2.10.1-0ubuntu16
  Candidate: 2.10.1-0ubuntu16
Comment 3 Jonathan Thomas 2010-02-24 17:22:07 UTC
Hmm, that version does have the glibc bugfix, so I suppose this must be a different issue.
Comment 4 Dario Andres 2010-02-24 22:50:53 UTC
There is another weird crash, related to lockfiles too: bug 206047.
Comment 5 Christoph Feck 2010-10-14 00:27:30 UTC
(I quickly reviewed the backtrace of this crash, and it appears to be caused by KIconCache memory corruption. If this is not the case, please reopen.)

Closing all KIconCache crashes as fixed, because the KIconLoader in KDE SC 4.5 now uses KSharedDataCache to cache icons, and it is believed that the new class is less prone to random crashes or memory corruption.

If you still can reproduce a crash with version 4.5, please report it separately. If you cannot upgrade to 4.5 yet, you should be able to work around this crash by deleting the icon cache files in /var/tmp/kdecache-<user>/kpc