[PyKDE] Debugging a segfault in Linux

Mike Tammerman mtammerman at gmail.com
Fri Mar 17 16:03:25 GMT 2006


Now, I recompiled python2.4-qt3 with -g parameters and discarded the
-OO and -O2 parameters. After I had run my program in gdb, I got the
following error

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209734944 (LWP 16726)]
0xb7682318 in QObject::parent (this=0xffffffff) at qobject.h:154
154     qobject.h: No such file or directory.
        in qobject.h

I downloaded the source of libqt3-mt package and checked the line at
qobject.h:154, it is

public:
    QObject     *parent() const { return parentObj; }

But, I still didn't understand why my app crashes. I tried to make a
small demo of the problem, it doesn't crash when I make it smaller.

Mike

On 3/17/06, Diez B. Roggisch <deets at web.de> wrote:
> On Friday 17 March 2006 15:27, Mike Tammerman wrote:
> > Hi,
> >
> > I'm trying to implement a distributed media player using twisted and
> > pyqt. Sometimes, I am getting segfaults for the gui part. I am using
> > custom widgets and I don't know if the reason of the problem is myself
> > or pyqt or something else.
> >
> > I want to learn how to debug pyqt apps. Is there a practical way
> > you're using? I am using ubuntu(breezy) and its pre-compiled packages.
>
> You'll need debug-builds of whatever you can get one for - so most probably
> you should build every piece of the toolchain with debug information enabled.
>
> Luckily you're on a debian-based system. That means that you can get the
> source-packages easily (apt-source or apt-get source). Fetch them with all
> dependencies. Then you can build the packages yourself - check out the
> <package>/debian/rules, ususally there are the configure-statements. Build
> with e.g.
>
> fakeroot debian/rules binary
>
> Then install the packages.
> When everything is set up, you can debug things using the gdb - just pass e.g.
> python as execuatbe like this
>
> gdb python
>
> gdb> set args <yourscript
> gdb> run
>
>
> That all ist just a rough sketch, atop of my head. But it should give you some
> pointesr I hope.
>
> Diez
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>




More information about the PyQt mailing list