PDA

View Full Version : QMetaObject cast Error



nirab_25
27th October 2010, 07:42
hi....
I am adding more than 10000 qgraohics item and added to scene is done but but later on crahes on QMetaObject.cpp on line 266

here is calls start from qt_is_translatable_mouse_event at qapplication_win.cpp:

0 QMetaObject::cast qmetaobject.cpp 266 0x6a200e27
1 qobject_cast<QGesture*> qobject.h 451 0x021fd27e
2 QApplication::notify qapplication.cpp 3633 0x01befcef
3 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fc512
4 QCoreApplication::sendEvent qcoreapplication.h 215 0x02240ffe
5 QGraphicsScenePrivate::sendEvent qgraphicsscene.cpp 1134 0x021756aa
6 QGraphicsScene::sendEvent qgraphicsscene.cpp 5473 0x02183ab3
7 QGraphicsItem::sceneEvent qgraphicsitem.cpp 6580 0x0215bb93
8 QGraphicsScenePrivate::sendEvent qgraphicsscene.cpp 1138 0x021756e2
9 QGraphicsScene::sendEvent qgraphicsscene.cpp 5473 0x02183ab3
10 QGraphicsScene::event qgraphicsscene.cpp 3412 0x0217c030
11 QApplicationPrivate::notify_helper qapplication.cpp 4242 0x01bf2252
12 QApplication::notify qapplication.cpp 3661 0x01befdb7
13 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fc512
14 QCoreApplication::sendEvent qcoreapplication.h 215 0x02240ffe
15 QGraphicsView::viewportEvent qgraphicsview.cpp 2651 0x02198f53
16 QAbstractScrollAreaPrivate::viewportEvent qabstractscrollarea_p.h 100 0x02279733
17 QAbstractScrollAreaFilter::eventFilter qabstractscrollarea_p.h 116 0x02277b70
18 QCoreApplicationPrivate::sendThroughObjectEventFil ters qcoreapplication.cpp 819 0x6a1fc7a9
19 QApplicationPrivate::notify_helper qapplication.cpp 4238 0x01bf2231
20 QApplication::notify qapplication.cpp 4207 0x01bf20d3
21 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fc512
22 QCoreApplication::sendEvent qcoreapplication.h 215 0x02240ffe
23 QWidget::event qwidget.cpp 8230 0x01c3d172
24 QFrame::event qframe.cpp 557 0x01fa2600
25 QAbstractScrollArea::event qabstractscrollarea.cpp 985 0x0202eea6
26 QGraphicsView::event qgraphicsview.cpp 2625 0x02198d8e
27 QApplicationPrivate::notify_helper qapplication.cpp 4242 0x01bf2252
28 QApplication::notify qapplication.cpp 4207 0x01bf20d3
29 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fc512
30 QCoreApplication::sendEvent qcoreapplication.h 215 0x02240ffe
31 QWidget::event qwidget.cpp 8230 0x01c3d172
32 QGroupBox::event qgroupbox.cpp 397 0x01fa3542
33 QApplicationPrivate::notify_helper qapplication.cpp 4242 0x01bf2252
34 QApplication::notify qapplication.cpp 4207 0x01bf20d3
35 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fc512
36 QCoreApplication::sendEvent qcoreapplication.h 215 0x02240ffe
37 QWidget::event qwidget.cpp 8230 0x01c3d172
38 QMainWindow::event qmainwindow.cpp 1434 0x01fc0290
39 QApplicationPrivate::notify_helper qapplication.cpp 4242 0x01bf2252
40 QApplication::notify qapplication.cpp 4207 0x01bf20d3
41 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fc512
42 QCoreApplication::sendSpontaneousEvent qcoreapplication.h 218 0x02240faa
43 QApplication::setActiveWindow qapplication.cpp 2447 0x01bed726
44 QApplication::winFocus qapplication_win.cpp 1328 0x01c519ca
45 QtWndProc@16 qapplication_win.cpp 1998 0x01c53676
46 USER32!GetDC C:\WINDOWS\system32\user32.dll 0 0x7e418734
47 ?? 0 0x003600f4
48 ?? 0 0x00000006
49 USER32!GetDC C:\WINDOWS\system32\user32.dll 0 0x7e418816
50 qt_is_translatable_mouse_event qapplication_win.cpp 1389 0x01c51b19
51 USER32!DefWindowProcW C:\WINDOWS\system32\user32.dll 0 0x7e428ea0
52 ?? 0 0x00000000

ChrisW67
27th October 2010, 08:12
Null pointer, sudden wind gust, fairies at the bottom of the garden... how can we possibly help. You haven't told us the first thing about what your user or your code is doing at the time it crashes (you have told us something about what the code did earlier) or what you have done to isolate the problem. If I had to guess I would say that you are doing something mouse-related.

You have managed to get a debugger back trace, but that shows no user code except perhaps at 47, 48, and 52. Have you built your code with debugging symbols? Have you single-stepped the offending section of your code?

nirab_25
27th October 2010, 08:58
yes, I have built my code with debugging symbol and i have done a lot of in mouse event, it also crashes when zoom the view on mouse event not always.........
and when i debug, i see after doing all the stuffs at an action

here obj pointer is valid but not in scope

QObject *QMetaObject::cast(QObject *obj) const
{
if (obj) {
const QMetaObject *m = obj->metaObject();
do {
if (m == this)
return const_cast<QObject*>(obj);
} while ((m = m->d.superdata));
}
return 0;
}