[commonqt-devel] recent commonqt changes

Ivan Shvedunov ivan4th at gmail.com
Tue Dec 21 11:22:20 UTC 2010


  Dear colleagues,
  I've pushed the changes I've accumulated over the last week
to my github repository ( https://github.com/ivan4th/commonqt/ ).
Please review them and let me know whether I should push some
of them to the main repo.

Some comments.

1. I've fixed OUTPUT-FILES method on CPP->SO in qt.asd.
Without this change, commonqt was being reloaded every time,
at least when loading it via quicklisp, due to problems with
FASL relocations. Also, SWANK:DELETE-SYSTEM-FILES
was deleting only commonqt.so which didn't get restored by
make during compilation.

2. When unparseable signal/slot signature was encountered,
a rather mysteriously looking error was displayed. I've added
a check to MAKE-SLOT-OR-SIGNAL with more readable
error message.

3. To make QTYPEP more useful outside CommonQt's own
code I've made it recognize type argument specified as string
(integer values are still accepted of course).

4. I've added more QVariant conversions to qvariant.lisp.
It's still doesn't support all necessary types but at least now
it's possible to colorize and decorate these Q*Views.

5. UNMARSHALLER now caches unmarshalled closures.
This seems to improve performance a bit in
%METHOD-INVOCATION-CALLBACK as it doesn't cache
anything itself. Also, I've got rid of redundant NONCONST-NAME
function I've introduced previously. I did some tests
on a QListView code with custom model with SBCL
statistical profiler and seems like all this indeed helps
(will later distill that test code into automatic benchmark).

6. The most recent commit is an attempt to cache marshaller
closures too, which didn't succeed so far (perhaps I've did
something silly there). If you enable cached version of MARSHALLER
CommonQt crashes pretty soon when method invocation callbacks
happen. This commit shouldn't be pushed to the main repository
yet of course.

