|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by maksims (do not use this acc) Modified:
3 years, 10 months ago CC:
chromium-reviews, denniskempin (chromium), Rick Byers Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected
This cl fixes the problem of a tab being crashed when a gamepad is
suddenly disconnected while being used.
The problem here is that assertion happens because the WebGamepad's
state is not changed to "disconnected".
The error was the following -
[1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)]
Check failed: connected == gamepad.connected.
BUG=681962
Patch Set 1 #
Messages
Total messages: 19 (10 generated)
The CQ bit was checked by maksim.sisov@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [FIX] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. BUG=681962 ========== to ========== [Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. BUG=681962 ==========
Description was changed from ========== [Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. BUG=681962 ========== to ========== [Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. #0 0x7f8f5052d4db base::debug::StackTrace::StackTrace() #1 0x7f8f5052bb1c base::debug::StackTrace::StackTrace() #2 0x7f8f505967af logging::LogMessage::~LogMessage() #3 0x7f8f34d356ef blink::GamepadDispatcher::dispatchDidConnectOrDisconnectGamepad() #4 0x7f8f34d357b5 blink::GamepadDispatcher::didDisconnectGamepad() #5 0x7f8f4aaba7f4 content::GamepadSharedMemoryReader::GamepadDisconnected() #6 0x7f8f4b02d021 device::mojom::GamepadObserverStubDispatch::Accept() #7 0x7f8f4aabb3c3 device::mojom::GamepadObserverStub<>::Accept() #8 0x7f8f50d491a5 mojo::InterfaceEndpointClient::HandleValidatedMessage() #9 0x7f8f50d48b51 mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept() #10 0x7f8f50d467d5 mojo::FilterChain::Accept() #11 0x7f8f50d4aaa1 mojo::InterfaceEndpointClient::HandleIncomingMessage() #12 0x7f8f50d5fc81 mojo::internal::MultiplexRouter::ProcessIncomingMessage() #13 0x7f8f50d5f478 mojo::internal::MultiplexRouter::Accept() #14 0x7f8f50d467d5 mojo::FilterChain::Accept() #15 0x7f8f50d3c375 mojo::Connector::ReadSingleMessage() #16 0x7f8f50d3d009 mojo::Connector::ReadAllAvailableMessages() #17 0x7f8f50d3ce2b mojo::Connector::OnHandleReadyInternal() #18 0x7f8f50d3cd0b mojo::Connector::OnWatcherHandleReady() BUG=681962 ==========
Description was changed from ========== [Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. #0 0x7f8f5052d4db base::debug::StackTrace::StackTrace() #1 0x7f8f5052bb1c base::debug::StackTrace::StackTrace() #2 0x7f8f505967af logging::LogMessage::~LogMessage() #3 0x7f8f34d356ef blink::GamepadDispatcher::dispatchDidConnectOrDisconnectGamepad() #4 0x7f8f34d357b5 blink::GamepadDispatcher::didDisconnectGamepad() #5 0x7f8f4aaba7f4 content::GamepadSharedMemoryReader::GamepadDisconnected() #6 0x7f8f4b02d021 device::mojom::GamepadObserverStubDispatch::Accept() #7 0x7f8f4aabb3c3 device::mojom::GamepadObserverStub<>::Accept() #8 0x7f8f50d491a5 mojo::InterfaceEndpointClient::HandleValidatedMessage() #9 0x7f8f50d48b51 mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept() #10 0x7f8f50d467d5 mojo::FilterChain::Accept() #11 0x7f8f50d4aaa1 mojo::InterfaceEndpointClient::HandleIncomingMessage() #12 0x7f8f50d5fc81 mojo::internal::MultiplexRouter::ProcessIncomingMessage() #13 0x7f8f50d5f478 mojo::internal::MultiplexRouter::Accept() #14 0x7f8f50d467d5 mojo::FilterChain::Accept() #15 0x7f8f50d3c375 mojo::Connector::ReadSingleMessage() #16 0x7f8f50d3d009 mojo::Connector::ReadAllAvailableMessages() #17 0x7f8f50d3ce2b mojo::Connector::OnHandleReadyInternal() #18 0x7f8f50d3cd0b mojo::Connector::OnWatcherHandleReady() BUG=681962 ========== to ========== [Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". The error was the following - [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. BUG=681962 ==========
Description was changed from ========== [Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". The error was the following - [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. BUG=681962 ========== to ========== [Gamepad API] Fix gamepad crash that happens when a gamepad is disconnected This cl fixes the problem of a tab being crashed when a gamepad is suddenly disconnected while being used. The problem here is that assertion happens because the WebGamepad's state is not changed to "disconnected". The error was the following - [1:1:0206/135137.833540:FATAL:GamepadDispatcher.cpp(45)] Check failed: connected == gamepad.connected. BUG=681962 ==========
maksim.sisov@intel.com changed reviewers: + scottmg@chromium.org
Please review
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
scottmg@chromium.org changed reviewers: + bajones@chromium.org
It looks like this should be happening in MapAndSanitizeGamepadData later on typically. I'm going to add Brandon here. I'm wondering if we should change the order of the delivery instead?
On 2017/02/06 18:11:57, scottmg wrote: > It looks like this should be happening in MapAndSanitizeGamepadData later on > typically. > > I'm going to add Brandon here. I'm wondering if we should change the order of > the delivery instead? Are you sure? There are the following lines, which just vanish WebGamepad https://cs.chromium.org/chromium/src/device/gamepad/gamepad_pad_state_provide...
gentle reminder
ping
On 2017/02/16 07:21:43, maksims wrote: > ping Drive by comment here: Thanks for patch, can we get a test as well in device/gamepad/gamepad_provider_unittest.cc?
On 2017/02/16 23:54:41, scheib wrote: > On 2017/02/16 07:21:43, maksims wrote: > > ping > > Drive by comment here: Thanks for patch, can we get a test as well in > device/gamepad/gamepad_provider_unittest.cc? Hi Maksims, Thanks for the change. Do you know why gamepad.connected is still true? I would have thought OnGamepadDisconnected() would have been called? Doug
On 2017/02/17 03:17:49, dougt wrote: > On 2017/02/16 23:54:41, scheib wrote: > > On 2017/02/16 07:21:43, maksims wrote: > > > ping > > > > Drive by comment here: Thanks for patch, can we get a test as well in > > device/gamepad/gamepad_provider_unittest.cc? > > > Hi Maksims, > > Thanks for the change. Do you know why gamepad.connected is still true? I would > have thought OnGamepadDisconnected() would have been called? > > Doug Yes, it is. But nothing changes the state of the gamepad object in the chain call. Finally, assertion happens - https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/gamepa...
On 2017/02/06 18:11:57, scottmg wrote: > It looks like this should be happening in MapAndSanitizeGamepadData later on > typically. > > I'm going to add Brandon here. I'm wondering if we should change the order of > the delivery instead? It won't because the call to OnGamepadConnectionChange is synchronous. And assertion happens just before MapAndSanitizeGamepadData is called. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
