From bc2c932f920c8039d7c8fef91ee4f38191810861 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 2 Jan 2019 20:58:39 -0800 Subject: [PATCH] Fix MotorSafety deadlock (#1526) Some instances of StopMotor (most notably DifferentialDrive) call Feed(), which deadlocks due to Check() holding the same lock. Fixes #1525. --- wpilibc/src/main/native/cpp/MotorSafety.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/wpilibc/src/main/native/cpp/MotorSafety.cpp b/wpilibc/src/main/native/cpp/MotorSafety.cpp index 88ccee76c0d..aff85d8cefa 100644 --- a/wpilibc/src/main/native/cpp/MotorSafety.cpp +++ b/wpilibc/src/main/native/cpp/MotorSafety.cpp @@ -93,7 +93,6 @@ void MotorSafety::Check() { return; } - std::lock_guard lock(m_thisMutex); if (stopTime < Timer::GetFPGATimestamp()) { wpi::SmallString<128> buf; wpi::raw_svector_ostream desc(buf);