Bug 217689

Summary: Crash when disconnecting gamepad in Safari 14.0.1
Product: WebKit Reporter: Justin Uberti <juberti>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: beidson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac   
OS: macOS 10.15   
Attachments:
Description Flags
Safari crashdump none

Description Justin Uberti 2020-10-13 17:51:23 PDT
Created attachment 411288 [details]
Safari crashdump

Using Safari 14.0 with macOS 10.15.7

Repro steps:
1) plug in Stadia gamepad over USB
2) go to http://html5gamepad.com
3) disconnect gamepad
4) Safari crashes
Comment 1 Radar WebKit Bug Importer 2020-10-14 12:59:49 PDT
<rdar://problem/70304828>
Comment 2 Justin Uberti 2020-11-18 09:53:41 PST
Repros on ToT with minibrowser:

ASSERTION FAILED: removedGamepad
./platform/gamepad/cocoa/GameControllerGamepadProvider.mm(145) : void WebCore::GameControllerGamepadProvider::controllerDidDisconnect(GCController *)
1   0x135539609 WTFCrash
2   0x11925ce1b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x11adcc54f WebCore::GameControllerGamepadProvider::controllerDidDisconnect(GCController*)
4   0x11adcd1f9 invocation function for block in WebCore::GameControllerGamepadProvider::startMonitoringGamepads(WebCore::GamepadProviderClient&)
5   0x7fff3bac3784 -[__NSObserver _doit:]
6   0x7fff3944a80f __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
7   0x7fff3944a7a3 ___CFXRegistrationPost1_block_invoke
8   0x7fff3944a718 _CFXRegistrationPost1
9   0x7fff3944a384 ___CFXNotificationPost_block_invoke
10  0x7fff3941a4fd -[_CFXNotificationRegistrar find:object:observer:enumerator:]
11  0x7fff394199a9 _CFXNotificationPost
12  0x7fff3ba97786 -[NSNotificationCenter postNotificationName:object:userInfo:]
13  0x7fff3bf1b609 threadRunLoopSourceCallback
14  0x7fff732cc6c4 _dispatch_call_block_and_release
15  0x7fff732cd658 _dispatch_client_callout
16  0x7fff732d8cab _dispatch_main_queue_callback_4CF
17  0x7fff39493e81 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
18  0x7fff39453c87 __CFRunLoopRun
19  0x7fff39452e3e CFRunLoopRunSpecific
20  0x7fff3807fabd RunCurrentEventLoopInMode
21  0x7fff3807f7d5 ReceiveNextEventCommon
22  0x7fff3807f579 _BlockUntilNextEventMatchingListInModeWithFilter
23  0x7fff366c5039 _DPSNextEvent
24  0x7fff366c3880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
25  0x7fff366b558e -[NSApplication run]
26  0x7fff36687396 NSApplicationMain
27  0x1013116f9 main
28  0x7fff73326cc9 start
Comment 3 Brady Eidson 2024-03-29 09:33:25 PDT
I cannot reproduce this with current ToT.