[PyQt] QNetworkCacheMetaData.attributes() hangs forever

Ales Erjavec ales.erjavec324 at gmail.com
Wed Jul 3 12:52:25 BST 2019


Hi,

I have already reported this once
(https://riverbankcomputing.com/pipermail/pyqt/2017-April/039120.html)
but did not follow up

Accessing QNetworkCacheMetaData.attributes() hangs the process forever.

Test code:

###

from PyQt5.QtNetwork import QNetworkCacheMetaData, QNetworkRequest
md = QNetworkCacheMetaData()
md.setAttributes({QNetworkRequest.HttpStatusCodeAttribute: 200})
md.attributes()  # hangs forever (consuming 100% CPU)

###

The sampled stack trace from Activity Monitor looks like:

----
858 meth_QNetworkCacheMetaData_attributes(_object*, _object*)  (in
QtNetwork.so) + 116  [0x105ec17f4]
  858 sip_api_convert_from_new_type  (in sip.so) + 160  [0x106685eb8]
    582 convertFrom_QHash_0100QNetworkRequest_Attribute_0100QVariant(void*,
_object*)  (in QtNetwork.so) + 184  [0x105e7abf8]
    ! 519 sip_api_convert_from_new_type  (in sip.so) + 160  [0x106685eb8]
    ! : 179 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
80  [0x1067bb040]
    ! : | 173 sip_api_find_type  (in sip.so) + 67  [0x106686219]
    ! : | + 130 bsearch  (in libsystem_c.dylib) + 57  [0x7fff643065b2]
    ! : | + ! 130 compareTypeDef  (in sip.so) + 16,46,...
[0x10668b609,0x10668b627,...]
    ! : | + 43 bsearch  (in libsystem_c.dylib) + 75,68,...
[0x7fff643065c4,0x7fff643065bd,...]
    ! : | 6 sip_api_find_type  (in sip.so) + 72,1,...
[0x10668621e,0x1066861d7,...]
    ! : 97 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
143  [0x1067bb07f]
    ! : | 76 QByteArray::operator=(char const*)  (in QtCore) + 103
[0x1060c4a87]
    ! : | + 67 QByteArray::reallocData(unsigned int,
QFlags<QArrayData::AllocationOption>)  (in QtCore) + 85  [0x1060c4b75]
    ! : | + ! 61 QArrayData::allocate(unsigned long, unsigned long,
unsigned long, QFlags<QArrayData::AllocationOption>)  (in QtCore) +
112  [0x1060c24f0]
    ! : | + ! : 58 malloc  (in libsystem_malloc.dylib) + 24  [0x7fff6440ad79]
    ! : | + ! : | 55 malloc_zone_malloc  (in libsystem_malloc.dylib) +
103  [0x7fff6440adfd]
    ! : | + ! : | + 49 szone_malloc_should_clear  (in
libsystem_malloc.dylib) + 66  [0x7fff6440c30b]
    ! : | + ! : | + ! 30 tiny_malloc_should_clear  (in
libsystem_malloc.dylib) + 164,55,...
[0x7fff6440c4a1,0x7fff6440c434,...]
    ! : | + ! : | + ! 19 tiny_malloc_should_clear  (in
libsystem_malloc.dylib) + 314  [0x7fff6440c537]
    ! : | + ! : | + !   15 tiny_malloc_from_free_list  (in
libsystem_malloc.dylib) + 4,185,...
[0x7fff6440caf9,0x7fff6440cbae,...]
    ! : | + ! : | + !   3 tiny_malloc_from_free_list  (in
libsystem_malloc.dylib) + 450  [0x7fff6440ccb7]
    ! : | + ! : | + !   | 3 set_tiny_meta_header_in_use  (in
libsystem_malloc.dylib) + 17,214,...
[0x7fff6440d3a1,0x7fff6440d466,...]
    ! : | + ! : | + !   1 tiny_free_list_add_ptr  (in
libsystem_malloc.dylib) + 9  [0x7fff6440e94e]
    ! : | + ! : | + 3 default_zone_malloc  (in libsystem_malloc.dylib)
+ 0,4,...  [0x7fff6440ae51,0x7fff6440ae55,...]
    ! : | + ! : | + 3 szone_malloc_should_clear  (in
libsystem_malloc.dylib) + 48,253  [0x7fff6440c2f9,0x7fff6440c3c6]
    ! : | + ! : | 3 malloc_zone_malloc  (in libsystem_malloc.dylib) +
23  [0x7fff6440adad]
    ! : | + ! : 3 malloc  (in libsystem_malloc.dylib) + 0,5
[0x7fff6440ad61,0x7fff6440ad66]
    ! : | + ! 5 QArrayData::allocate(unsigned long, unsigned long,
unsigned long, QFlags<QArrayData::AllocationOption>)  (in QtCore) +
172,99,...  [0x1060c252c,0x1060c24e3,...]
    ! : | + ! 1 QArrayData::allocate(unsigned long, unsigned long,
unsigned long, QFlags<QArrayData::AllocationOption>)  (in QtCore) +
104  [0x1060c24e8]
    ! : | + !   1 qCalculateBlockSize(unsigned long, unsigned long,
unsigned long)  (in QtCore) + 14  [0x1060c3b3e]
    ! : | + 5 QByteArray::reallocData(unsigned int,
QFlags<QArrayData::AllocationOption>)  (in QtCore) + 0,10,...
[0x1060c4b20,0x1060c4b2a,...]
    ! : | + 3 QByteArray::reallocData(unsigned int,
QFlags<QArrayData::AllocationOption>)  (in QtCore) + 129
[0x1060c4ba1]
    ! : | + ! 3 _platform_memmove$VARIANT$Haswell  (in
libsystem_platform.dylib) + 0,185  [0x7fff64448ce0,0x7fff64448d99]
    ! : | + 1 DYLD-STUB$$memcpy  (in QtCore) + 0  [0x1063d8d8e]
    ! : | 13 QByteArray::operator=(char const*)  (in QtCore) +
175,163,...  [0x1060c4acf,0x1060c4ac3,...]
    ! : | 7 QByteArray::operator=(char const*)  (in QtCore) + 43  [0x1060c4a4b]
    ! : | + 7 _platform_strlen  (in libsystem_platform.dylib) +
14,0,...  [0x7fff6444870e,0x7fff64448700,...]
    ! : | 1 DYLD-STUB$$_platform_memmove  (in
libsystem_platform.dylib) + 0  [0x7fff6444e5d6]
    ! : 73 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
278  [0x1067bb106]
    ! : | 26 free_tiny  (in libsystem_malloc.dylib) + 480  [0x7fff6440de75]
    ! : | + 13 tiny_free_no_lock  (in libsystem_malloc.dylib) +
953,153,...  [0x7fff6440e32b,0x7fff6440e00b,...]
    ! : | + 11 tiny_free_no_lock  (in libsystem_malloc.dylib) + 934
[0x7fff6440e318]
    ! : | + ! 11 tiny_free_list_remove_ptr  (in
libsystem_malloc.dylib) + 6,10,...
[0x7fff6441072d,0x7fff64410731,...]
    ! : | + 2 tiny_free_list_add_ptr  (in libsystem_malloc.dylib) +
5,25  [0x7fff6440e94a,0x7fff6440e95e]
    ! : | 20 free_tiny  (in libsystem_malloc.dylib) + 500,151,...
[0x7fff6440de89,0x7fff6440dd2c,...]
    ! : | 13 free  (in libsystem_malloc.dylib) + 29,454,...
[0x7fff6440d952,0x7fff6440dafb,...]
    ! : | 11 free  (in libsystem_malloc.dylib) + 107  [0x7fff6440d9a0]
    ! : | + 10 szone_size  (in libsystem_malloc.dylib) + 45  [0x7fff6440d73a]
    ! : | + ! 10 tiny_size  (in libsystem_malloc.dylib) + 0,59,...
[0x7fff6440d79a,0x7fff6440d7d5,...]
    ! : | + 1 szone_size  (in libsystem_malloc.dylib) + 7  [0x7fff6440d714]
    ! : | 2 default_zone_free_definite_size  (in
libsystem_malloc.dylib) + 49,58  [0x7fff6440db38,0x7fff6440db41]
    ! : | 1 szone_free_definite_size  (in libsystem_malloc.dylib) +
116  [0x7fff6440dbd0]
    ! : 50 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
93  [0x1067bb04d]
    ! : | 47 operator new(unsigned long)  (in libc++abi.dylib) + 40
[0x7fff614df378]
    ! : | + 46 malloc  (in libsystem_malloc.dylib) + 24  [0x7fff6440ad79]
    ! : | + ! 37 malloc_zone_malloc  (in libsystem_malloc.dylib) + 103
 [0x7fff6440adfd]
    ! : | + ! : 34 szone_malloc_should_clear  (in
libsystem_malloc.dylib) + 66  [0x7fff6440c30b]
    ! : | + ! : | 23 tiny_malloc_should_clear  (in
libsystem_malloc.dylib) + 55,1176,...
[0x7fff6440c434,0x7fff6440c895,...]
    ! : | + ! : | 11 tiny_malloc_should_clear  (in
libsystem_malloc.dylib) + 314  [0x7fff6440c537]
    ! : | + ! : |   6 tiny_malloc_from_free_list  (in
libsystem_malloc.dylib) + 17,32,...
[0x7fff6440cb06,0x7fff6440cb15,...]
    ! : | + ! : |   4 tiny_malloc_from_free_list  (in
libsystem_malloc.dylib) + 450  [0x7fff6440ccb7]
    ! : | + ! : |   ! 4 set_tiny_meta_header_in_use  (in
libsystem_malloc.dylib) + 76,81,...
[0x7fff6440d3dc,0x7fff6440d3e1,...]
    ! : | + ! : |   1 tiny_free_list_add_ptr  (in
libsystem_malloc.dylib) + 9  [0x7fff6440e94e]
    ! : | + ! : 2 szone_malloc_should_clear  (in
libsystem_malloc.dylib) + 303  [0x7fff6440c3f8]
    ! : | + ! : 1 default_zone_malloc  (in libsystem_malloc.dylib) +
31  [0x7fff6440ae70]
    ! : | + ! 7 malloc_zone_malloc  (in libsystem_malloc.dylib) +
93,23,...  [0x7fff6440adf3,0x7fff6440adad,...]
    ! : | + ! 2 default_zone_malloc  (in libsystem_malloc.dylib) + 54
[0x7fff6440ae87]
    ! : | + 1 malloc  (in libsystem_malloc.dylib) + 0  [0x7fff6440ad61]
    ! : | 2 operator new(unsigned long)  (in libc++abi.dylib) + 5,18
[0x7fff614df355,0x7fff614df362]
    ! : | 1 DYLD-STUB$$malloc  (in libc++abi.dylib) + 0  [0x7fff614ee328]
    ! : 43 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
210  [0x1067bb0c2]
    ! : | 28 Chimera::toPyObject(QVariant const&) const  (in
QtCore.so) + 226  [0x1067baab2]
    ! : | + 21 QtPrivate::QVariantValueHelper<PyQt_PyObject>::metaType(QVariant
const&)  (in QtCore.so) + 151  [0x1067bb7d7]
    ! : | + ! 18 PyQt_PyObject::PyQt_PyObject(PyQt_PyObject const&)
(in QtCore.so) + 20  [0x1067c2774]
    ! : | + ! : 13 PyGILState_Ensure  (in Python) + 24  [0x1058f28f8]
    ! : | + ! : | 13 pthread_getspecific  (in libsystem_pthread.dylib)
+ 9  [0x7fff644527c9]
    ! : | + ! : 5 PyGILState_Ensure  (in Python) + 141,0
[0x1058f296d,0x1058f28e0]
    ! : | + ! 2 PyGILState_Release  (in Python) + 6,66
[0x1058f2996,0x1058f29d2]
    ! : | + ! 1 PyQt_PyObject::PyQt_PyObject(PyQt_PyObject const&)
(in QtCore.so) + 6  [0x1067c2766]
    ! : | + 4 QtPrivate::QVariantValueHelper<PyQt_PyObject>::metaType(QVariant
const&)  (in QtCore.so) + 120,4,...  [0x1067bb7b8,0x1067bb744,...]
    ! : | + 2 QtPrivate::QVariantValueHelper<PyQt_PyObject>::metaType(QVariant
const&)  (in QtCore.so) + 140  [0x1067bb7cc]
    ! : | + ! 2 QVariant::constData() const  (in QtCore) + 4,16
[0x1062b8d24,0x1062b8d30]
    ! : | + 1 DYLD-STUB$$QVariant::userType() const  (in QtCore.so) +
0  [0x1067cd032]
    ! : | 10 Chimera::toPyObject(QVariant const&) const  (in
QtCore.so) + 425  [0x1067bab79]
    ! : | + 6 PyQt_PyObject::~PyQt_PyObject()  (in QtCore.so) + 53
[0x1067c2815]
    ! : | + ! 4 PyGILState_Release  (in Python) + 64,180
[0x1058f29d0,0x1058f2a44]
    ! : | + ! 1 DYLD-STUB$$pthread_getspecific  (in Python) + 0  [0x105965c44]
    ! : | + ! 1 PyGILState_Release  (in Python) + 26  [0x1058f29aa]
    ! : | + !   1 pthread_getspecific  (in libsystem_pthread.dylib) +
9  [0x7fff644527c9]
    ! : | + 2 PyQt_PyObject::~PyQt_PyObject()  (in QtCore.so) + 24
[0x1067c27f8]
    ! : | + ! 1 PyGILState_Ensure  (in Python) + 24  [0x1058f28f8]
    ! : | + ! : 1 pthread_getspecific  (in libsystem_pthread.dylib) +
9  [0x7fff644527c9]
    ! : | + ! 1 PyGILState_Ensure  (in Python) + 150  [0x1058f2976]
    ! : | + 1 DYLD-STUB$$Py_IsInitialized  (in QtCore.so) + 0  [0x1067c9570]
    ! : | + 1 PyQt_PyObject::~PyQt_PyObject()  (in QtCore.so) + 6  [0x1067c27e6]
    ! : | 5 Chimera::toPyObject(QVariant const&) const  (in QtCore.so)
+ 242,4,...  [0x1067baac2,0x1067ba9d4,...]
    ! : 31 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
270  [0x1067bb0fe]
    ! : | 15 free_tiny  (in libsystem_malloc.dylib) + 500,151,...
[0x7fff6440de89,0x7fff6440dd2c,...]
    ! : | 7 free  (in libsystem_malloc.dylib) + 107  [0x7fff6440d9a0]
    ! : | + 5 szone_size  (in libsystem_malloc.dylib) + 45  [0x7fff6440d73a]
    ! : | + ! 5 tiny_size  (in libsystem_malloc.dylib) + 150,176,...
[0x7fff6440d830,0x7fff6440d84a,...]
    ! : | + 2 szone_size  (in libsystem_malloc.dylib) + 22,30
[0x7fff6440d723,0x7fff6440d72b]
    ! : | 6 free  (in libsystem_malloc.dylib) + 6,29,...
[0x7fff6440d93b,0x7fff6440d952,...]
    ! : | 2 default_zone_free_definite_size  (in
libsystem_malloc.dylib) + 33,49  [0x7fff6440db28,0x7fff6440db38]
    ! : | 1 szone_free_definite_size  (in libsystem_malloc.dylib) + 8
[0x7fff6440db64]
    ! : 30 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
35  [0x1067bb013]
    ! : | 11 QMetaType::typeName(int)  (in QtCore) + 210  [0x10628b662]
    ! : | + 11 QReadWriteLock::unlock()  (in QtCore) + 46,16,...
[0x1060b840e,0x1060b83f0,...]
    ! : | 8 QMetaType::typeName(int)  (in QtCore) + 121  [0x10628b609]
    ! : | + 8 QReadWriteLock::lockForRead()  (in QtCore) + 12,7
[0x1060b72dc,0x1060b72d7]
    ! : | 4 QMetaType::typeName(int)  (in QtCore) + 202,139,...
[0x10628b65a,0x10628b61b,...]
    ! : | 3 QMetaType::typeName(int)  (in QtCore) + 82  [0x10628b5e2]
    ! : | + 1 ???  (in QtCore)  load address 0x106092000 + 0x1fa3e0
[0x10628c3e0]
    ! : | + 1 ???  (in QtCore)  load address 0x106092000 + 0x1fa3f9
[0x10628c3f9]
    ! : | + 1 ???  (in QtCore)  load address 0x106092000 + 0x1fa3ff
[0x10628c3ff]
    ! : | 3 QMetaType::typeName(int)  (in QtCore) + 90  [0x10628b5ea]
    ! : | + 1 ???  (in QtCore)  load address 0x106092000 + 0x1fa4c4
[0x10628c4c4]
    ! : | + 1 ???  (in QtCore)  load address 0x106092000 + 0x1fa4c9
[0x10628c4c9]
    ! : | + 1 ???  (in QtCore)  load address 0x106092000 + 0x1fa4ee
[0x10628c4ee]
    ! : | 1 QVariant::typeName() const  (in QtCore) + 4  [0x1062ba8e4]
    ! : 14 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
250,74,...  [0x1067bb0ea,0x1067bb03a,...]
    ! : 1 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) + 53
 [0x1067bb025]
    ! : | 1 _platform_strcmp  (in libsystem_platform.dylib) + 23
