Mailing List Archive

[MythTV/mythtv] dc5035: Fix crash in thread destruction.
Branch: refs/heads/master
Commit: dc50358b478d12621e30d01f8abe5e7aeef9571b
Author: David Hampton <>
Date: 2021-02-04 (Thu, 04 Feb 2021)

Changed paths:
M mythtv/libs/libmythbase/mthread.cpp

Log Message:
Fix crash in thread destruction.

This crash was introduced by the std::chrono changes in commit a9d53f3230.

The problem occurs because 1) std::chrono is based on an int64_t where
QThread::wait expects an uint64_t, and 2) newer versions of Qt treat
ULONG_MAX as a special value. The fix is to map the maximum std::chrono
value to ULONG_MAX. This commit also protects from negative numbers being
passed into the wait call and having them be inadvertently mapped to very
large numbers.

Closes #312.

mythtv-commits mailing list