I've tested it and it still segfaults at the same line.
Adding the GIL lock also causes a deadlock in one of
my pyqt unit tests : test_queued_connection_after_delete
This is a bit strange, because this is the test I wrote
to 'prove' another issue, but I have been unable to
create segfaults with this test.
If there is more debugging stuff I can try, please
let me know
On Sat, Sep 17, 2011 at 2:46 PM, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On Sat, 17 Sep 2011 04:51:42 +0100, Phil Thompson
> <phil at riverbankcomputing.com> wrote:
>> On Fri, 16 Sep 2011 22:28:24 +0200, Erik Janssens
>> <Erik.Janssens at conceptive.be> wrote:
>>> Hi,
>>>>>> I'm seeing an assertion failure in sip, stacktrace
>>> attached.
>>>>>> It happens consistently, but only after long stress
>>> tests of a large application.
>>>>>> Any suggestions on what might be causing this
>>> failure, so I can try to isolate the case ?
>>>> It looks like there might be a race condition when the Python object
>> wrapping the QWidget is being garbage collected and the QWidget itself
> is
>> still calling it's virtual methods.
>>>> This is supposed to be taken care of by the "if (sipSelf == NULL)" test
>> earlier in the function. This test is done without the GIL. The pointer
>> being tested is set in dealloc_QWidget() (with the GIL).
>>>> Therefore if the Python object is in the process of being garbage
>> collected but before dealloc_QWidget() gets a chance to reset the
> pointer,
>> and then QWidget::changeEvent() gets called then there might be a
> problem.
>>>> The fix would be to do the test with the GIL but that requires a change
> to
>> the signature of sip_api_is_py_method() to pass a pointer to the pointer
>> being tested rather than the pointer itself.
>>>> Watch this space...
>> I've implemented the change in tonight's SIP snapshot (and current Hg).
>> Let me know if it makes a difference.
>> Phil
>-------------- next part --------------
Program terminated with signal 11, Segmentation fault.
#0 0xb56623d6 in sip_api_is_py_method (gil=0xbfa65e08, pymc=0xc4ebde7 "", sipSelf=0x1057092c, cname=0x0, mname=0xb6c21297 "changeEvent") at siplib.c:7598
7598 assert(PyTuple_Check(mro));
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0xb56623d6 in sip_api_is_py_method (gil=0xbfa65e08, pymc=0xc4ebde7 "", sipSelf=0x1057092c, cname=0x0, mname=0xb6c21297 "changeEvent") at siplib.c:7598
#1 0xb6bf762c in sipQWidget::changeEvent (this=0xc4ebdb0, a0=0xc164920) at sipQtGuiQWidget.cpp:967
#2 0xb5b3a514 in QWidget::event (this=0xc4ebdb0, event=0xc164920) at kernel/qwidget.cpp:8529
#3 0xb6bf6425 in sipQWidget::event (this=0xc4ebdb0, a0=0xc164920) at sipQtGuiQWidget.cpp:473
#4 0xb5addb26 in QApplicationPrivate::notify_helper (this=0xa41a618, receiver=0xc4ebdb0, e=0xc164920) at kernel/qapplication.cpp:4462
#5 0xb5add865 in QApplication::notify (this=0xa260fd0, receiver=0xc4ebdb0, e=0xc164920) at kernel/qapplication.cpp:4427
#6 0xb6ba6af2 in sipQApplication::notify (this=0xa260fd0, a0=0xc4ebdb0, a1=0xc164920) at sipQtGuiQApplication.cpp:312
#7 0xb57eaf9e in QCoreApplication::notifyInternal (this=0xa260fd0, receiver=0xc4ebdb0, event=0xc164920) at kernel/qcoreapplication.cpp:731
#8 0xb5acfab5 in QCoreApplication::sendEvent (receiver=0xc4ebdb0, event=0xc164920) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#9 0xb57ebf92 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xa349770) at kernel/qcoreapplication.cpp:1372
#10 0xb57ebc89 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1265
#11 0xb5b93b7e in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#12 0xb5b9e90c in QEventDispatcherX11::processEvents (this=0xa34db70, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#13 0xb57eb397 in QCoreApplication::processEvents (flags=...) at kernel/qcoreapplication.cpp:923
#14 0xb519d577 in meth_QCoreApplication_processEvents (sipArgs=0xb748b02c, sipKwds=0x0) at sipQtCoreQCoreApplication.cpp:667
#15 0xb7700ed8 in PyCFunction_Call (func=0xeefb84c, arg=0xb748b02c, kw=0x0) at Objects/methodobject.c:85
-------------- next part --------------
Thread 1
--------
(gdb) bt
#0 0xb7722424 in __kernel_vsyscall ()
#1 0xb756c7d5 in sem_wait@@GLIBC_2.1 () from /lib/i386-linux-gnu/libpthread.so.0
#2 0xb76a0840 in PyThread_acquire_lock (lock=0x8cd1bd8, waitflag=1) at Python/thread_pthread.h:309
#3 0xb7665418 in PyEval_RestoreThread (tstate=0x87b3050) at Python/ceval.c:356
#4 0xb50b2582 in meth_QCoreApplication_processEvents (sipArgs=0xb738e02c, sipKwds=0x0) at sipQtCoreQCoreApplication.cpp:668
Thread 2
--------
#0 0xb7722424 in __kernel_vsyscall ()
#1 0xb756c7d5 in sem_wait@@GLIBC_2.1 () from /lib/i386-linux-gnu/libpthread.so.0
#2 0xb76a0840 in PyThread_acquire_lock (lock=0x8cd1bd8, waitflag=1) at Python/thread_pthread.h:309
#3 0xb7665418 in PyEval_RestoreThread (tstate=0x9b8a8e8) at Python/ceval.c:356
#4 0xb768c770 in PyGILState_Ensure () at Python/pystate.c:609
#5 0xb557730b in sip_api_is_py_method (gil=0xb47a1344, pymc=0x9889544 "", sipSelfp=0x9889540, cname=0x0, mname=0xb5130276 "run") at siplib.c:7562
#6 0xb4fe01b2 in sipQThread::run (this=0x9889538) at sipQtCoreQThread.cpp:148
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_qt_bindings.py
Type: text/x-python
Size: 10033 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110920/4662fa89/attachment-0001.py>
More information about the PyQt
mailing list
‘She has never mentioned her father to me. Was he—well, the sort of man whom the County Club would not have blackballed?’ "We walked by the side of our teams or behind the wagons, we slept on the ground at night, we did our own cooking, we washed our knives by sticking them into the ground rapidly a few times, and we washed our plates with sand and wisps of grass. When we stopped, we arranged our wagons in a circle, and thus formed a 'corral,' or yard, where we drove our oxen to yoke them up. And the corral was often very useful as a fort, or camp, for defending ourselves against the Indians. Do you see that little hollow down there?" he asked, pointing to a depression in the ground a short distance to the right of the train. "Well, in that hollow our wagon-train was kept three days and nights by the Indians. Three days and nights they stayed around, and made several attacks. Two of our men were killed and three were wounded by their arrows, and others had narrow escapes. One arrow hit me on the throat, but I was saved by the knot of my neckerchief, and the point only tore the skin a little. Since that time I have always had a fondness for large neckties. I don't know how many of the Indians we killed, as they carried off their dead and wounded, to save them from being scalped. Next to getting the scalps of their enemies, the most important thing with the Indians is to save their own. We had several fights during our journey, but that one was the worst. Once a little party of us were surrounded in a small 'wallow,' and had a tough time to defend ourselves successfully. Luckily for us, the Indians had no fire-arms then, and their bows and arrows were no match for our rifles. Nowadays they are well armed, but there are[Pg 41] not so many of them, and they are not inclined to trouble the railway trains. They used to do a great deal of mischief in the old times, and many a poor fellow has been killed by them." As dusk came on nearly the whole population of Maastricht, with all their temporary guests, formed an endless procession and went to invoke God's mercy by the Virgin Mary's intercession. They went to Our Lady's Church, in which stands the miraculous statue of Sancta Maria Stella Maris. The procession filled all the principal streets and squares of the town. I took my stand at the corner of the Vrijthof, where all marched past me, men, women, and children, all praying aloud, with loud voices beseeching: "Our Lady, Star of the Sea, pray for us ... pray for us ... pray for us ...!" It had not occurred to her for some hours after Mrs. Campbell had told her of Landor's death that she was free now to give herself to Cairness. She had gasped, indeed, when she did remember it, and had put the thought away, angrily and self-reproachfully. But it returned now, and she felt that she might cling to it. She had been grateful, and she had been faithful, too.[Pg 286] She remembered only that Landor had been kind to her, and forgot that for the last two years she had borne with much harsh coldness, and with a sort of contempt which she felt in her unanalyzing mind to have been entirely unmerited. Gradually she raised herself until she sat quite erect by the side of the mound, the old exultation of her half-wild girlhood shining in her face as she planned the future, which only a few minutes before had seemed so hopeless. After he had gloated over Sergeant Ramsey, Shorty got his men into the road ready to start. Si placed himself in front of the squad and deliberately loaded his musket in their sight. Shorty took his place in the rear, and gave out: The groups about each gun thinned out, as the shrieking fragments of shell mowed down man after man, but the rapidity of the fire did not slacken in the least. One of the Lieutenants turned and motioned with his saber to the riders seated on their horses in the line of limbers under the cover of the slope. One rider sprang from each team and ran up to take the place of men who had fallen. "As long as there's men and women in the world, the men 'ull be top and the women bottom." Then, in the house, the little girls were useful. Mrs. Backfield was not so energetic as she used to be. She had never been a robust woman, and though her husband's care had kept her well and strong, her frame was not equal to Reuben's demands; after fourteen years' hard labour, she suffered from rheumatism, which though seldom acute, was inclined to make her stiff and slow. It was here that Caro and Tilly came in, and Reuben began to appreciate his girls. After all, girls were needed in a house—and as for young men and marriage, their father could easily see that such follies did not spoil their usefulness or take them from him. Caro and Tilly helped their grandmother in all sorts of ways—they dusted, they watched pots, they shelled peas and peeled potatoes, they darned house-linen, they could even make a bed between them. HoME一级毛片视频免费公开
ENTER NUMBET 0018www.diarain.com.cn www.wxyfkj.com.cn hxrx.com.cn 40812.com.cn atqcyp.com.cn www.yanmeihui.com.cn www.yltit.com.cn www.gdio.org.cn www.daiy21.com.cn www.gszbj.com.cn