Skip to content

Commit

Permalink
Merge pull request #1338 from etternagame/develop
Browse files Browse the repository at this point in the history
0.74.1 merge
  • Loading branch information
poco0317 authored Dec 27, 2024
2 parents 4afe6cd + 5deaa47 commit c70b3a2
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 59 deletions.
14 changes: 14 additions & 0 deletions .changelog/Release_0-74-1.md
Original file line number Diff line number Diff line change
@@ -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)
48 changes: 31 additions & 17 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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 ..

Expand All @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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 ..
Expand All @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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/[email protected]_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/[email protected]_osx_high_sierra -DWITH_CRASHPAD=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja ..

Expand All @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions CMake/Helpers/CPackSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>: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)

Expand Down
Binary file modified Data/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Binary file modified Themes/_fallback/Graphics/Common splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion Themes/_fallback/Scripts/02 ThemePrefs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Menus/MusicWheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Models/Misc/TimingData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Singletons/GameState.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions src/RageUtil/Sound/RageSoundReader_SpeedChange_Good.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
72 changes: 41 additions & 31 deletions src/RageUtil/Utils/RageUtil_FileDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,22 +384,15 @@ FilenameDB::GetFileSet(const std::string& sDir_, bool bCreate)
FileSet* pParent = GetFileSet(sParent);
if (pParent != nullptr) {
set<File>::iterator it = pParent->files.find(File(Basename(sDir)));
if (it != pParent->files.end()) {
if (it != pParent->files.end())
pParentDirp = const_cast<FileSet**>(&it->dirp);

if (pParentDirp != nullptr) {
// vomit
pRet->dirpers.insert(const_cast<File*>(&(*it)));
}
}
}
} else {
m_Mutex.Lock();
}

if (pParentDirp != nullptr) {
if (pParentDirp != nullptr)
*pParentDirp = pRet;
}

pRet->age.Touch();
pRet->m_bFilled = true;
Expand Down Expand Up @@ -482,12 +475,19 @@ FilenameDB::DelFileSet(map<std::string, FileSet*>::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<std::string, FileSet*>::iterator it = dirs.begin();
it != dirs.end();
++it) {
FileSet* Clean = it->second;
for (set<File>::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);
Expand All @@ -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;
Expand All @@ -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<File>::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();
}

Expand Down
Loading

0 comments on commit c70b3a2

Please sign in to comment.