Exception Type: EXC_BAD_ACCESS (SIGSEGV)Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008Thread 0 Crashed:: Dispatch queue: com.apple.main-thread0 QtGui 0x00000001002c72aa QWidget::isWindowModified() const + 41 com.kambala.MedianXLOfflineTools 0x0000000100006ce2 MedianXLOfflineTools::maybeSave() + 34 (medianxlofflinetools.cpp:2170)2 com.kambala.MedianXLOfflineTools 0x00000001000067db MedianXLOfflineTools::loadFile(QString const&) + 299 (medianxlofflinetools.cpp:86)3 com.kambala.MedianXLOfflineTools 0x000000010009e1fa Application::event(QEvent*) + 106 (application.cpp:84)4 QtGui 0x0000000100287be8 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 3045 QtGui 0x0000000100287e66 QApplication::notify(QObject*, QEvent*) + 6006 QtCore 0x0000000100f1c982 QCoreApplication::notifyInternal(QObject*, QEvent*) + 1047 QtGui 0x000000010028737a qt_sendSpontaneousEvent(QObject*, QEvent*) + 428 QtGui 0x000000010023aad7 -[QCocoaApplicationDelegate application:openFiles:] + 4079 com.apple.AppKit 0x00007fff8dbe3eb5 __-[NSApplication(NSAppleEventHandling) _handleAEOpenDocumentsForURLs:]_block_invoke_1 + 106410 com.apple.AppKit 0x00007fff8d92bb4d __-[NSDocumentController(NSInternal) _autoreopenDocumentsWithCompletionHandler:]_block_invoke_2 + 11111 com.apple.AppKit 0x00007fff8d92b7a2 -[NSDocumentController(NSInternal) _autoreopenDocumentsWithCompletionHandler:] + 72512 com.apple.AppKit 0x00007fff8d95b027 -[NSPersistentUIManager finishedRestoringWindowsWithZOrder:registerAsReady:completionHandler:] + 662313 com.apple.AppKit 0x00007fff8e140b91 __-[NSPersistentUIManager restoreAllPersistentStateWithTalagentWindows:registeringAsReadyWhenDone:completionHandler:]_block_invoke_3 + 26414 com.apple.AppKit 0x00007fff8e142624 __-[NSPersistentUIManager restoreAllPersistentStateWithTalagentWindows:registeringAsReadyWhenDone:completionHandler:]_block_invoke_2 + 15615 com.apple.AppKit 0x00007fff8db7d740 __-[NSApplication(NSPersistentUISupport) _restoreWindowWithRestoration:handler:]_block_invoke_1 + 60116 com.apple.AppKit 0x00007fff8db6cdf3 -[NSApplication(NSPersistentUISupport) _restoreWindowWithRestoration:handler:] + 98117 com.apple.AppKit 0x00007fff8d9582a9 -[NSPersistentUIManager restoreAllPersistentStateWithTalagentWindows:registeringAsReadyWhenDone:completionHandler:] + 211918 com.apple.AppKit 0x00007fff8db6c7cb -[NSApplication(NSAppleEventHandling) _handleAEOpenDocumentsForURLs:] + 27219 com.apple.AppKit 0x00007fff8d92ad86 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 30720 com.apple.CoreFoundation 0x00007fff91ce6591 -[NSObject performSelector:withObject:withObject:] + 6521 com.apple.Foundation 0x00007fff89a7b7eb __-[NSAppleEventManager setEventHandler:andSelector:forEventClass:andEventID:]_block_invoke_1 + 10122 com.apple.Foundation 0x00007fff89a7a772 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 28323 com.apple.Foundation 0x00007fff89a7a600 _NSAppleEventManagerGenericHandler + 10524 com.apple.AE 0x00007fff9501fc25 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 20025 com.apple.AE 0x00007fff9501fb03 _ZL25dispatchEventAndSendReplyPK6AEDescPS_ + 3826 com.apple.AE 0x00007fff9501f9f7 aeProcessAppleEvent + 25027 com.apple.HIToolbox 0x00007fff8c22faf9 AEProcessAppleEvent + 10228 com.apple.AppKit 0x00007fff8d9281a9 _DPSNextEvent + 124729 com.apple.AppKit 0x00007fff8d927861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 13530 com.apple.AppKit 0x00007fff8d92419d -[NSApplication run] + 47031 QtGui 0x0000000100241e21 QEventDispatcherMacPrivate::ensureNSAppInitialized() + 10332 QtGui 0x0000000100242d69 QEventDispatcherMacPrivate::currentModalSession() + 22733 QtGui 0x0000000100243141 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 48934 QtCore 0x0000000100f19f08 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 39435 QtGui 0x00000001006da4c3 QDialog::exec() + 24336 QtGui 0x00000001006fc67e _ZL17showNewMessageBoxP7QWidgetN11QMessageBox4IconERK7QStringS5_6QFlagsINS1_14StandardButtonEES7_ + 31837 QtGui 0x00000001006fc773 QMessageBox::warning(QWidget*, QString const&, QString const&, QFlags<QMessageBox::StandardButton>, QMessageBox::StandardButton) + 3938 com.kambala.MedianXLOfflineTools 0x000000010002b8dd QMessageBox::warning(QWidget*, QString const&, QString const&, QMessageBox::StandardButton, QMessageBox::StandardButton) + 93 (qmessagebox.h:260)39 com.kambala.MedianXLOfflineTools 0x00000001000097d5 MedianXLOfflineTools::processSaveFile(QString const&) + 10277 (medianxlofflinetools.cpp:1457)40 com.kambala.MedianXLOfflineTools 0x00000001000068ff MedianXLOfflineTools::loadFile(QString const&) + 591 (medianxlofflinetools.cpp:90)41 com.kambala.MedianXLOfflineTools 0x0000000100003350 MedianXLOfflineTools::MedianXLOfflineTools(QString const&, QWidget*, QFlags<Qt::WindowType>) + 1168 (medianxlofflinetools.cpp:78)42 com.kambala.MedianXLOfflineTools 0x0000000100002eb5 MedianXLOfflineTools::MedianXLOfflineTools(QString const&, QWidget*, QFlags<Qt::WindowType>) + 37 (medianxlofflinetools.cpp:81)43 com.kambala.MedianXLOfflineTools 0x000000010009dd58 Application::Application(int&, char**) + 2200 (application.cpp:41)44 com.kambala.MedianXLOfflineTools 0x000000010009d4b5 Application::Application(int&, char**) + 37 (application.cpp:43)45 com.kambala.MedianXLOfflineTools 0x0000000100002dfe main + 46 (main.cpp:6)46 com.kambala.MedianXLOfflineTools 0x0000000100002daa _start + 24847 com.kambala.MedianXLOfflineTools 0x0000000100002cb1 start + 33
C++ (Qt)// Application.hclass Application : public QApplication{ Q_OBJECT public: explicit Application(int &argc, char **argv); virtual ~Application(); protected:#ifdef Q_WS_MACX bool event(QEvent *ev);#endif private slots: void createAndShowMainWindow(); private: MainWindow *_mainWindow; QString _param;#ifdef Q_WS_MACX QTimer *_showWindowMacTimer;#endif};
C++ (Qt)// Application.cppApplication::Application(int &argc, char **argv) : QApplication(argc, argv), _mainWindow(0), _showWindowMacTimer(0){ if (argc > 1) _param = argv[1];#ifdef Q_WS_MACX if (_param.isEmpty()) { _showWindowMacTimer = new QTimer; _showWindowMacTimer->setSingleShot(true); connect(_showWindowMacTimer, SIGNAL(timeout()), SLOT(createAndShowMainWindow())); _showWindowMacTimer->start(0); } else#endif createAndShowMainWindow();} Application::~Application(){ delete _mainWindow;} void Application::createAndShowMainWindow(){ _mainWindow = new MainWindow(_param); _mainWindow->show(); if (_showWindowMacTimer) delete _showWindowMacTimer;} #ifdef Q_WS_MACXbool Application::event(QEvent *ev){ if (ev->type() == QEvent::FileOpen) { _param = static_cast<QFileOpenEvent *>(ev)->file(); if (!_mainWindow) { _showWindowMacTimer->stop(); delete _showWindowMacTimer; _showWindowMacTimer = 0; createAndShowMainWindow(); } else _mainWindow->loadFile(_param); return true; } return QApplication::event(ev);}#endif
C++ (Qt)bool Application::event(QEvent *ev){ if (ev->type() == QEvent::FileOpen) { QMouseEvent e(QEvent::MouseButtonPress, QPoint(50,50), Qt::LeftButton, 0, 0); (send|post)Event(_mainWindow, &e); _mainWindow->loadFile(static_cast<QFileOpenEvent *>(ev)->file()); return true; } return QApplication::event(ev);}
C++ (Qt)QEventLoop loop;loop.exec();