Re: Help with a multi-threaded application. Spot a crash.



Hello,
Thank you very much.
I actually commented out pretty much everything but the G_IS_OBJECT().
I took it granted that GRegex was a gobject.
Now learned that it's a POD, Perl Object.

The actual code has also a LockedCounter (mutex controlled) object
that feeds each thread with a unique sequence number. Only the thread
with highest sequence number can tick and change the GUI, others will
simply die away.

Now the project can progress.

Obrigado
 Osmo Antero

On Wed, May 30, 2012 at 9:02 PM, David NeÄas <yeti physics muni cz> wrote:
On Wed, May 30, 2012 at 08:30:40PM +0100, Osmo Antero wrote:
I have a multi-threaded application that filters data practically
while user types text in an entry-field. But this applications
regularly crashes.

GRegex is not a GObject, it's just POD. ÂSo

 Âif (G_IS_OBJECT(search->regex))

will surely attempt to read some bogus memory location and crash.
I cannot see why such code is there at all but anyway set search->regex
to NULL if it does not exist and then just use

 Âif (search->regex)

if necessary.

Yeti




-- 
// moma
ÂÂ http://www.futuredesktop.org



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