Bug 1780938 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

In some cases, the main thread looks like this when these crashes happen:

```
Thread 0, Name: MainThread
Frame  Module  Signature  Source
0  libsystem_kernel.dylib  mach_msg2_trap  None
1  libsystem_kernel.dylib  mach_msg2_internal  None
Ø 2  None  @0xbe720001a01cc1c8  None
3  libsystem_kernel.dylib  mach_msg  None
Ø 4  None  @0xfe7d8001a02ea23c  None
5  CoreFoundation  __CFRunLoopRun  None
Ø 6  None  @0x4b648001a994d1ec  None
7  HIToolbox  RunCurrentEventLoopInMode  None
Ø 8  None  @0xd1700001a994cd5c  None
9  AppKit  -[NSApplicationFunctionRowController _teardown]  None
```

But these instances are all corrupt and truncated. From setting a breakpoint on `-[NSApplicationFunctionRowController _teardown]` in `lldb`, I think it's most likely that these are cases of Firefox getting or losing the application focus. For example:

```
* thread #1, name = 'MainThread', queue = 'com.apple.main-thread', stop reason = breakpoint 5.1
  * frame #0: 0x00000001ad1c13f0 AppKit`-[NSApplicationFunctionRowController _teardown]
    frame #1: 0x00000001ad1c1214 AppKit`-[NSApplicationFunctionRowController _sync] + 500
    frame #2: 0x00000001a9f75274 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
    frame #3: 0x00000001aa012b2c CoreFoundation`___CFXRegistrationPost_block_invoke + 88
    frame #4: 0x00000001aa012a74 CoreFoundation`_CFXRegistrationPost + 440
    frame #5: 0x00000001a9f453b0 CoreFoundation`_CFXNotificationPost + 708
    frame #6: 0x00000001aae2bdd8 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    frame #7: 0x00000001ad311140 AppKit`-[NSApplication _handleActivatedEvent:] + 1376
    frame #8: 0x00000001ad2ea0c4 AppKit`-[NSApplication(NSEvent) sendEvent:] + 2164
    frame #9: 0x0000000111f892cc XUL`-[GeckoNSApplication sendEvent:](self=0x0000000100691b10, _cmd=<unavailable>, anEvent=0x00000001662a7d00) at nsAppShell.mm:165:3 [opt]
    frame #10: 0x00000001ad53ad80 AppKit`-[NSApplication _handleEvent:] + 60
    frame #11: 0x00000001ad1b00fc AppKit`-[NSApplication run] + 500
    frame #12: 0x0000000111f8a374 XUL`nsAppShell::Run(this=0x000000010052b600) at nsAppShell.mm:801:5 [opt]
    frame #13: 0x00000001130dc504 XUL`nsAppStartup::Run(this=0x00000001074dff60) at nsAppStartup.cpp:295:30 [opt]
    frame #14: 0x00000001131a8008 XUL`XREMain::XRE_mainRun(this=0x000000016fdfec50) at nsAppRunner.cpp:5700:22 [opt]
    frame #15: 0x00000001131a8638 XUL`XREMain::XRE_main(this=0x000000016fdfec50, argc=5, argv=0x000000016fdff538, aConfig=<unavailable>) at nsAppRunner.cpp:5894:8 [opt]
    frame #16: 0x00000001131a89d4 XUL`XRE_main(argc=<unavailable>, argv=<unavailable>, aConfig=<unavailable>) at nsAppRunner.cpp:5962:21 [opt]
    frame #17: 0x0000000100000bc8 firefox`main [inlined] do_main(argc=<unavailable>, argv=0x000000016fdff538, envp=<unavailable>) at nsBrowserApp.cpp:227:22 [opt]
    frame #18: 0x0000000100000a14 firefox`main(argc=<unavailable>, argv=<unavailable>, envp=<unavailable>) at nsBrowserApp.cpp:414:16 [opt]
    frame #19: 0x0000000235827d68 dyld`start + 2312