[0x7fff64449397]
    ! : 1 Chimera::toAnyPyObject(QVariant const&)  (in QtCore.so) +
151  [0x1067bb087]
    ! :   1 QVariant::userType() const  (in QtCore) + 0  [0x1062ba610]
    ! 62 sip_api_convert_from_new_type  (in sip.so) + 195  [0x106685edb]
    ! : 22 free_tiny  (in libsystem_malloc.dylib) + 480  [0x7fff6440de75]
    ! : | 12 tiny_free_no_lock  (in libsystem_malloc.dylib) +
33,1073,...  [0x7fff6440df93,0x7fff6440e3a3,...]
    ! : | 6 tiny_free_list_add_ptr  (in libsystem_malloc.dylib) +
15,30,...  [0x7fff6440e954,0x7fff6440e963,...]
    ! : | 4 tiny_free_no_lock  (in libsystem_malloc.dylib) + 934
[0x7fff6440e318]
    ! : |   4 tiny_free_list_remove_ptr  (in libsystem_malloc.dylib) +
0,35,...  [0x7fff64410727,0x7fff6441074a,...]
    ! : 12 free_tiny  (in libsystem_malloc.dylib) + 500,151,...
[0x7fff6440de89,0x7fff6440dd2c,...]
    ! : 10 free  (in libsystem_malloc.dylib) + 107  [0x7fff6440d9a0]
    ! : | 9 szone_size  (in libsystem_malloc.dylib) + 45  [0x7fff6440d73a]
    ! : | + 9 tiny_size  (in libsystem_malloc.dylib) + 105,20,...
