我的Qt程序在Linux和Windows上运行良好。但是,当它在Mac上时,对于单击的特定按钮,可能会导致退出意外错误。然而,奇怪的部分是,这个错误发生不可预测。有时会发生但有时一切都很好。插槽功能仅用于显示另一个已存在的窗口并进行一些正常计算。它适用于另外两个操作系统。以下是mac提供的错误信息。谁能告诉我如何解决这个问题?非常感谢!
Process: VigenereVis [2447]
Path: /Users/USER/Desktop/*/VigenereVis.app/Contents/MacOS/VigenereVis
Identifier: com.yourcompany.VigenereVis
Version: ???
Code Type: X86-64 (Native)
Parent Process: launchd [165]
Responsible: VigenereVis [2447]
User ID: 501
Date/Time: 2014-04-08 15:58:55.210 -0400
OS Version: Mac OS X 10.9.2 (13C64)
Report Version: 11
Anonymous UUID: 5906397F-7107-5863-B4B0-434214C07ECA
Sleep/Wake UUID: 1581FC20-6365-4366-9DB7-AAB3A8454BD5
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000100000000-0000000100096000 [ 600K] r-x/rwx SM=COW /Users/USER/Desktop/*/VigenereVis.app/Contents/MacOS/VigenereVis
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.yourcompany.VigenereVis 0x00000001000357c0 std::vector<float, std::allocator<float> >::operator[](unsigned long) + 16 (stl_vector.h:478)
1 com.yourcompany.VigenereVis 0x000000010002e81f Canvas::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) + 21519 (canvas.cpp:626)
2 QtGui 0x00000001007876f0 QGraphicsScenePrivate::draw(QGraphicsItem*, QPainter*, QTransform const*, QTransform const*, QRegion*, QWidget*, double, QTransform const*, bool, bool) + 2496
3 QtGui 0x0000000100787e12 QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem*, QPainter*, QTransform const*, QRegion*, QWidget*, double, QTransform const*) + 1234
4 QtGui 0x00000001007888a3 QGraphicsScenePrivate::drawItems(QPainter*, QTransform const*, QRegion*, QWidget*) + 467
5 QtGui 0x00000001007b00a3 QGraphicsView::paintEvent(QPaintEvent*) + 787
6 QtGui 0x00000001001ea307 QWidget::event(QEvent*) + 2343
7 QtGui 0x00000001005798ec QFrame::event(QEvent*) + 44
8 QtGui 0x0000000100605bc7 QAbstractScrollArea::viewportEvent(QEvent*) + 23
9 QtGui 0x00000001007b198b QGraphicsView::viewportEvent(QEvent*) + 123
10 QtGui 0x0000000100607f50 QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) + 48
11 QtCore 0x0000000100f27cb7 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) + 151
12 QtGui 0x000000010018d9be QApplicationPrivate::notify_helper(QObject*, QEvent*) + 142
13 QtGui 0x0000000100194064 QApplication::notify(QObject*, QEvent*) + 1060
14 QtCore 0x0000000100f2820c QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
15 QtGui 0x00000001001e073e QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1822
16 QtGui 0x00000001001e11b4 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1460
17 QtGui 0x00000001001e04d0 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1200
18 QtGui 0x00000001001e11b4 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1460
19 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
20 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
21 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
22 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
23 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
24 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
25 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
26 QtGui 0x00000001001e1075 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1141
27 QtGui 0x00000001001e04d0 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1200
28 QtGui 0x000000010013291a -[QCocoaView drawRect:] + 1786
29 com.apple.AppKit 0x00007fff8e76616f -[NSView _drawRect:clip:] + 3748
30 com.apple.AppKit 0x00007fff8e7649e4 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1799
31 com.apple.AppKit 0x00007fff8e764dc0 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2787
32 com.apple.AppKit 0x00007fff8e762826 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 841
33 com.apple.AppKit 0x00007fff8e761fd1 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 314
34 com.apple.AppKit 0x00007fff8e75efbf -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2828
35 com.apple.AppKit 0x00007fff8e73e42a -[NSView displayIfNeeded] + 1680
36 com.apple.AppKit 0x00007fff8e757ff6 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1972
37 com.apple.AppKit 0x00007fff8e7575a0 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 786
38 com.apple.AppKit 0x00007fff8e757220 -[NSWindow orderWindow:relativeTo:] + 162
39 com.apple.AppKit 0x00007fff8e7487d6 -[NSWindow makeKeyAndOrderFront:] + 51
40 QtGui 0x00000001001293a3 QWidgetPrivate::show_sys() + 1123
41 QtGui 0x00000001001e5448 QWidgetPrivate::show_helper() + 408
42 QtGui 0x00000001001e6cff QWidget::setVisible(bool) + 511
43 com.yourcompany.VigenereVis 0x000000010000205b QWidget::show() + 27 (qwidget.h:494)
44 com.yourcompany.VigenereVis 0x0000000100015a8d VigenereVis::showAttackWindow() + 989 (vigenerevis.cpp:1920)
45 com.yourcompany.VigenereVis 0x0000000100067a5e VigenereVis::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 686 (moc_vigenerevis.cpp:153)
46 QtCore 0x0000000100f401ee QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 1566
47 QtGui 0x000000010080e321 QAbstractButton::clicked(bool) + 49
48 QtGui 0x00000001005315c0 QAbstractButtonPrivate::emitClicked() + 64
49 QtGui 0x00000001005327fa QAbstractButtonPrivate::click() + 154
50 QtGui 0x0000000100532a51 QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 113
51 QtGui 0x00000001001ea355 QWidget::event(QEvent*) + 2421
52 QtGui 0x0000000100531848 QAbstractButton::event(QEvent*) + 40
53 QtGui 0x00000001005cd595 QPushButton::event(QEvent*) + 69
54 QtGui 0x000000010018d9ed QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
55 QtGui 0x0000000100194590 QApplication::notify(QObject*, QEvent*) + 2384
56 QtCore 0x0000000100f2820c QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
57 QtGui 0x0000000100191fdd QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) + 333
58 QtGui 0x0000000100141acb qt_mac_handleMouseEvent(NSEvent*, QEvent::Type, Qt::MouseButton, QWidget*, bool) + 763
59 com.apple.AppKit 0x00007fff8e809235 -[NSWindow sendEvent:] + 781
60 QtGui 0x0000000100136bb7 -[QCocoaWindow sendEvent:] + 87
61 com.apple.AppKit 0x00007fff8e7aa6e4 -[NSApplication sendEvent:] + 2021
62 QtGui 0x000000010013bbf4 -[QNSApplication sendEvent:] + 84
63 com.apple.AppKit 0x00007fff8e5fab89 -[NSApplication run] + 646
64 QtGui 0x0000000100146a80 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1824
65 QtCore 0x0000000100f27114 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 68
66 QtCore 0x0000000100f274c4 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 324
67 QtCore 0x0000000100f29bac QCoreApplication::exec() + 188
68 com.yourcompany.VigenereVis 0x0000000100001f35 main + 101 (main.cpp:10)
69 com.yourcompany.VigenereVis 0x0000000100001ea4 start + 52