[Eric] segfault using Plugin_Assistant_Eric-snapshot

Dan Bullok dan.eric at bullok.com
Fri Aug 1 07:26:07 BST 2008


Hi Detlev.

I recompiled Qt, sqlite, python, sip, and PyQt with debugging info, hoping to 
find the cause of the segfault I've been getting.  I've narrowed it down, but 
still haven't found the problem.  When I save a file, a warning dialog pops 
up and says:
    Warning!
    QFont: It is not safe to use text and fonts outside the GUI thread

This happens every time I save a file, and only happens when 
PluginAssistantEric is enabled.  My guess is that DbAPIsWorker in 
AssistantEric/APIsManager.py is somehow using a QFont outside the GUI thread.  
It doesn't look like it's doing this directly, so it's probably calling some 
other part of Eric that uses a QFont.  I'm not familiar enough with the code 
yet to make it obvious where to look.

Eric does not segfault every time this message pops up, but when it does 
segfault, it does so immediately after the dialog appears.

I have a backtrace that isn't very useful to me, but perhaps it will be useful 
to someone else:

#0  0x00002ab0dace7567 in QMutex::lock (this=0x1e7f788) at 
thread/qmutex.cpp:201
        self = 1098918224
        isLocked = false
#1  0x00002ab0dace819d in QMutexLocker::relock (this=0x41802060) at 
src/corelib/thread/qmutex.h:114
No locals.
#2  0x00002ab0dace81d8 in QMutexLocker (this=0x41802060, m=0x1e7f788) at 
src/corelib/thread/qmutex.h:97
No locals.
#3  0x00002ab0daced29f in QThreadPrivate::finish (arg=0x4622c60) at 
thread/qthread_unix.cpp:196
        thr = (class QThread *) 0x4622c60
        d = (class QThreadPrivate *) 0x1e7f720
        locker = {{mtx = 0x1e7f788, val = 31979400}}
        data = (void *) 0xdb08a1a0
#4  0x00002ab0daced76a in ~__pthread_cleanup_class (this=0x418020f0)
    at /usr/include/gentoo-multilib/amd64/pthread.h:530
No locals.
#5  0x00002ab0daced55f in QThreadPrivate::start (arg=0x4622c60) at 
thread/qthread_unix.cpp:188
        __clframe = {__cancel_routine = 0x2ab0daced26c 
<QThreadPrivate::finish(void*)>,
  __cancel_arg = 0x4622c60, __do_it = 1, __cancel_type = 0}
        thr = (class QThread *) 0x4622c60
        data = (QThreadData *) 0x2baa380
#6  0x00002ab0d980b047 in ?? () from /lib/libpthread.so.0
No symbol table info available.
#7  0x00002ab0da16925d in clone () from /lib/libc.so.6
No symbol table info available.
#8  0x0000000000000000 in ?? ()
No symbol table info available.


I had the above segfault several times when testing Eric.  Note that I didn't 
recompile glibc with debugging - It doesn't look like that's where the 
problem is, anyway.

I'm happy to continue to hunt this down, but I could use a little guidance on 
where to look.  

Thanks.
-Dan


On Monday 28 July 2008 12:56:22 Dan Bullok wrote:
> Hi Detlev,
>
> I'm using Python 2.5.2 (gentoo linux package dev-lang/python-2.5.2-r5).  I
> wasn't aware that sqlite was now built-in to python.  It looks like it's
> using the sqlite module included with Python, instead of pysqlite.  I'll
> remove pysqlite this evening, and check again, just to make sure.
>
> -Dan
>
> On Monday 28 July 2008 12:37:51 Detlev Offenbach wrote:
> > Hi,
> >
> > what Python version are you using? I tested the plugin with Python 2.5,
> > which has the sqlite module already included.
> >
> > Regards,
> > Detlev
> >
> > On Montag, 28. Juli 2008, Dan Bullok wrote:
> > > I keep getting segfaults using Plugin_Assistant_Eric-snapshot (both
> > > 20080712 20080726).  It has only happened when saving certain files.
> > > Some files don't segfault when saving, but others do.  Once it segfault
> > > while saving a certain file, it will continue to do so for that file.
> > >
> > > I'm attaching a patch that stops the segfault from occurring, but it
> > > has to disable the API autocompletion to do so.  Since I really like
> > > the way this plugin does in-document word completion, that's not a huge
> > > loss to me.  If the standard word completion worked the same way I'd
> > > use it instead.
> > >
> > > I'm suspecting one of the binary libraries, because I'd expect anything
> > > written in python to throw an exception that Eric would catch.  Here's
> > > what I'm using:
> > > 	sqlite-3.5.9
> > > 	pysqlite-2.3.5
> > > 	qscintilla-2.2
> > > 	PyQt4-4.3.3
> > > 	qt-4.3.4
> > >
> > > Hopefully this is a known error, but if not I can try to track it down
> > > by building debug versions of the above libs.  My prime suspects are
> > > sqlite and pysqlite, because the segfault is happening during the
> > > autocompletion db update, which looks like it's handled by sqlite.  If
> > > anyone has a better idea, please let me know.
> > >
> > > Thanks.
> > > -Dan
>
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric


More information about the Eric mailing list