[0x7fff6440d803,0x7fff6440d7ae,...]
    ! : | 1 szone_size  (in libsystem_malloc.dylib) + 1  [0x7fff6440d70e]
    ! : 9 release_QVariant(void*, int)  (in QtCore.so) + 19  [0x1066b7523]
    ! : | 9 QVariant::~QVariant()  (in QtCore) + 39  [0x1062b8bf7]
    ! : 6 free  (in libsystem_malloc.dylib) + 0,13,...
[0x7fff6440d935,0x7fff6440d942,...]
    ! : 1 default_zone_free_definite_size  (in libsystem_malloc.dylib)
+ 49  [0x7fff6440db38]
    ! : 1 release  (in sip.so) + 49  [0x106689e8d]
    ! : 1 release_QVariant(void*, int)  (in QtCore.so) + 6  [0x1066b7516]
    ! 1 sip_api_convert_from_new_type  (in sip.so) + 0  [0x106685e18]
    157 convertFrom_QHash_0100QNetworkRequest_Attribute_0100QVariant(void*,
_object*)  (in QtNetwork.so) + 120  [0x105e7abb8]
    ! 155 PyObject_CallFunction  (in Python) + 143  [0x1058068af]
    ! : 102 _PyObject_CallFunctionVa  (in Python) + 230  [0x1058069b6]
    ! : | 83 _PyObject_FastCallDict  (in Python) + 297  [0x105805289]
    ! : | + 70 type_call  (in Python) + 50  [0x105850492]
    ! : | + ! 43 long_new  (in Python) + 83  [0x1058283a3]
    ! : | + ! : 36 long_new_impl  (in Python) + 91  [0x1058285cb]
    ! : | + ! : | 23 PyType_GenericAlloc  (in Python) + 60  [0x10584d6bc]
    ! : | + ! : | + 14 _PyObject_GC_Alloc  (in Python) + 60  [0x10591870c]
    ! : | + ! : | + ! 10 _PyObject_Malloc  (in Python) + 18  [0x105840f32]
    ! : | + ! : | + ! : 10 pymalloc_alloc  (in Python) + 63,13,...