```

or

```
* thread #1, name = 'MainThread', queue = 'com.apple.main-thread', stop reason = breakpoint 5.1
  * frame #0: 0x00000001ad1c13f0 AppKit`-[NSApplicationFunctionRowController _teardown]
    frame #1: 0x00000001ad1c1214 AppKit`-[NSApplicationFunctionRowController _sync] + 500
    frame #2: 0x00000001a9f75274 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
    frame #3: 0x00000001aa012b2c CoreFoundation`___CFXRegistrationPost_block_invoke + 88
    frame #4: 0x00000001aa012a74 CoreFoundation`_CFXRegistrationPost + 440
    frame #5: 0x00000001a9f453b0 CoreFoundation`_CFXNotificationPost + 708
    frame #6: 0x00000001aae2bdd8 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    frame #7: 0x00000001ad319ec0 AppKit`-[NSApplication _handleDeactivateEvent:] + 748
    frame #8: 0x00000001ad2e9d30 AppKit`-[NSApplication(NSEvent) sendEvent:] + 1248
    frame #9: 0x0000000111f892cc XUL`-[GeckoNSApplication sendEvent:](self=0x0000000100691b10, _cmd=<unavailable>, anEvent=0x000000010057e8c0) at nsAppShell.mm:165:3 [opt]
    frame #10: 0x00000001ad53ad80 AppKit`-[NSApplication _handleEvent:] + 60
    frame #11: 0x00000001ad1b00fc AppKit`-[NSApplication run] + 500
    frame #12: 0x0000000111f8a374 XUL`nsAppShell::Run(this=0x000000010052b600) at nsAppShell.mm:801:5 [opt]
    frame #13: 0x00000001130dc504 XUL`nsAppStartup::Run(this=0x00000001074dff60) at nsAppStartup.cpp:295:30 [opt]
    frame #14: 0x00000001131a8008 XUL`XREMain::XRE_mainRun(this=0x000000016fdfec50) at nsAppRunner.cpp:5700:22 [opt]
    frame #15: 0x00000001131a8638 XUL`XREMain::XRE_main(this=0x000000016fdfec50, argc=5, argv=0x000000016fdff538, aConfig=<unavailable>) at nsAppRunner.cpp:5894:8 [opt]
    frame #16: 0x00000001131a89d4 XUL`XRE_main(argc=<unavailable>, argv=<unavailable>, aConfig=<unavailable>) at nsAppRunner.cpp:5962:21 [opt]
    frame #17: 0x0000000100000bc8 firefox`main [inlined] do_main(argc=<unavailable>, argv=0x000000016fdff538, envp=<unavailable>) at nsBrowserApp.cpp:227:22 [opt]
    frame #18: 0x0000000100000a14 firefox`main(argc=<unavailable>, argv=<unavailable>, envp=<unavailable>) at nsBrowserApp.cpp:414:16 [opt]
    frame #19: 0x0000000235827d68 dyld`start + 2312
```
In some cases, the main thread looks like this when these crashes happen:

```
Thread 0, Name: MainThread
Frame  Module  Signature  Source
0  libsystem_kernel.dylib  mach_msg2_trap  None
1  libsystem_kernel.dylib  mach_msg2_internal  None
Ø 2  None  @0xbe720001a01cc1c8  None
3  libsystem_kernel.dylib  mach_msg  None
Ø 4  None  @0xfe7d8001a02ea23c  None
5  CoreFoundation  __CFRunLoopRun  None
Ø 6  None  @0x4b648001a994d1ec  None
7  HIToolbox  RunCurrentEventLoopInMode  None
Ø 8  None  @0xd1700001a994cd5c  None
9  AppKit  -[NSApplicationFunctionRowController _teardown]  None
```

But these instances are all corrupt and truncated. From setting a breakpoint on `-[NSApplicationFunctionRowController _teardown]` in `lldb`, I think it's most likely that these are cases of Firefox getting or losing the application focus. For example:

```
* thread #1, name = 'MainThread', queue = 'com.apple.main-thread', stop reason = breakpoint 5.1
  * frame #0: 0x00000001ad1c13f0 AppKit`-[NSApplicationFunctionRowController _teardown]
    frame #1: 0x00000001ad1c1214 AppKit`-[NSApplicationFunctionRowController _sync] + 500
    frame #2: 0x00000001a9f75274 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
    frame #3: 0x00000001aa012b2c CoreFoundation`___CFXRegistrationPost_block_invoke + 88
    frame #4: 0x00000001aa012a74 CoreFoundation`_CFXRegistrationPost + 440
    frame #5: 0x00000001a9f453b0 CoreFoundation`_CFXNotificationPost + 708
    frame #6: 0x00000001aae2bdd8 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    frame #7: 0x00000001ad311140 AppKit`-[NSApplication _handleActivatedEvent:] + 1376
    frame #8: 0x00000001ad2ea0c4 AppKit`-[NSApplication(NSEvent) sendEvent:] + 2164
    frame #9: 0x0000000111f892cc XUL`-[GeckoNSApplication sendEvent:](self=0x0000000100691b10, _cmd=<unavailable>, anEvent=0x00000001662a7d00) at nsAppShell.mm:165:3 [opt]
    frame #10: 0x00000001ad53ad80 AppKit`-[NSApplication _handleEvent:] + 60
    frame #11: 0x00000001ad1b00fc AppKit`-[NSApplication run] + 500
    frame #12: 0x0000000111f8a374 XUL`nsAppShell::Run(this=0x000000010052b600) at nsAppShell.mm:801:5 [opt]
    frame #13: 0x00000001130dc504 XUL`nsAppStartup::Run(this=0x00000001074dff60) at nsAppStartup.cpp:295:30 [opt]
    frame #14: 0x00000001131a8008 XUL`XREMain::XRE_mainRun(this=0x000000016fdfec50) at nsAppRunner.cpp:5700:22 [opt]
    frame #15: 0x00000001131a8638 XUL`XREMain::XRE_main(this=0x000000016fdfec50, argc=5, argv=0x000000016fdff538, aConfig=<unavailable>) at nsAppRunner.cpp:5894:8 [opt]
    frame #16: 0x00000001131a89d4 XUL`XRE_main(argc=<unavailable>, argv=<unavailable>, aConfig=<unavailable>) at nsAppRunner.cpp:5962:21 [opt]
    frame #17: 0x0000000100000bc8 firefox`main [inlined] do_main(argc=<unavailable>, argv=0x000000016fdff538, envp=<unavailable>) at nsBrowserApp.cpp:227:22 [opt]
    frame #18: 0x0000000100000a14 firefox`main(argc=<unavailable>, argv=<unavailable>, envp=<unavailable>) at nsBrowserApp.cpp:414:16 [opt]
    frame #19: 0x0000000235827d68 dyld`start + 2312
