# Bug: gr-qtgui: wrong design of variable-type blocks for GRC (category /GUI Widgets/QT)

**URL:** <https://www.ruby-forum.com/t/bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-grc-category-gui-widgets-qt/238210>\
**Category:** GNU Radio\
**Created:** [December 24, 2013, 9:40am UTC](https://www.ruby-forum.com/t/bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-grc-category-gui-widgets-qt/238210 "2013-12-24T09:40:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [December 24, 2013, 9:40am UTC](https://www.ruby-forum.com/t/bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-grc-category-gui-widgets-qt/238210/1 "2013-12-24T09:40:56Z")

</div>

I faced with buggy behavior of ‘QT GUI Label’ in my GRC graph and  
surprisingly found that GRC generates code making prohibited accesses to  
qt  
gui objects from non-gui thread context. I’m not python guru, but I  
doubt  
that python is smart enough to detect access to qt objects from  
different  
threads and invoke them properly via qt-specific mechanisms. Similar  
problem  
observed when widgets slots (executing in main thread context) call  
variable-changer functions which in turn invoking callbacks of blocks\*.

I suppose all blocks in /GUI Widgets/QT category aren’t thread-safe and  
shouldn’t be used until this issue has been fixed.

- Block’s external interfaces(callbacks) are expected to be guarded  
internally, but I still didn’t found no block in gr packages, I working  
with, which follow this rule. Maybe swig-generated python interface  
guards  
all accesses already? If not, GRC user should be so much careful, that  
one  
have to check generated code. IMHO, it reduces GRC usefullness  
greatly…

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-GRC-category-GUI-Widgets-QT-tp45538.html](http://gnuradio.4.n7.nabble.com/Bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-GRC-category-GUI-Widgets-QT-tp45538.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![arkronus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c37758/32.png) [@arkronus](https://www.ruby-forum.com/u/arkronus)\
**Post date:** [December 26, 2013, 12:21pm UTC](https://www.ruby-forum.com/t/bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-grc-category-gui-widgets-qt/238210/2 "2013-12-26T12:21:11Z")

</div>

posted partial bugfix to github (pull request #122)

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-GRC-category-GUI-Widgets-QT-tp45538p45543.html](http://gnuradio.4.n7.nabble.com/Bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-GRC-category-GUI-Widgets-QT-tp45538p45543.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![arkronus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c37758/32.png) [@arkronus](https://www.ruby-forum.com/u/arkronus)\
**Post date:** [December 30, 2013, 5:28pm UTC](https://www.ruby-forum.com/t/bug-gr-qtgui-wrong-design-of-variable-type-blocks-for-grc-category-gui-widgets-qt/238210/3 "2013-12-30T17:28:47Z")

</div>

On Thu, Dec 26, 2013 at 6:19 AM, Artem P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> posted partial bugfix to github (pull request #122)

Artem,

Thanks. I’ve got this queued up with a few other patches and am just  
waiting on confirmation on one more thing (holiday delays) before it  
gets pushed.

Tom