[0x1058430bf,0x10584308d,...]
    ! : | + ! : | + ! 3 PyObject_Malloc  (in Python) + 0,29
[0x1058421c0,0x1058421dd]
    ! : | + ! : | + ! 1 _PyObject_Malloc  (in Python) + 1  [0x105840f21]
    ! : | + ! : | + 7 _PyObject_GC_Alloc  (in Python) + 4,1,...
[0x1059186d4,0x1059186d1,...]
    ! : | + ! : | + 2 _PyObject_GC_Malloc  (in Python) + 4  [0x1059186b4]
    ! : | + ! : | 9 PyType_GenericAlloc  (in Python) + 110,8,...
[0x10584d6ee,0x10584d688,...]
    ! : | + ! : | 4 PyType_GenericAlloc  (in Python) + 93  [0x10584d6dd]
    ! : | + ! : |   4 _platform_bzero$VARIANT$Haswell  (in
libsystem_platform.dylib) + 0,10,...
[0x7fff64448940,0x7fff6444894a,...]
    ! : | + ! : 4 long_new_impl  (in Python) + 48  [0x1058285a0]
    ! : | + ! : | 3 long_new_impl  (in Python) + 6,10  [0x105828576,0x10582857a]
    ! : | + ! : | 1 PyNumber_Long  (in Python) + 8  [0x1057f0278]
    ! : | + ! : 3 long_new_impl  (in Python) + 4,11,...
