discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] error using SetLabel


From: Johnathan Corgan
Subject: Re: [Discuss-gnuradio] error using SetLabel
Date: Sun, 14 Jan 2007 08:30:38 -0800

On Sun, 2007-01-14 at 08:50 +0100, Matteo Campanella wrote:

> Pango-ERROR **: file pango-layout.c: line 3230
> (pango_layout_check_lines): assertion failed: (!layout->log_attrs)
> aborting...

I have had a very similar problem in the past.

I'd give it a high probability you are running into a threading issue.
wxWidgets is *not* reentrant, and updating controls from a thread
different from the one that is running the wxWidgets event loop will
create all sorts of problems eventually.

The solution is to create a custom wxWidgets event, then use wxPostEvent
in your GR call back function.  You then use a normal wxWidgets callback
function to handle that event to update the control.

This link has some slightly outdated notes on doing this from C++;
you'll have to translate them mentally to the wxPython domain:

http://www.wxwidgets.org/wiki/index.php/Custom_Events

It's a major pain, especially if you have to do it for several different
event types.  But the key difference is that wxWidgets main thread is
the one that is running and calling your wxWidgets event handler, so
there are no reentrancy issues.

I beat my head against the wall for a couple days on this once :-(

-- 
Johnathan Corgan, AE6HO
Corgan Enterprises LLC
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]