PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 365 - Generatorrunner segfaults in AbstractMetaType::minimalSignature()
: Generatorrunner segfaults in AbstractMetaType::minimalSignature()
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: Shiboken
: 0.6.1
: PC Linux
: P3 normal
Assigned To: Marcelo Lira
:
:
:
  Show dependency treegraph
 
Reported: 2010-09-17 19:24 EEST by msonnemann
Modified: 2010-10-13 13:48 EEST (History)
8 users (show)

See Also:


Attachments
Qwt binding (20.00 KB, application/octet-stream)
2010-09-17 19:24 EEST, msonnemann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description msonnemann 2010-09-17 19:24:39 EEST
Created attachment 87 [details]
Qwt binding

Trying to bind Qwt with generatorrunner fails with a segmentation fault.

Expected behavior:
    generatorrunner builds a binding library that is callable from within
Python
    and which exposes an interface to the components of the Qwt library (
    http://qwt.sourceforge.net/).

Observed behavior:
    generatorrunner fails with the following messages (run from gdb):

    Generating class model...                    [WARNING]
    Unable to decide type of property: 'QBrush' in class 'QwtThermo'
    Unable to decide type of property: 'QColor' in class 'QwtThermo'
    Unable to decide type of property: 'QPen' in class 'QwtPicker'
    Unable to decide type of property: 'QFont' in class 'QwtPicker'


    Generating enum model...                     [OK]
    Generating namespace model...                [OK]
    Resolving typedefs...                        [OK]

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff791628b in AbstractMetaType::minimalSignature() const ()
       from /usr/local/lib/libapiextractor.so.0.8

Program versions:
    generatorrunner: 0.6.1
    shiboken       : 0.6.1
    apiextractor   : 0.8.1
    Qt             : 4.4.7
    Qwt            : 5.2.0

Attached is the Qwt binding project. Run qwtbinding/data/make.sh.
Comment 1 msonnemann 2010-09-19 12:58:31 EEST
It seems that AbstractMetaFunction::minimalSignature() tries to dereference a
null pointer in the loop over the argument list:

minimalSignature += t->minimalSignature(); // <-- t == 0

But I have no idea where that pointer is added to m_arguments.
Comment 2 Marcelo Lira 2010-09-23 14:02:08 EEST
The bug is triggered when a function argument is an array of a size defined by
something other than a literal number.

In other words, this breaks ApiExtractor:

enum SomeEnum { Value0, Value1, NValues };
struct A {
    void method(int[NValues]);
};

And this works fine:

struct A {
    void method(int[3]);
};

I'm producing a proper test and also working on the fix.
Comment 3 Marcelo Lira 2010-09-24 10:44:20 EEST
Fixed in commit ApiExtractor/c5f6e116.
Comment 4 Marcelo Lira 2010-09-24 10:48:54 EEST
msonnemann@online.de
I'd suggest you update your type system file to use nested tags for your enums.
Check bug #370 for more details:
http://bugs.openbossa.org/show_bug.cgi?id=370
Comment 5 renato filho 2010-10-13 13:48:46 EEST
released on PySide 0.4.2