[0x105828574,0x10582857b,...]
    ! : | + ! 24 long_new  (in Python) + 63  [0x10582838f]
    ! : | + ! : 21 _PyArg_ParseTupleAndKeywordsFast  (in Python) + 196
 [0x1058ddbc4]
    ! : | + ! : | 13 vgetargskeywordsfast_impl  (in Python) +
115,129,...  [0x1058dde23,0x1058dde31,...]
    ! : | + ! : | 8 vgetargskeywordsfast_impl  (in Python) + 1730  [0x1058de472]
    ! : | + ! : |   8 convertitem  (in Python) + 841,96,...
[0x1058df499,0x1058df1b0,...]
    ! : | + ! : 3 _PyArg_ParseTupleAndKeywordsFast  (in Python) +
124,131,...  [0x1058ddb7c,0x1058ddb83,...]
    ! : | + ! 3 long_new  (in Python) + 14,52,...  [0x10582835e,0x105828384,...]
    ! : | + 9 type_call  (in Python) + 297  [0x105850589]
    ! : | + ! 9 object_init  (in Python) + 1,133  [0x105852241,0x1058522c5]
    ! : | + 4 type_call  (in Python) + 0,173,...  [0x105850460,0x10585050d,...]
    ! : | 8 _PyObject_FastCallDict  (in Python) + 13,23,...
