robocup-software: Segfault in PyQt

I get this seg fault randomly occasionally when running Basic122. It takes a while. Not really sure whats causing it.

* thread #11: tid = 0x3d139, 0x0000000101b39148 QtCore`QObject::objectName() const + 8, name = 'QThread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x0000000101b39148 QtCore`QObject::objectName() const + 8
QtCore`QObject::objectName:
->  0x101b39148 <+8>:  movq   0x30(%rax), %rax
    0x101b3914c <+12>: testq  %rax, %rax
    0x101b3914f <+15>: je     0x101b39166               ; <+38>
    0x101b39151 <+17>: movq   0x28(%rax), %rax
(lldb) bt
* thread #11: tid = 0x3d139, 0x0000000101b39148 QtCore`QObject::objectName() const + 8, name = 'QThread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x0000000101b39148 QtCore`QObject::objectName() const + 8
    frame #1: 0x0000000109f4ac71 QtCore.so`qtcore_do_find_child(QObject const*, _object*, QString const&, QFlags<Qt::FindChildOption>) + 161
    frame #2: 0x0000000109f4ad4c QtCore.so`qtcore_do_find_child(QObject const*, _object*, QString const&, QFlags<Qt::FindChildOption>) + 380
    frame #3: 0x0000000109f48967 QtCore.so`meth_QObject_findChild(_object*, _object*, _object*) + 343
    frame #4: 0x000000010269f900 Python`PyCFunction_Call + 60
    frame #5: 0x000000010270326b Python`PyEval_EvalFrameEx + 22399
    frame #6: 0x0000000102706faf Python`fast_function + 213
    frame #7: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #8: 0x0000000102706faf Python`fast_function + 213
    frame #9: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #10: 0x0000000102706faf Python`fast_function + 213
    frame #11: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #12: 0x00000001027066f0 Python`_PyEval_EvalCodeWithName + 1884
    frame #13: 0x000000010270702f Python`fast_function + 341
    frame #14: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #15: 0x0000000102706faf Python`fast_function + 213
    frame #16: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #17: 0x00000001027066f0 Python`_PyEval_EvalCodeWithName + 1884
    frame #18: 0x000000010270702f Python`fast_function + 341
    frame #19: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #20: 0x00000001027066f0 Python`_PyEval_EvalCodeWithName + 1884
    frame #21: 0x000000010270702f Python`fast_function + 341
    frame #22: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #23: 0x0000000102706faf Python`fast_function + 213
    frame #24: 0x0000000102703100 Python`PyEval_EvalFrameEx + 22036
    frame #25: 0x00000001027066f0 Python`_PyEval_EvalCodeWithName + 1884
    frame #26: 0x00000001026fda83 Python`PyEval_EvalCode + 81
    frame #27: 0x0000000102723461 Python`run_mod + 58
    frame #28: 0x0000000102723870 Python`PyRun_StringFlags + 131
    frame #29: 0x000000010003657f robocup.so`Gameplay::GameplayModule::run(this=0x0000000102ec2528) + 6111 at GameplayModule.cpp:396
    frame #30: 0x00000001001cf6b3 robocup.so`Processor::run(this=0x0000000102eb74b0) + 8579 at Processor.cpp:407
    frame #31: 0x000000010195457a QtCore`QThreadPrivate::start(void*) + 362
    frame #32: 0x00007fff8fe7899d libsystem_pthread.dylib`_pthread_body + 131
    frame #33: 0x00007fff8fe7891a libsystem_pthread.dylib`_pthread_start + 168
    frame #34: 0x00007fff8fe76351 libsystem_pthread.dylib`thread_start + 13

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (19 by maintainers)

Most upvoted comments

I’m going to close this issue in 2 months if no one replys back saying they are having any form of qt segfault issues. (we’ll probably know pretty quick as all the freshman will be running software soon).

I’ve been testing on master now for a couple hours and it seems that Albert’s fixes have patched up all the segfaults I was seeing.

I’m looking at that and it happens alot less often so its hard to debug, but I think its because we need to add a Mutex lock to Robot->_radioRx so its getting corrupted when we copy and read it from different threads.