I've tried to research problems with Qt Hemlock. On my machine
it causes memory fault soon after (hi::hemlock) on (#_show window) in
HI::%INIT-SCREEN-MANAGER. After some debugging with
gdb attached to SBCL I've managed to get stack trace of the
problem (see attached file). If you google for
"QVector<QPair<double, QVariant> >::end" you'll see that the
problem is not unique. It happens somewhere in Qt intestines
in animation fx related code. Seems like QPropertyAnimation
object (it's also QVariantAnimation and QAbstractAnimation) gets
destroyed to early. I doubt this problem is directly related to
CommonQt changes and most likely it's a bug in Qt which
gets triggered by current stack state and other random reasons.
I will research it further in coming days.

-- 
Ivan Shvedunov <ivan4th at gmail.com>
;; My GPG fingerprint is: 2E61 0748 8E12 BB1A 5AB9  F7D0 613E C0F8 0BC5 2807
-------------- next part --------------
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2af05f4 in QVector<QPair<double, QVariant> >::end (this=0x118) at ../../include/QtCore/../../src/corelib/tools/qvector.h:238
238	    inline const_iterator end() const { return p->array + d->size; }
(gdb) backtrace 
#0  0x00007ffff2af05f4 in QVector<QPair<double, QVariant> >::end (this=0x118) at ../../include/QtCore/../../src/corelib/tools/qvector.h:238
#1  0x00007ffff2aede60 in QVariantAnimationPrivate::valueAt (this=0x0, step=0) at animation/qvariantanimation.cpp:308
#2  0x00007ffff2aee942 in QVariantAnimation::keyValueAt (this=0x8d83b0, step=0) at animation/qvariantanimation.cpp:566
#3  0x00007ffff2aee86e in QVariantAnimation::startValue (this=0x8d83b0) at animation/qvariantanimation.cpp:530
#4  0x00007ffff2af337b in QPropertyAnimation::updateState (this=0x8d83b0, newState=QAbstractAnimation::Running, oldState=QAbstractAnimation::Stopped) at animation/qpropertyanimation.cpp:287
#5  0x00007ffff2aea4e5 in QAbstractAnimationPrivate::setState (this=0x8c3010, newState=QAbstractAnimation::Running) at animation/qabstractanimation.cpp:411
#6  0x00007ffff2aeb0ee in QAbstractAnimation::start (this=0x8d83b0, policy=QAbstractAnimation::DeleteWhenStopped) at animation/qabstractanimation.cpp:780
#7  0x00007ffff387157f in QWidgetAnimator::animate (this=0x89f428, widget=0x889bc0, _final_geometry=..., animate=false) at widgets/qwidgetanimator.cpp:102
#8  0x00007ffff378e325 in QDockAreaLayout::apply (this=0x89efa8, animate=false) at widgets/qdockarealayout.cpp:3080
#9  0x00007ffff37bfad8 in QMainWindowLayoutState::apply (this=0x89eed0, animated=false) at widgets/qmainwindowlayout.cpp:235
#10 0x00007ffff37c63d5 in QMainWindowLayout::applyState (this=0x89eeb0, newState=..., animate=false) at widgets/qmainwindowlayout.cpp:1925
#11 0x00007ffff37c33af in QMainWindowLayout::setGeometry (this=0x89eeb0, _r=...) at widgets/qmainwindowlayout.cpp:1473
#12 0x00007ffff325acf8 in QLayoutPrivate::doResize (this=0x89f480, r=...) at kernel/qlayout.cpp:681
#13 0x00007ffff325aded in QLayout::widgetEvent (this=0x89eeb0, e=0x7ffff4da20e0) at kernel/qlayout.cpp:705
#14 0x00007ffff3220514 in QApplicationPrivate::notify_helper (this=0x660450, receiver=0x89ebd0, e=0x7ffff4da20e0) at kernel/qapplication.cpp:4387
#15 0x00007ffff32203ad in QApplication::notify (this=0x660430, receiver=0x89ebd0, e=0x7ffff4da20e0) at kernel/qapplication.cpp:4361
#16 0x00007fffef91bd9e in __smokeqtgui::x_QApplication::notify (this=0x660430, x1=0x89ebd0, x2=0x7ffff4da20e0) at /home/ivan4th/progs/kdebindings/smoke/qtgui/x_3.cpp:913
#17 0x00007ffff2c47aec in QCoreApplication::notifyInternal (this=0x660430, receiver=0x89ebd0, event=0x7ffff4da20e0) at kernel/qcoreapplication.cpp:732
#18 0x00007ffff3222d0f in QCoreApplication::sendSpontaneousEvent (receiver=0x89ebd0, event=0x7ffff4da20e0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#19 0x00007ffff32d61bf in QETWidget::translateConfigEvent (this=0x89ebd0, event=0x7ffff4da2d00) at kernel/qapplication_x11.cpp:5280
#20 0x00007ffff32cf690 in QApplication::x11ProcessEvent (this=0x660430, event=0x7ffff4da2d00) at kernel/qapplication_x11.cpp:3441
#21 0x00007ffff330d22d in x11EventSourceDispatch (s=0x664620, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#22 0x00007ffff20b1342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#23 0x00007ffff20b52a8 in ?? () from /lib/libglib-2.0.so.0
#24 0x00007ffff20b545c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#25 0x00007ffff2c86f3b in QEventDispatcherGlib::processEvents (this=0x639fc0, flags=...) at kernel/qeventdispatcher_glib.cpp:415
#26 0x00007ffff330d950 in QGuiEventDispatcherGlib::processEvents (this=0x639fc0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#27 0x00007ffff40b77a0 in x_10 (xi=<value optimized out>, obj=0x8d6350, args=0x83ff00) at /home/ivan4th/progs/kdebindings/smoke/qtcore/x_1.cpp:64
#28 __smokeqtcore::xcall_QAbstractEventDispatcher (xi=<value optimized out>, obj=0x8d6350, args=0x83ff00) at /home/ivan4th/progs/kdebindings/smoke/qtcore/x_1.cpp:324
#29 0x0000001006d20c24 in ?? ()
#30 0x00007ffff4da3087 in ?? ()
#31 0x0000000020100017 in ?? ()
#32 0x00007ffff4da3180 in ?? ()
---Type <return> to continue, or q <return> to quit---
#33 0x00000080334e2278 in ?? ()
#34 0x00000010067ad679 in ?? ()
#35 0x00000010067acb27 in ?? ()
#36 0x00000010067ad6af in ?? ()
#37 0x0000001007100679 in ?? ()
#38 0x00000010067ad66f in ?? ()
#39 0x00007ffff4da3090 in ?? ()
#40 0x00007ffff4da3180 in ?? ()
#41 0x000000100669c44f in ?? ()
#42 0x00000010067ac36f in ?? ()
#43 0x00000010051c2ee9 in ?? ()
#44 0x0000001000ccaf59 in ?? ()
#45 0x0000000000000028 in ?? ()
#46 0x0000001005d2842f in ?? ()
#47 0x000000100b3a3097 in ?? ()
#48 0x000000002010004f in ?? ()
#49 0x00007ffff4da30d0 in ?? ()
#50 0x00007ffff4da43d0 in ?? ()
#51 0x00007ffff4da3428 in ?? ()
#52 0x00007ffff4fa3ff8 in ?? ()
#53 0x000000000083ff00 in ?? ()
#54 0x00007ffff4da34e0 in ?? ()
#55 0x00007ffff4da3180 in ?? ()
#56 0x000000100669c527 in ?? ()
#57 0x000000100afc7ce6 in ?? ()
#58 0x0000001007100679 in ?? ()
#59 0x00000010067ad679 in ?? ()
#60 0x00000010067acb27 in ?? ()
#61 0x00000010067ad519 in ?? ()
#62 0x00000010067ad4e9 in ?? ()
#63 0x00007ffff4da30d0 in ?? ()
#64 0x00007ffff4da3200 in ?? ()
#65 0x000000100afc7ce6 in ?? ()
---Type <return> to continue, or q <return> to quit---
#66 0x0000001000591b8f in ?? ()
#67 0x00000000000e8b88 in ?? ()
#68 0x00000010067ac2e1 in ?? ()
#69 0x00000010067acb27 in ?? ()
#70 0x4097752d9fcced08 in ?? ()
#71 0x0000001005d2842f in ?? ()
#72 0x000000100c90cdef in ?? ()
#73 0x000000100014694f in ?? ()
#74 0x0000000000000200 in ?? ()
#75 0x0000001005d2842f in ?? ()
#76 0x0000000000000030 in ?? ()
#77 0x0000001005d2842f in ?? ()
#78 0x000000100b3a426f in ?? ()
#79 0x00000010067ad607 in ?? ()
#80 0x00007ffff4da3240 in ?? ()
#81 0x00000010064bf9b7 in ?? ()
#82 0x00000010067072c1 in ?? ()
#83 0x000000100747bd21 in ?? ()
#84 0x0000000020100017 in ?? ()
#85 0x00000010077c56e1 in ?? ()
#86 0x0000000020100017 in ?? ()
#87 0x000000100821a831 in ?? ()
#88 0x00007ffff4da3370 in ?? ()
#89 0x00000010065908b0 in ?? ()
#90 0x00007ffff4da3267 in ?? ()
#91 0x00007ffff4da3387 in ?? ()
#92 0x00007ffff4da3277 in ?? ()
#93 0x0000000020100017 in ?? ()
#94 0x0000001005d2689f in ?? ()
#95 0x0000001006f72989 in ?? ()
#96 0x0000001005d8baa7 in ?? ()
#97 0x0000001005ff0d27 in ?? ()
#98 0x00000010003c0d01 in ?? ()
---Type <return> to continue, or q <return> to quit---
#99 0x52c8103871326000 in ?? ()
#100 0x0000000000000058 in ?? ()
#101 0x0000001005ff0cef in ?? ()
#102 0x00007ffff4da32f0 in ?? ()
#103 0x00000010005465c6 in ?? ()
#104 0x00000010005b5486 in ?? ()
#105 0x00000010001fba67 in ?? ()
#106 0x00000010001fba77 in ?? ()
#107 0x0000000000000058 in ?? ()
#108 0x00000010003c0d01 in ?? ()
#109 0x0000001006343d7f in ?? ()
#110 0x00000010062f42df in ?? ()
#111 0x0000001006215e4f in ?? ()
#112 0x00000010003fa079 in ?? ()
#113 0x0000001006706707 in ?? ()
#114 0x00007ffff4da33a0 in ?? ()
#115 0x0000000020100017 in ?? ()
#116 0x0000001000068c1a in ?? ()
#117 0x0000001005ff0cef in ?? ()
#118 0x00007ffff4da3370 in ?? ()
#119 0x0000001000068c1a in ?? ()
#120 0x00007ffff4da35c8 in ?? ()
#121 0x00007ffff4da33e0 in ?? ()
#122 0x00007ffff4da33a0 in ?? ()
#123 0x00000010005b5652 in ?? ()
#124 0x0000001006637e58 in ?? ()
#125 0x0000001005ff0cef in ?? ()
#126 0x00007ffff4da3460 in ?? ()
#127 0x0000001006637e58 in ?? ()
#128 0x00007ffff4da3397 in ?? ()
#129 0x00007ffff4da38a7 in ?? ()
#130 0x00007ffff4da33a7 in ?? ()
#131 0x0000000020100017 in ?? ()
---Type <return> to continue, or q <return> to quit---
#132 0x00000010000753ff in ?? ()
#133 0x00000010092108f9 in ?? ()
#134 0x0000000000000010 in ?? ()
#135 0x0000000000000001 in ?? ()
#136 0x00007ffff4da33b0 in ?? ()
#137 0x00007ffff4da4360 in ?? ()
#138 0x00007ffff4da3618 in ?? ()
#139 0x00007ffff4fa3ff8 in ?? ()
#140 0x00007ffff4da33b0 in ?? ()
#141 0x00007ffff4da4360 in ?? ()
#142 0x00007ffff4da3400 in ?? ()
#143 0x00007ffff4fa3ff8 in ?? ()
#144 0x00007ffff4da34e0 in ?? ()
#145 0x00007ffff4da3460 in ?? ()
#146 0x0000001006637bc8 in ?? ()
#147 0x0000001006e7638f in ?? ()
#148 0x00007ffff4da3618 in ?? ()
#149 0x00007ffff4da34e0 in ?? ()
#150 0x00007ffff4da3460 in ?? ()
#151 0x0000001006637f20 in ?? ()
#152 0x0000001006e78c8f in ?? ()
#153 0x00007ffff4da3400 in ?? ()
#154 0x00007ffff4da33b0 in ?? ()
#155 0x0000000020100017 in ?? ()
#156 0x00007ffff4da3520 in ?? ()
#157 0x00000010066a89b7 in ?? ()
#158 0x0000000020100017 in ?? ()
#159 0x000000100c153b0f in ?? ()
#160 0x0000001004579641 in ?? ()
#161 0x0000001006528791 in ?? ()
#162 0x0000000000000000 in ?? ()


More information about the commonqt-devel mailing list