[0x10580516d,0x105805177,...]
    ! : | 5 _PyObject_FastCallDict  (in Python) + 375  [0x1058052d7]
    ! : | + 5 tupledealloc  (in Python) + 114,234,...
[0x10584bee2,0x10584bf5a,...]
    ! : | 4 _PyObject_FastCallDict  (in Python) + 79  [0x1058051af]
    ! : | + 4 _PyStack_AsTuple  (in Python) + 21  [0x105805595]
    ! : | +   4 PyTuple_New  (in Python) + 10,87,...
[0x10584b93a,0x10584b987,...]
    ! : | 2 _Py_CheckFunctionResult  (in Python) + 142  [0x10580512e]
    ! : 35 _PyObject_CallFunctionVa  (in Python) + 160  [0x105806970]
    ! : | 30 va_build_stack  (in Python) + 355  [0x1058ea313]
    ! : | + 25 do_mkvalue  (in Python) + 430  [0x1058ea77e]
    ! : | + ! 10 do_mktuple  (in Python) + 49  [0x1058eb411]
    ! : | + ! : 7 PyTuple_New  (in Python) + 87,234,...
[0x10584b987,0x10584ba1a,...]
    ! : | + ! : 2 PyTuple_New  (in Python) + 181  [0x10584b9e5]
    ! : | + ! : | 2 _platform_bzero$VARIANT$Haswell  (in
libsystem_platform.dylib) + 0,10  [0x7fff64448940,0x7fff6444894a]
    ! : | + ! : 1 DYLD-STUB$$__bzero  (in Python) + 0  [0x105965866]
    ! : | + ! 9 do_mktuple  (in Python) + 97  [0x1058eb441]
    ! : | + ! : 5 do_mkvalue  (in Python) + 605  [0x1058ea82d]
    ! : | + ! : | 5 PyLong_FromLong  (in Python) + 62,1
