diff --git a/.changelog/Release_0-74-1.md b/.changelog/Release_0-74-1.md new file mode 100644 index 0000000000..4f8814163f --- /dev/null +++ b/.changelog/Release_0-74-1.md @@ -0,0 +1,14 @@ +# Release Changelog + + +## [0.74.1] - 2024-12-26 - Hotfix + + +### Changes +- Rate pitch algorithm crashes have more informative messages - [45dab2e](../../../commit/45dab2ef0aa972e6661315c09d8a7b9786d19b6a) +- Til' Death (C++ Wheel) search behavior should always try to keep you on the hovered song unless you have a result - [292e458](../../../commit/292e4580df401f0600caf6f456509ac8f4c93471) + +### Fixed +- Rare crashes due to etar parallelization - [012ebbf](../../../commit/012ebbf9406e638e47ed1dfa624ac2c1cb0de12d) +- Random crashes due to DelFileSet - [5e4031e](../../../commit/5e4031efbd8d062b23000696675be0165357a7eb) [805992e](../../../commit/805992e2673991d7a19bb108a40c3bb5aa265a29) +- Til' Death rate changes in PlayerOptions not affecting WifeTwirl - [7419c3f](../../../commit/7419c3f956aa73f957be2250a48d40666814f9d8) [a97aaf6](../../../commit/a97aaf67c2460cdc3bd1d219d223d90b7839b973) \ No newline at end of file diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index b6706a5f6a..030e297e0a 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -52,7 +52,7 @@ jobs: - name: Upload Binary if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "Etterna - Linux x64" path: '${{github.workspace}}/main/build/*.tar.gz' @@ -78,9 +78,9 @@ jobs: - name: Upload Symbols to action artifacts if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Etterna Symbols - ${{github.sha}} + name: Etterna Symbols Linux x64 - ${{github.sha}} path: '${{github.workspace}}/sym/EtternaSymbolsUploadDir' - name: Get version for CrashServer Upload @@ -129,6 +129,11 @@ jobs: with: python-version: '3.12' + - name: Update CPack Environment + if: ${{matrix.cfg.dist}} + run: | + echo "ETT_MAC_SYS_NAME=M1" >> $GITHUB_ENV + - name: Generate CMake run: mkdir main/build && cd main/build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_CRASHPAD=OFF -G Ninja .. @@ -141,7 +146,7 @@ jobs: - name: Upload Binary if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "Etterna - macOS aarch64" path: '${{github.workspace}}/main/build/*.dmg' @@ -168,9 +173,9 @@ jobs: - name: Upload Symbols to action artifacts if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Etterna Symbols - ${{github.sha}} + name: Etterna Symbols Mac aarch64 - ${{github.sha}} path: '${{github.workspace}}/main/EtternaSymbolsUploadDir' - name: Get version for CrashServer Upload @@ -226,6 +231,11 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.8' + + - name: Update CPack Environment + if: ${{matrix.cfg.dist}} + run: | + echo "ETT_MAC_SYS_NAME=Darwin-x64" >> $GITHUB_ENV - name: Generate CMake run: mkdir main/build && cd main/build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja .. @@ -239,7 +249,7 @@ jobs: - name: Upload Binary if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "Etterna - macOS x64" path: '${{github.workspace}}/main/build/*.dmg' @@ -266,9 +276,9 @@ jobs: - name: Upload Symbols to action artifacts if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Etterna Symbols - ${{github.sha}} + name: Etterna Symbols Mac x64 - ${{github.sha}} path: '${{github.workspace}}/main/EtternaSymbolsUploadDir' - name: Get version for CrashServer Upload @@ -314,6 +324,11 @@ jobs: - name: Install homebrew packages run: brew install cmake nasm ninja && brew tap etternagame/etterna && brew update && HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install etternagame/etterna/openssl@1.1_osx_high_sierra + - name: Update CPack Environment + if: ${{matrix.cfg.dist}} + run: | + echo "ETT_MAC_SYS_NAME=High-Sierra" >> $GITHUB_ENV + - name: Generate CMake run: mkdir main/build && cd main/build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1_osx_high_sierra -DWITH_CRASHPAD=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja .. @@ -326,7 +341,7 @@ jobs: - name: Upload Binary if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "Etterna - OSX High Sierra (Legacy)" path: '${{github.workspace}}/main/build/*.dmg' @@ -353,9 +368,9 @@ jobs: - name: Upload Symbols to action artifacts if: ${{matrix.cfg.dist}} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Etterna Symbols - ${{github.sha}} + name: Etterna Symbols Mac HighSierra - ${{github.sha}} path: '${{github.workspace}}/main/EtternaSymbolsUploadDir' - name: Get version for CrashServer Upload @@ -449,7 +464,7 @@ jobs: run: cd main/build && cpack - name: Upload Binary - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "Etterna - Windows ${{matrix.cfg.name}}" path: '${{github.workspace}}/main/build/*.exe' @@ -468,9 +483,9 @@ jobs: run: cd main && python ${{github.workspace}}/main/.ci/prepare_symbols.py - name: Upload Symbols to action artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Etterna Symbols - ${{github.sha}} + name: Etterna Symbols win${{matrix.cfg.name}} - ${{github.sha}} path: '${{github.workspace}}/main/EtternaSymbolsUploadDir' - name: Get version for CrashServer Upload @@ -486,5 +501,4 @@ jobs: uses: softprops/action-gh-release@v1 if: ${{ github.event_name == 'release' && github.event.action == 'published' }} with: - files: | - ${{github.workspace}}/main/build/*.exe + files: ${{github.workspace}}\main\build\*.exe diff --git a/CMake/Helpers/CPackSetup.cmake b/CMake/Helpers/CPackSetup.cmake index 103bcbab9c..7074180185 100644 --- a/CMake/Helpers/CPackSetup.cmake +++ b/CMake/Helpers/CPackSetup.cmake @@ -69,6 +69,10 @@ elseif(APPLE) # Workaround XProtect race condition for "hdiutil create" for MacOS 13 set(CPACK_COMMAND_HDIUTIL "${CMAKE_CURRENT_LIST_DIR}/hdiutil_repeat.sh") + if(DEFINED ENV{ETT_MAC_SYS_NAME}) + set(CPACK_SYSTEM_NAME "$ENV{ETT_MAC_SYS_NAME}") + endif() + install(TARGETS Etterna COMPONENT Etterna DESTINATION Etterna) if(WITH_CRASHPAD AND TARGET crashpad) install(FILES ${PROJECT_BINARY_DIR}/gn_crashpad/crashpad_handler diff --git a/CMakeLists.txt b/CMakeLists.txt index 51d493cd3e..a2349fb792 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") # PROJECT WIDE SETUP project(Etterna - VERSION 0.74.0 + VERSION 0.74.1 HOMEPAGE_URL https://github.com/etternagame/etterna/ LANGUAGES C CXX ASM) diff --git a/Data/splash.png b/Data/splash.png index e0d89c6f94..73973227a1 100644 Binary files a/Data/splash.png and b/Data/splash.png differ diff --git a/Themes/Til Death/BGAnimations/ScreenPlayerOptions overlay.lua b/Themes/Til Death/BGAnimations/ScreenPlayerOptions overlay.lua index 241f02d89c..9d4fddcba1 100644 --- a/Themes/Til Death/BGAnimations/ScreenPlayerOptions overlay.lua +++ b/Themes/Til Death/BGAnimations/ScreenPlayerOptions overlay.lua @@ -22,7 +22,7 @@ local AvatarYP1 = 44 local bpms = {} if GAMESTATE:GetCurrentSong() then - bpms = GAMESTATE:GetCurrentSong():GetDisplayBpms(false) + bpms = GAMESTATE:GetCurrentSong():GetDisplayBpms(true) bpms[1] = math.round(bpms[1]) bpms[2] = math.round(bpms[2]) end @@ -114,6 +114,9 @@ t[#t + 1] = RateListOptionChangedMessageCommand = function(self, params) self:finishtweening():sleep(0.01):queuecommand("DelayedThing") end, + RateListOptionSavedMessageCommand = function(self, params) + self:finishtweening():sleep(0.01):queuecommand("DelayedThing") + end, DelayedThingCommand = function(self) self:playcommand("SpeedChoiceChanged", {pn = PLAYER_1, mode = self.mode, speed = self.speed}) end, diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua index 80f151c6f8..802baaec7e 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua @@ -359,6 +359,9 @@ t[#t + 1] = UIElements.TextToolTip(1, 1, "Common Large") .. { capWideScale(get43size(360), 360) / capWideScale(get43size(0.45), 0.45) ) end, + CurrentRateChangedMessageCommand = function(self) + self:queuecommand("MintyFresh") + end, MintyFreshCommand = function(self) if song then self:settext(getCurRateDisplayString()) diff --git a/Themes/_fallback/Graphics/Common splash.png b/Themes/_fallback/Graphics/Common splash.png index e0d89c6f94..73973227a1 100644 Binary files a/Themes/_fallback/Graphics/Common splash.png and b/Themes/_fallback/Graphics/Common splash.png differ diff --git a/Themes/_fallback/Scripts/02 ThemePrefs.lua b/Themes/_fallback/Scripts/02 ThemePrefs.lua index 07d313b4b2..936f026008 100644 --- a/Themes/_fallback/Scripts/02 ThemePrefs.lua +++ b/Themes/_fallback/Scripts/02 ThemePrefs.lua @@ -257,7 +257,7 @@ function RateList() LayoutType = "ShowAllInRow", SelectType = "SelectOne", OneChoiceForAllPlayers = false, - ExportOnChange = false, + ExportOnChange = true, ExportOnCancel = true, Choices = ratelist, LoadSelections = function(self, list, pn) @@ -280,6 +280,8 @@ function RateList() GAMESTATE:GetSongOptionsObject("ModsLevel_Preferred"):MusicRate(r) GAMESTATE:GetSongOptionsObject("ModsLevel_Song"):MusicRate(r) GAMESTATE:GetSongOptionsObject("ModsLevel_Current"):MusicRate(r) + MESSAGEMAN:Broadcast("RateListOptionSaved", {rate = getCurRateValue()}) + MESSAGEMAN:Broadcast("CurrentRateChanged") break end end diff --git a/src/Etterna/Actor/Menus/MusicWheel.cpp b/src/Etterna/Actor/Menus/MusicWheel.cpp index 432c41e515..6b921f56eb 100644 --- a/src/Etterna/Actor/Menus/MusicWheel.cpp +++ b/src/Etterna/Actor/Menus/MusicWheel.cpp @@ -203,7 +203,7 @@ MusicWheel::ReloadSongList(bool searching, const std::string& findme) RebuildWheelItems(); SelectSection(m_sExpandedSectionName); SetOpenSection(m_sExpandedSectionName); - ChangeMusic(1); + SelectSongOrCourse(); SCREENMAN->PostMessageToTopScreen(SM_SongChanged, 0.35F); return; } diff --git a/src/Etterna/Models/Misc/TimingData.cpp b/src/Etterna/Models/Misc/TimingData.cpp index fac2e640a6..c32545f83c 100644 --- a/src/Etterna/Models/Misc/TimingData.cpp +++ b/src/Etterna/Models/Misc/TimingData.cpp @@ -1455,7 +1455,7 @@ TimingData::BuildAndGetEtar(int lastrow) std::iota(ElapsedTimesAtAllRows.begin(), ElapsedTimesAtAllRows.end(), 0); // just dont parallelize at all if it probably wont help anyways - if (lastrow < 128) { + if (lastrow < 100000) { for (auto r = 0; r <= lastrow; ++r) { ElapsedTimesAtAllRows[r] = GetElapsedTimeFromBeatNoOffset(NoteRowToBeat(r)); diff --git a/src/Etterna/Singletons/GameState.h b/src/Etterna/Singletons/GameState.h index c0a55c4253..91f90e857e 100644 --- a/src/Etterna/Singletons/GameState.h +++ b/src/Etterna/Singletons/GameState.h @@ -204,7 +204,7 @@ class GameState bool m_bLoadingNextSong; [[nodiscard]] auto GetLoadingCourseSongIndex() const -> int; - static auto GetEtternaVersion() -> std::string { return "0.74.0"; } + static auto GetEtternaVersion() -> std::string { return "0.74.1"; } /* is this the best place for this? it's not exactly a pref, and we * shouldn't be copying and pasting these values everywhere as needed j1-j4 diff --git a/src/RageUtil/Sound/RageSoundReader_SpeedChange_Good.cpp b/src/RageUtil/Sound/RageSoundReader_SpeedChange_Good.cpp index 90046a36af..b9262f79e3 100644 --- a/src/RageUtil/Sound/RageSoundReader_SpeedChange_Good.cpp +++ b/src/RageUtil/Sound/RageSoundReader_SpeedChange_Good.cpp @@ -471,8 +471,12 @@ RageSoundReader_SpeedChange_Good::Read(float* pBuf, int iFrames) m_bDraining = (m_ReadAhead.Frames() > 0); } - ASSERT(m_ReadAhead.iReadPosition < m_ReadAhead.iWritePosition); - ASSERT(m_Mixed.iReadPosition < m_Mixed.iWritePosition); + ASSERT_M(m_ReadAhead.iReadPosition < m_ReadAhead.iWritePosition, + "RA readpos < writepos. to ignore this, set preference " + "StepmaniaUnpitchRates=1"); + ASSERT_M(m_Mixed.iReadPosition < m_Mixed.iWritePosition, + "M readpos < writepos. to ignore this, set preference " + "StepmaniaUnpitchRates=1"); if (iFramesWrote == 0) { return END_OF_FILE; diff --git a/src/RageUtil/Utils/RageUtil_FileDB.cpp b/src/RageUtil/Utils/RageUtil_FileDB.cpp index 845c9c24b8..13bb100159 100644 --- a/src/RageUtil/Utils/RageUtil_FileDB.cpp +++ b/src/RageUtil/Utils/RageUtil_FileDB.cpp @@ -384,22 +384,15 @@ FilenameDB::GetFileSet(const std::string& sDir_, bool bCreate) FileSet* pParent = GetFileSet(sParent); if (pParent != nullptr) { set::iterator it = pParent->files.find(File(Basename(sDir))); - if (it != pParent->files.end()) { + if (it != pParent->files.end()) pParentDirp = const_cast(&it->dirp); - - if (pParentDirp != nullptr) { - // vomit - pRet->dirpers.insert(const_cast(&(*it))); - } - } } } else { m_Mutex.Lock(); } - if (pParentDirp != nullptr) { + if (pParentDirp != nullptr) *pParentDirp = pRet; - } pRet->age.Touch(); pRet->m_bFilled = true; @@ -482,12 +475,19 @@ FilenameDB::DelFileSet(map::iterator dir) FileSet* fs = dir->second; - for (auto& file : fs->dirpers) { - // just in case - if (file->dirp == fs) - file->dirp = nullptr; + /* Remove any stale dirp pointers. */ + for (map::iterator it = dirs.begin(); + it != dirs.end(); + ++it) { + FileSet* Clean = it->second; + for (set::iterator f = Clean->files.begin(); + f != Clean->files.end(); + ++f) { + File& ff = (File&)*f; + if (ff.dirp == fs) + ff.dirp = nullptr; + } } - fs->dirpers.clear(); delete fs; dirs.erase(dir); @@ -513,12 +513,11 @@ FilenameDB::DelFile(const std::string& sPath) } void -FilenameDB::FlushDirCache(const std::string& sDir) +FilenameDB::FlushDirCache(const std::string& /* sDir */) { FileSet* pFileSet = nullptr; m_Mutex.Lock(); -#if 0 for (;;) { if (dirs.empty()) break; @@ -535,30 +534,41 @@ FilenameDB::FlushDirCache(const std::string& sDir) m_Mutex.Wait(); delete pFileSet; } -#endif +#if 0 /* XXX: This is tricky, we want to flush all of the subdirectories of * sDir, but once we unlock the mutex, we basically have to start over. * It's just an optimization though, so it can wait. */ { - auto lower = make_lower(sDir); - auto it = dirs.find(lower); - if (it != dirs.end()) { + if( it != dirs.end() ) + { pFileSet = it->second; - dirs.erase(it); - for (auto& file : pFileSet->dirpers) { - if (file->dirp == pFileSet) { - file->dirp = nullptr; - } - } - while (!pFileSet->m_bFilled) + dirs.erase( it ); + while( !pFileSet->m_bFilled ) m_Mutex.Wait(); delete pFileSet; - } else { - Locator::getLogger()->warn( - "Trying to flush an unknown directory {}.", sDir.c_str()); + + if( sDir != "/" ) + { + std::string sParent = Dirname( sDir ); + if( sParent == "./" ) + sParent = ""; + sParent.MakeLower(); + it = dirs.find( sParent ); + if( it != dirs.end() ) + { + FileSet *pParent = it->second; + set::iterator fileit = pParent->files.find( File(Basename(sDir)) ); + if( fileit != pParent->files.end() ) + fileit->dirp = NULL; + } + } } - } + else + { + Locator::getLogger()->warn( "Trying to flush an unknown directory {}.", sDir.c_str() ); + } +#endif m_Mutex.Unlock(); } diff --git a/src/RageUtil/Utils/RageUtil_FileDB.h b/src/RageUtil/Utils/RageUtil_FileDB.h index bf17554f0c..9cd336def7 100644 --- a/src/RageUtil/Utils/RageUtil_FileDB.h +++ b/src/RageUtil/Utils/RageUtil_FileDB.h @@ -88,9 +88,6 @@ struct FileSet */ bool m_bFilled; - // a list of Files which have dirp set to this FileSet - std::set dirpers{}; - FileSet() { m_bFilled = true; } void GetFilesMatching(const std::string& sBeginning,