```

or

```
* thread #1, name = 'MainThread', queue = 'com.apple.main-thread', stop reason = breakpoint 5.1
  * frame #0: 0x00000001ad1c13f0 AppKit`-[NSApplicationFunctionRowController _teardown]
    frame #1: 0x00000001ad1c1214 AppKit`-[NSApplicationFunctionRowController _sync] + 500
    frame #2: 0x00000001a9f75274 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
    frame #3: 0x00000001aa012b2c CoreFoundation`___CFXRegistrationPost_block_invoke + 88
    frame #4: 0x00000001aa012a74 CoreFoundation`_CFXRegistrationPost + 440
    frame #5: 0x00000001a9f453b0 CoreFoundation`_CFXNotificationPost + 708
    frame #6: 0x00000001aae2bdd8 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 88
    frame #7: 0x00000001ad319ec0 AppKit`-[NSApplication _handleDeactivateEvent:] + 748
    frame #8: 0x00000001ad2e9d30 AppKit`-[NSApplication(NSEvent) sendEvent:] + 1248
    frame #9: 0x0000000111f892cc XUL`-[GeckoNSApplication sendEvent:](self=0x0000000100691b10, _cmd=<unavailable>, anEvent=0x000000010057e8c0) at nsAppShell.mm:165:3 [opt]
    frame #10: 0x00000001ad53ad80 AppKit`-[NSApplication _handleEvent:] + 60
    frame #11: 0x00000001ad1b00fc AppKit`-[NSApplication run] + 500
    frame #12: 0x0000000111f8a374 XUL`nsAppShell::Run(this=0x000000010052b600) at nsAppShell.mm:801:5 [opt]
    frame #13: 0x00000001130dc504 XUL`nsAppStartup::Run(this=0x00000001074dff60) at nsAppStartup.cpp:295:30 [opt]
    frame #14: 0x00000001131a8008 XUL`XREMain::XRE_mainRun(this=0x000000016fdfec50) at nsAppRunner.cpp:5700:22 [opt]
    frame #15: 0x00000001131a8638 XUL`XREMain::XRE_main(this=0x000000016fdfec50, argc=5, argv=0x000000016fdff538, aConfig=<unavailable>) at nsAppRunner.cpp:5894:8 [opt]
    frame #16: 0x00000001131a89d4 XUL`XRE_main(argc=<unavailable>, argv=<unavailable>, aConfig=<unavailable>) at nsAppRunner.cpp:5962:21 [opt]
    frame #17: 0x0000000100000bc8 firefox`main [inlined] do_main(argc=<unavailable>, argv=0x000000016fdff538, envp=<unavailable>) at nsBrowserApp.cpp:227:22 [opt]
    frame #18: 0x0000000100000a14 firefox`main(argc=<unavailable>, argv=<unavailable>, envp=<unavailable>) at nsBrowserApp.cpp:414:16 [opt]
    frame #19: 0x0000000235827d68 dyld`start + 2312
```

Edit: I think the main thread stacks for this bug's crash reports on Apple Silicon are simply spurious. They can be ignored.

Back to Bug 1780938 Comment 7