[0x105822ece,0x105822e91]
    ! : | + ! : 4 do_mkvalue  (in Python) + 17,30,...
[0x1058ea5e1,0x1058ea5ee,...]
    ! : | + ! 6 do_mktuple  (in Python) + 13,30,...
[0x1058eb3ed,0x1058eb3fe,...]
    ! : | + 5 do_mkvalue  (in Python) + 352,1,...  [0x1058ea730,0x1058ea5d1,...]
    ! : | 5 va_build_stack  (in Python) + 13,333,...
[0x1058ea1bd,0x1058ea2fd,...]
    ! : 9 _PyObject_CallFunctionVa  (in Python) + 279  [0x1058069e7]
    ! : | 8 tupledealloc  (in Python) + 24  [0x10584be88]
    ! : | + 8 PyObject_GC_UnTrack  (in Python) + 43,0,...
[0x10591869b,0x105918670,...]
    ! : | 1 tupledealloc  (in Python) + 45  [0x10584be9d]
    ! : 9 _PyObject_CallFunctionVa  (in Python) + 56,202,...
[0x105806908,0x10580699a,...]
    ! 2 sip_api_convert_from_enum  (in sip.so) + 4,10  [0x10668469f,0x1066846a5]
    43 convertFrom_QHash_0100QNetworkRequest_Attribute_0100QVariant(void*,
_object*)  (in QtNetwork.so) + 142  [0x105e7abce]
    ! 41 operator new(unsigned long)  (in libc++abi.dylib) + 40
[0x7fff614df378]
    ! : 36 malloc  (in libsystem_malloc.dylib) + 24  [0x7fff6440ad79]
    ! : | 35 malloc_zone_malloc  (in libsystem_malloc.dylib) + 103
[0x7fff6440adfd]
    ! : | + 28 szone_malloc_should_clear  (in libsystem_malloc.dylib)
+ 66  [0x7fff6440c30b]
    ! : | + ! 28 tiny_malloc_should_clear  (in libsystem_malloc.dylib)
+ 252,55,...  [0x7fff6440c4f9,0x7fff6440c434,...]
    ! : | + 4 szone_malloc_should_clear  (in libsystem_malloc.dylib) +
6,48,...  [0x7fff6440c2cf,0x7fff6440c2f9,...]
    ! : | + 3 default_zone_malloc  (in libsystem_malloc.dylib) + 45
