[odb-users] ODB segfaults in Qt profile

Scott Deerwester scott.deerwester at gmail.com
Fri Dec 6 10:37:22 EST 2013


I am receiving the following error:

odb --database mysql --profile qt --generate-schema --generate-query
--generate-session -I/opt/Qt/5.1.1/gcc_64/include
-I/opt/Qt/5.1.1/gcc_64/include/QtCore ../ODBExample/ChildClass.h
*** WARNING *** there are active plugins, do not report this as a bug
unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_START_UNIT                | odb
PLUGIN_PRAGMAS                   | odb
PLUGIN_OVERRIDE_GATE             | odb
In file included from <standard-odb-epilogue>:8:0:
/usr/local/include/odb/tr1/pointer-traits.hxx: In member function ‘virtual
const char* __gnu_cxx::__concurrence_lock_error::what() const’:
/usr/local/include/odb/tr1/pointer-traits.hxx:116:1: internal compiler
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [ChildClass-odb.cxx] Error 1

Here is file ChildClass.h:

#ifndef CHILDCLASS_H

#define CHILDCLASS_H


#include <QString>

#include <QSharedPointer>


#include <odb/core.hxx>


class ParentClass;


#pragma db object

class ChildClass

{

public:

    ChildClass();

    const QString getID() const;

    void setID(QString &aID);

private:

    friend class odb::access;

#pragma db id

    QString id_;

    QSharedPointer<const ParentClass> parent_;

};


#endif // CHILDCLASS_H


and here is file ParentClass.h:


#ifndef PARENTCLASS_H

#define PARENTCLASS_H

#include <QString>

#include <QMap>

#include <QSharedPointer>

#include <odb/core.hxx>

#include "ChildClass.h"

#pragma db object

class ParentClass

{

public:

    ParentClass();

    ParentClass(QString aID);

    const QString getID() const;

    void setID(QString &aID);

private:

    friend class odb::access;

#pragma db id

    QString id_;

    bool bool_;

    int int_;

#pragma db not_null inverse(parent_)

    QMap<QString,QSharedPointer<const ChildClass> > children_;

};

#endif // PARENTCLASS_H

I am running Qt 5.1.1, odb 2.3.0 and gcc 4.6.3 on Ubuntu 12.04. Any ideas?


More information about the odb-users mailing list