Crash on launch with file on Mac
-
You're welcome. And you're not the first who stepped into that trap :-)
I've added doc notes the QCoreApplication and QApplication documentation here on DevNet.
-
Hello,
I have a similar problem but I can't find this "browser" demo. Can someone tell me which folder is it in?Thanks
-
It's under the QtSDK in Demos/4.7/browser in my install.
Aaron
-
Aah so this demo is QT 4.7 specific! I am using Qt 4.8 and this demo wasn't available. I just downloaded the 4.7 version to get the demo. Thank you.
-
[quote author="aaronsher" date="1342629125"]Cool, thanks! Wow, that's one I never would have guessed, though looking again at the browser sample I see that they are doing that and I missed it the first time.
Aaron[/quote]
Please mark the title as Solved :)
-
[SOLVED] How do I do that?
-
- Click on the title of your post
you will find this below the left side of your title.
quote |link |edit |report
- click on edit
- Prefix the title by adding a tag like [SOLVED] and update the post.
Thank you.
- Click on the title of your post
-
bq. [SOLVED] How do I do that?
looks great mickael.cruz
-
Hi All,
I am getting very similar crash using Qt 4.8.5 on OSX 10.9When I double click my file in Finder while my application is running it opens correctly, but if my application is not already running I get a crash just after showing its splash screen, note that I am using the correct int& argc in my inherited QApplication
Part of the crash stack:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtCore 0x000000010315614a QString::fromLocal8Bit(char const*, int) + 42
1 QtCore 0x000000010321d9cc QCoreApplication::arguments() + 124
2 QtGui 0x000000010356a77f QMacInputContext::reset() + 49311
3 com.apple.AppKit 0x00007fff8810ef65 __69-[NSApplication(NSAppleEventHandling) _handleAEOpenDocumentsForURLs:]_block_invoke + 1651
4 com.apple.AppKit 0x00007fff87f0ac63 __78-[NSDocumentController(NSInternal) _autoreopenDocumentsWithCompletionHandler:]_block_invoke_2 + 140
5 com.apple.AppKit 0x00007fff87f0a84d -[NSDocumentController(NSInternal) _autoreopenDocumentsWithCompletionHandler:] + 746
6 com.apple.AppKit 0x00007fff87d759fb -[NSApplication _reopenWindowsAsNecessaryIncludingRestorableState:registeringAsReady:completionHandler:] + 323
7 com.apple.AppKit 0x00007fff8810e869 -[NSApplication(NSAppleEventHandling) _handleAEOpenDocumentsForURLs:] + 306
8 com.apple.AppKit 0x00007fff87d752bb -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 450
9 com.apple.Foundation 0x00007fff89a0eeaa -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 294
10 com.apple.Foundation 0x00007fff89a0ed1d _NSAppleEventManagerGenericHandler + 106
11 com.apple.AE 0x00007fff83d55e1f aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 381
12 com.apple.AE 0x00007fff83d55c32 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 31
13 com.apple.AE 0x00007fff83d55b36 aeProcessAppleEvent + 315
14 com.apple.HIToolbox 0x00007fff877495f1 AEProcessAppleEvent + 56
15 com.apple.AppKit 0x00007fff87d710f6 _DPSNextEvent + 1026
16 com.apple.AppKit 0x00007fff87d708db -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
17 com.apple.AppKit 0x00007fff87d649cc -[NSApplication run] + 553
18 QtGui 0x0000000103572171 QDesktopWidget::resizeEvent(QResizeEvent*) + 3553
19 QtGui 0x0000000103574070 QDesktopWidget::resizeEvent(QResizeEvent*) + 11488
20 QtCore 0x000000010321c745 QCoreApplication::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 69
21 QtGui 0x0000000103614aaf QWidgetPrivate::show_helper() + 639
22 QtGui 0x0000000103614cff QWidget::setVisible(bool) + 511
....Last thing, I found when outputting application argc in exec function that it is not 1 as when I run it from QCreator, it is 24576!
I hope someone had found a solution for this because I've been trying to sort it for a week
thanks in advance
-
Please ignore the above comment as it appeared to be the same issue, and the previous fix sorted it