[0x7fff6440ae7e]
    ! : | 1 malloc_zone_malloc  (in libsystem_malloc.dylib) + 170
[0x7fff6440ae40]
    ! : 5 malloc  (in libsystem_malloc.dylib) + 19,0,...
[0x7fff6440ad74,0x7fff6440ad61,...]
    ! 2 operator new(unsigned long)  (in libc++abi.dylib) + 5,49
[0x7fff614df355,0x7fff614df381]
    43 convertFrom_QHash_0100QNetworkRequest_Attribute_0100QVariant(void*,
_object*)  (in QtNetwork.so) + 206  [0x105e7ac0e]
    ! 23 insertdict  (in Python) + 111  [0x10582d8ef]
    ! : 12 lookdict  (in Python) + 295  [0x10582d037]
    ! : | 10 PyObject_RichCompareBool  (in Python) + 43  [0x10583e47b]
    ! : | + 5 PyObject_RichCompare  (in Python) + 238  [0x10583e2de]
    ! : | + ! 5 long_richcompare  (in Python) + 124,45,...
[0x1058282cc,0x10582827d,...]
    ! : | + 5 PyObject_RichCompare  (in Python) + 55,96,...
[0x10583e227,0x10583e250,...]
    ! : | 2 PyObject_RichCompareBool  (in Python) + 145,236
[0x10583e4e1,0x10583e53c]
    ! : 11 lookdict  (in Python) + 424,8,...  [0x10582d0b8,0x10582cf18,...]
    ! 10 insertdict  (in Python) + 509,1,...  [0x10582da7d,0x10582d881,...]
    ! 8 PyDict_SetItem  (in Python) + 0,6,...  [0x10582d7f0,0x10582d7f6,...]
    ! 2 PyDict_SetItem  (in Python) + 63  [0x10582d82f]
    !   1 PyObject_Hash  (in Python) + 10  [0x10583e61a]
    !   1 long_hash  (in Python) + 8  [0x105828198]
    21 convertFrom_QHash_0100QNetworkRequest_Attribute_0100QVariant(void*,
_object*)  (in QtNetwork.so) + 262  [0x105e7ac46]
    ! 12 subtype_dealloc  (in Python) + 4,39,...  [0x10584df94,0x10584dfb7,...]
    ! 5 subtype_dealloc  (in Python) + 1031  [0x10584e397]
    ! : 3 _PyObject_Free  (in Python) + 22,65,...  [0x1058411f6,0x105841221,...]
    ! : 1 PyObject_Free  (in Python) + 21  [0x105842275]
    ! : 1 PyObject_GC_Del  (in Python) + 66  [0x1059189a2]
    ! 2 subtype_dealloc  (in Python) + 60  [0x10584dfcc]
    ! : 2 PyObject_GC_UnTrack  (in Python) + 4,51  [0x105918674,0x1059186a3]
    ! 2 subtype_dealloc  (in Python) + 905  [0x10584e319]
    !   2 _PyObject_GetDictPtr  (in Python) + 0,4  [0x10583f060,0x10583f064]
    9 convertFrom_QHash_0100QNetworkRequest_Attribute_0100QVariant(void*,
_object*)  (in QtNetwork.so) + 157  [0x105e7abdd]
    ! 9 QVariant::QVariant(QVariant const&)  (in QtCore) + 107,0,...
[0x1062b8dab,0x1062b8d40,...]
    2 convertFrom_QHash_0100QNetworkRequest_Attribute_0100QVariant(void*,
_object*)  (in QtNetwork.so) + 137,142  [0x105e7abc9,0x105e7abce]
    1 DYLD-STUB$$operator new(unsigned long)  (in QtNetwork.so) + 0
[0x105ec3ad4]
----

It looks loke an endless loop in conversion to a python type.


Tested on:
PyQt5: 5.8.2, 5.9.2, 5.12.3
Python: 3.6, 3.7
OSX: 10.11.6, 10.14.5

Best wishes
   Aleš Erjavec


More information about the PyQt mailing list