View Issue Details

IDProjectCategoryView StatusLast Update
0001265OpenMPTGeneralpublic2019-09-23 07:28
Reporternyanpasu64 Assigned Tomanx  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Platformx64OSWindows 
Product VersionOpenMPT 1.29.00.* (current testing) 
Target VersionOpenMPT 1.29 / libopenmpt 0.5 (goals)Fixed in VersionOpenMPT 1.29.00.* (current testing) 
Summary0001265: Failed assertion in debug builds: SettingsContainer::ReadSetting() called by update checker thread, not main
Description

When I launch OpenMPT git master, the program settings pops up without me pressing any keys, followed by an assertion error modal dialog:

SettingValue SettingsContainer::ReadSetting(const SettingPath &path, const SettingValue &def) const calls ASSERT(theApp.InGuiThread());.

However this assertion fails because the function is called by CUpdateCheck::ThreadFunc and not the main thread:

>   OpenMPT.exe!SettingsContainer::ReadSetting(const SettingPath & path, const SettingValue & def) Line 140 C++
    OpenMPT.exe!SettingsContainer::Read<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >(const SettingPath & path, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & def) Line 466  C++
    OpenMPT.exe!Setting<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >::operator std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >() Line 576 C++
    OpenMPT.exe!TrackerSettings::GetSoundDeviceIdentifier() Line 971    C++
    OpenMPT.exe!CUpdateCheck::GetStatisticsDataV3(const CUpdateCheck::Settings & settings) Line 281 C++
    OpenMPT.exe!CUpdateCheck::SearchUpdate(const CUpdateCheck::Settings & settings) Line 391    C++
    OpenMPT.exe!CUpdateCheck::CheckForUpdate(const CUpdateCheck::Settings & settings, const CUpdateCheck::Context & context) Line 454   C++
    OpenMPT.exe!CUpdateCheck::ThreadFunc::operator()() Line 242 C++
Steps To Reproduce
  • Clone OpenMPT from Git
  • Open build\vs2019win10\OpenMPT.sln in VS2019
  • Run the program in debug mode
Additional Information

I disabled Spectre mitigation and upgraded SDK to 17763.

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)1f2968497e153ff088a9c46afd42bc9bf6aacc3d

Activities

nyanpasu64

nyanpasu64

2019-09-23 07:10

reporter   ~0004090

I removed the ASSERT from ReadSetting(), but the program hit other ASSERTs in the same settings class. I managed to make the program run by editing mptrack\Settings.cpp and adding #define ASSERT(...), stubbing out all assertions in the .cpp file.

manx

manx

2019-09-23 07:28

administrator   ~0004091

Fixed in r12083.

Issue History

Date Modified Username Field Change
2019-09-23 07:03 nyanpasu64 New Issue
2019-09-23 07:05 manx Assigned To => manx
2019-09-23 07:05 manx Status new => assigned
2019-09-23 07:06 manx Target Version => OpenMPT 1.29 / libopenmpt 0.5 (goals)
2019-09-23 07:10 nyanpasu64 Note Added: 0004090
2019-09-23 07:28 manx Status assigned => resolved
2019-09-23 07:28 manx Resolution open => fixed
2019-09-23 07:28 manx Fixed in Version => OpenMPT 1.29.00.* (current testing)
2019-09-23 07:28 manx Note Added: 0004091