Hello,
On OSX and the latest build from here (https://sourceforge.net/projects/flightgear/files/release-2018.2/), the launcher consistently crashes once I change my aircraft and hit Fly. I've attached the stack trace for the crashed thread (as shown by Apple's crash reporter). Thankfully the launcher remembers my new choice, so I am able to just relaunch FG and hit fly and everything works fine - which indicates some issue that is created when I switch aircrafts.
Happy to run any additional tests if required!
Here is the detailed information:
What /exactly/ did you do?
How did you expect FlightGear to respond?
What did you see instead?
What version are you using?
What operating system?
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x18:
-->
__TEXT 000000010374b000-000000010485f000 [ 17.1M] r-x/rwx SM=COW /Applications/FlightGear.app/Contents/MacOS/fgfs
Application Specific Information:
objc_msgSend() selector name: isKindOfClass:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff6951ee9d objc_msgSend + 29
1 com.apple.AppKit 0x00007fff3f8e9d22 -[NSWindow _shouldGetCornerMaskFromVisualEffectView] + 93
2 com.apple.AppKit 0x00007fff3f9ef8d8 -[NSWindow _cornerMask] + 95
3 com.apple.AppKit 0x00007fff3f9ef836 -[NSWindow _cornerMaskOrNil] + 22
4 com.apple.AppKit 0x00007fff3fa5ef22 __67-[NSWindow _updateSettingsSendingScreenChangeNotificationIfNeeded:]_block_invoke + 243
5 com.apple.AppKit 0x00007fff3f9f5c0c NSPerformVisuallyAtomicChange + 146
6 com.apple.AppKit 0x00007fff3f97b04c -[NSWindow _updateSettingsSendingScreenChangeNotificationIfNeeded:] + 193
7 com.apple.AppKit 0x00007fff3fc455f5 -[NSWindow _screenChanged:] + 58
8 com.apple.AppKit 0x00007fff3fc4557b -[NSWindow _displayChangedSoAdjustWindows:] + 159
9 com.apple.AppKit 0x00007fff3fa40138 __44-[NSApplication makeWindowsPerform:inOrder:]_block_invoke + 27
10 com.apple.AppKit 0x00007fff3fceacdd __52-[NSApplication _findWindowWithOptions:passingTest:]_block_invoke + 26
11 com.apple.AppKit 0x00007fff3fceae8c -[NSApplication enumerateWindowsWithOptions:usingBlock:] + 301
12 com.apple.AppKit 0x00007fff3fceac8a -[NSApplication _findWindowWithOptions:passingTest:] + 147
13 com.apple.AppKit 0x00007fff3f8ccbf6 -[NSApplication makeWindowsPerform:inOrder:] + 255
14 com.apple.AppKit 0x00007fff40451025 -[NSApplication(ScreenHandling) _reactToScreenInvalidationImmediately:] + 84
15 com.apple.AppKit 0x00007fff40450f95 __60-[NSApplication(ScreenHandling) _reactToScreenInvalidation:]_block_invoke + 59
16 com.apple.CoreFoundation 0x00007fff423568cc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
17 com.apple.CoreFoundation 0x00007fff423392a3 __CFRunLoopDoBlocks + 275
18 com.apple.CoreFoundation 0x00007fff4233892e __CFRunLoopRun + 1278
19 com.apple.CoreFoundation 0x00007fff423381a3 CFRunLoopRunSpecific + 483
20 com.apple.HIToolbox 0x00007fff4161ed96 RunCurrentEventLoopInMode + 286
21 com.apple.HIToolbox 0x00007fff4161ea0f ReceiveNextEventCommon + 366
22 com.apple.HIToolbox 0x00007fff4161e884 _BlockUntilNextEventMatchingListInModeWithFilter + 64
23 com.apple.AppKit 0x00007fff3f8d0a73 _DPSNextEvent + 2085
24 com.apple.AppKit 0x00007fff40066e34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
25 libosgViewer.131.dylib 0x000000010527c473 osgViewer::GraphicsWindowCocoa::checkEvents() + 211
26 libosgViewer.131.dylib 0x0000000105267cd4 osgViewer::Viewer::eventTraversal() + 628
27 libosgViewer.131.dylib 0x000000010526e391 osgViewer::ViewerBase::frame(double) + 97
28 org.flightgear.FlightGear 0x0000000103d90fbe fgOSMainLoop() + 126
29 org.flightgear.FlightGear 0x0000000103e00f0f fgMainInit(int, char**) + 5279
30 org.flightgear.FlightGear 0x0000000103755072 main + 290
31 org.flightgear.FlightGear 0x0000000103754d64 start + 52
Thread 1:
0 libsystem_kernel.dylib 0x00007fff6a296a1e __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6a45f589 _pthread_cond_wait + 732
2 org.flightgear.FlightGear 0x0000000103fab593 0x10374b000 + 8783251
3 org.flightgear.FlightGear 0x0000000103fab22b 0x10374b000 + 8782379
4 org.flightgear.FlightGear 0x00000001040973ca SGThread::PrivateData::start_routine(void*) + 10
5 libsystem_pthread.dylib 0x00007fff6a45e661 _pthread_body + 340
6 libsystem_pthread.dylib 0x00007fff6a45e50d _pthread_start + 377
7 libsystem_pthread.dylib 0x00007fff6a45dbf9 thread_start + 13
Thread 2:: Qt bearer thread
0 libsystem_kernel.dylib 0x00007fff6a2980a2 poll + 10
1 org.qt-project.QtCore 0x0000000106c9d8e0 qt_safe_poll(pollfd*, unsigned int, timespec const*) + 112
2 org.qt-project.QtCore 0x0000000106c9ef75 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 885
3 org.qt-project.QtCore 0x0000000106c47781 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 401
4 org.qt-project.QtCore 0x0000000106a85eee QThread::exec() + 110
5 org.qt-project.QtCore 0x0000000106a8985a 0x106a5f000 + 174170
6 libsystem_pthread.dylib 0x00007fff6a45e661 _pthread_body + 340
7 libsystem_pthread.dylib 0x00007fff6a45e50d _pthread_start + 377
8 libsystem_pthread.dylib 0x00007fff6a45dbf9 thread_start + 13
Thread 3:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff6a28d20a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6a28c724 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff423397d5 __CFRunLoopServiceMachPort + 341
3 com.apple.CoreFoundation 0x00007fff42338b27 __CFRunLoopRun + 1783
4 com.apple.CoreFoundation 0x00007fff423381a3 CFRunLoopRunSpecific + 483
5 com.apple.AppKit 0x00007fff3fa0dfc4 _NSEventThread + 184
6 libsystem_pthread.dylib 0x00007fff6a45e661 _pthread_body + 340
7 libsystem_pthread.dylib 0x00007fff6a45e50d _pthread_start + 377
8 libsystem_pthread.dylib 0x00007fff6a45dbf9 thread_start + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff6a297292 __workq_kernreturn + 10
1 libsystem_pthread.dylib 0x00007fff6a45e20e _pthread_wqthread + 1552
2 libsystem_pthread.dylib 0x00007fff6a45dbe9 start_wqthread + 13
Thread 5:
0 libsystem_pthread.dylib 0x00007fff6a45dbdc start_wqthread + 0
Thread 6:
0 libsystem_pthread.dylib 0x00007fff6a45dbdc start_wqthread + 0
1 ??? 0x0000400000000000 0 + 70368744177664
Thread 7:: Dispatch queue: NSCGSDisableUpdates
0 libsystem_kernel.dylib 0x00007fff6a28d20a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6a28c724 mach_msg + 60
2 com.apple.SkyLight 0x00007fff63fdeb0d CGSUpdateManager::enable_updates_common() + 565
3 com.apple.SkyLight 0x00007fff63f82c10 CGSUpdateManager::enable_update(unsigned long long) + 320
4 libdispatch.dylib 0x00007fff6a1145fa _dispatch_call_block_and_release + 12
5 libdispatch.dylib 0x00007fff6a10cdb8 _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff6a121217 _dispatch_queue_serial_drain + 635
7 libdispatch.dylib 0x00007fff6a114166 _dispatch_queue_invoke + 373
8 libdispatch.dylib 0x00007fff6a121f0d _dispatch_root_queue_drain_deferred_wlh + 332
9 libdispatch.dylib 0x00007fff6a125d21 _dispatch_workloop_worker_thread + 880
10 libsystem_pthread.dylib 0x00007fff6a45dfd2 _pthread_wqthread + 980
11 libsystem_pthread.dylib 0x00007fff6a45dbe9 start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007fff9be9afc0 rbx: 0x00007fba0dbe7b20 rcx: 0x0000000000000000 rdx: 0x00007fff9be9afc0
rdi: 0x00007fba0dbe7b20 rsi: 0x00007fff4055ffbb rbp: 0x00007ffeec4b2b50 rsp: 0x00007ffeec4b2b28
r8: 0x0000000000000001 r9: 0x0000000000000001 r10: 0x0000000000000000 r11: 0x00007fff4055ffbb
r12: 0x00007fff6951ee80 r13: 0x00007ffeec4b2c60 r14: 0x00007fff4055ff54 r15: 0x00007fff4055ffbb
rip: 0x00007fff6951ee9d rfl: 0x0000000000010246 cr2: 0x0000000000000018
Logical CPU: 1
Error Code: 0x00000004
Trap Number: 14
That is .... really weird. The launcher has actually finished when we crash: were into the main FGFS loop, see fgOSMainLoop.
Do you see the main FG window appear at all? And what happens if you run without the launcher?
Nop, I never see the FG window appear. I tried from the launcher with the following commands:
...with the same aircraft twice, different aircraft each time etc. FG loads successfully without any issues (although almost immediately crashes after ~10 seconds - I'll post that error in a different ticket).
So it seems like this is a problem strongly connected with the launcher!
Best,
Fahim
I'm still out of ideas how to fix this one - is the crash the same with a current nightly build? Otherwise trying to think what other ways we could debug / trace the issue.
Chasing down old bugs: does this still happen with recent versions?
Assuming that this is no longer an issue after 6 years of no further reports.