Projekt

Allgemein

Profil

Aktionen

Fehler #601

geschlossen

Absturz bei mehrfachem Anklicken einer Person in AppAttendance

Von Sebastian Diel vor etwa 9 Jahren hinzugefügt. Vor etwa 9 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Normal
Zugewiesen an:
Zielversion:
Beginn:
22.10.2015
Abgabedatum:
% erledigt:

100%

Geschätzter Aufwand:

Beschreibung

Reproduzieren: cit2 starten, eine Person mehrfach klicken
FM; Segmentation fault.

Stack:

0    QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::data    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    135    0x6ba58ae8    
1    qGetPtrHelper<QScopedPointer<QObjectData>>    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    983    0x6b909879    
2    QObject::d_func    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    110    0x6ba704e7    
3    QObject::property    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    3875    0x6b907992    
4    CuteEntityManager::Entity::getProperty    entity.cpp    126    0x27a51e3a    
5    CuteEntityManager::EntityManager::hasChanged    entitymanager.cpp    386    0x27a54d2a    
6    CuteEntityManager::EntityManager::saveObject    entitymanager.cpp    92    0x27a52b3a    
7    CuteEntityManager::EntityManager::save    entitymanager.cpp    219    0x27a536ea    
8    AppAttendance::buttonAction    appattendance.cpp    103    0x4521a5    
9    AppAttendance::qt_static_metacall    moc_appattendance.cpp    72    0x4605ce    
10    QMetaObject::activate    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    3713    0x6b907249    
11    QMetaObject::activate    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    3578    0x6b906b8e    
12    GroupContent::buttonClicked    moc_groupcontent.cpp    527    0x45a64b    
13    GroupContent::qt_static_metacall    moc_groupcontent.cpp    164    0x459aaa    
14    QMetaObject::activate    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    3713    0x6b907249    
15    QMetaObject::activate    C:/Qt/5.5/mingw492_32/bin/Qt5Cored.dll    3578    0x6b906b8e    
16    ButtonContent::clicked    moc_buttoncontent.cpp    934    0x459509    
17    ButtonContent::onClicked    buttoncontent.h    88    0x475685    
18    ButtonContent::qt_static_metacall    moc_buttoncontent.cpp    368    0x4580e7    
19    ButtonContent::qt_metacall    moc_buttoncontent.cpp    813    0x45913d    
...    <More>                

In entitymanager.cpp 385 ist offensichtlich

auto e = EntityInstanceFactory::castQVariant(v);

nicht erfolgreich, wodurch die folgende Zeile

if (e->getProperty(entity->getPrimaryKey()) != i.value()) {

zum Crash führt.

An ebender stelle ist:

    Locals        
        this    "em[0]"    CuteEntityManager::EntityManager
            [QObject]    "em[0]"    QObject
            cache        CuteEntityManager::Cache
            connectionNames    <1 items>    QStringList
            db        QSharedPointer<CuteEntityManager::Database>
            id    ""    QString
            instances    <1 items>    QHash<QString, CuteEntityManager::EntityManager*>
            logger        QSharedPointer<CuteEntityManager::Logger>
            queryInterpreter        QSharedPointer<CuteEntityManager::QueryInterpreter>
            schema        QSharedPointer<CuteEntityManager::Schema>
            staticMetaObject        QMetaObject
            [parent]    0x0    QObject *
            [children]    <0 items>    QObjectList
            [properties]    <>0 items>    
            [methods]    <50 items>    
            [signals]    <0 items>    
        appendix    "_id"    QString
            [0]    95    QChar
            [1]    105    QChar
            [2]    100    QChar
        changed    false    bool
        e    (null)    QSharedPointer<CuteEntityManager::Entity>
        entity        QSharedPointer<CuteEntityManager::Entity> &
            data        AttendanceIncident
            weakref    5    int
            strongref    4    int
        i        QHash<QString, QVariant>::const_iterator
        listmap    <15 items>    QHash<QString, QVariant>
            [0]        QHashNode<QString, QVariant>
            [1]        QHashNode<QString, QVariant>
            [2]        QHashNode<QString, QVariant>
            [3]        QHashNode<QString, QVariant>
            [4]        QHashNode<QString, QVariant>
            [5]        QHashNode<QString, QVariant>
            [6]        QHashNode<QString, QVariant>
            [7]        QHashNode<QString, QVariant>
            [8]        QHashNode<QString, QVariant>
            [9]        QHashNode<QString, QVariant>
            [10]        QHashNode<QString, QVariant>
            [11]        QHashNode<QString, QVariant>
            [12]        QHashNode<QString, QVariant>
            [13]        QHashNode<QString, QVariant>
            [14]        QHashNode<QString, QVariant>
        relKey    "room"    QString
            [0]    114    QChar
            [1]    111    QChar
            [2]    111    QChar
            [3]    109    QChar
        relations    <4 items>    QHash<QString, CuteEntityManager::Relation>
            [0]        QHashNode<QString, CuteEntityManager::Relation>
            [1]        QHashNode<QString, CuteEntityManager::Relation>
            [2]        QHashNode<QString, CuteEntityManager::Relation>
            [3]        QHashNode<QString, CuteEntityManager::Relation>
        rels    <4 items>    QStringList
            [0]    "appData_id"    QString
            [1]    "room_id"    QString
            [2]    "pupil_id"    QString
            [3]    "group_id"    QString
        v        QVariant (QSharedPointer<Room>)

Der dbcon0.log zeigt folgende letzte Meldungen im DEBUG-Modus:

{"time":"2015-10-22T11:34:54", "query":"SELECT * FROM `attendanceincident` LEFT JOIN `incident` ON `incident`.`id` = `attendanceincident`.`id` WHERE `bookedAt` <= ? AND `bookedFor` <= ? AND ( `cancelledAt`IS NULL OR ( `cancelledAt` > ? AND `cancelledAt`IS NOT NULL ) ) AND `pupil_id`=? AND `appData_id`=? ORDER BY `bookedFor` DESC", "values": {"appData_id":"1", "bookedAt":"2015-09-14T10:11:00", "bookedFor":"2015-09-14T10:11:00", "cancelledAt":"2015-09-14T10:11:00", "pupil_id":"21"}}
{"time":"2015-10-22T11:34:54", "query":"SELECT * FROM `appattendancedata` LEFT JOIN `appdata` ON `appdata`.`id`=`appattendancedata`.`id` WHERE `appattendancedata`.`id`= ? LIMIT 1", "values": {"id":"1"}}
{"time":"2015-10-22T11:34:54", "query":"SELECT * FROM `pupil` LEFT JOIN `person` ON `person`.`id`=`pupil`.`id` WHERE `pupil`.`id`= ? LIMIT 1", "values": {"id":"21"}}
{"time":"2015-10-22T11:34:54", "query":"SELECT * FROM `group` WHERE `group`.`id`= ? LIMIT 1", "values": {"id":"1"}}
{"time":"2015-10-22T11:34:54", "query":"INSERT INTO `incident`(`additionalInfo`,`pupil_id`,`bookedFor`,`locked`,`bookedAt`,`group_id`,`cancelledAt`,`appData_id`)VALUES(?,?,?,?,?,?,?,?);", "values": {"additionalInfo":"Neuer Incident!", "appData_id":"1", "bookedAt":"2015-09-14T10:11:00", "bookedFor":"2015-09-14T10:11:00", "cancelledAt":"", "group_id":"1", "locked":"false", "pupil_id":"21"}}
{"time":"2015-10-22T11:34:55", "query":"INSERT INTO `attendanceincident`(`excusedAt`,`state`,`notExcusable`,`lessonsMissed`,`id`,`minutesLate`)VALUES(?,?,?,?,?,?);", "values": {"excusedAt":"", "id":"8", "lessonsMissed":"2", "minutesLate":"0", "notExcusable":"false", "state":"2"}}
{"time":"2015-10-22T11:34:55", "query":"SELECT * FROM `attendanceincident` LEFT JOIN `incident` ON `incident`.`id` = `attendanceincident`.`id` WHERE `bookedAt` <= ? AND `bookedFor` <= ? AND ( `cancelledAt`IS NULL OR ( `cancelledAt` > ? AND `cancelledAt`IS NOT NULL ) ) AND `pupil_id`=? AND `appData_id`=? ORDER BY `bookedFor` DESC", "values": {"appData_id":"1", "bookedAt":"2015-09-14T10:11:00", "bookedFor":"2015-09-14T10:11:00", "cancelledAt":"2015-09-14T10:11:00", "pupil_id":"21"}}
{"time":"2015-10-22T11:34:55", "query":"SELECT * FROM `appdata` WHERE `appdata`.`id`= ? LIMIT 1", "values": {"id":"1"}}
{"time":"2015-10-22T11:34:55", "query":"SELECT * FROM `group_appDatasAssociated` WHERE `appdata_id` = ?;", "values": {"id":"1"}}
{"time":"2015-10-22T11:34:55", "query":"SELECT * FROM `attendanceincident` LEFT JOIN `incident` ON `incident`.`id`=`attendanceincident`.`id` WHERE `attendanceincident`.`id`= ? LIMIT 1", "values": {"id":"8"}}

Aktionen

Auch abrufbar als: Atom PDF