Skip to content

Commit c6c586f

Browse files
authored
Merge pull request #290 from winnerspiros/copilot/fix-black-screen-vulkan-issue-again
fix(android-vulkan): bump osu-framework to 2026.502.3; prevent duplicate native crash dumps
2 parents 1ccc0b9 + bddb5d9 commit c6c586f

4 files changed

Lines changed: 34 additions & 4 deletions

File tree

osu.Android.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
</PropertyGroup>
100100

101101
<ItemGroup>
102-
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.502.1" />
102+
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.502.3" />
103103
<!-- `ppy.osu.Framework.NativeLibs` is a transitive dependency of `ppy.osu.Framework`
104104
that ships desktop-only natives (Linux/macOS/Windows) under `runtimes/<rid>/native/`
105105
— including a bare Linux `libbass.so`/`libbass_fx.so`/`libbassmix.so` for linux-arm64.

osu.Android/Native/crash_handler.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ volatile sig_atomic_t g_installed = 0;
104104
// the previous handler instead of recursing.
105105
volatile sig_atomic_t g_inHandler = 0;
106106

107+
// Permanent "dump written" latch. Set to 1 the first time we successfully
108+
// begin writing a dump; never reset. Prevents a second full dump being
109+
// written if the crash handler is somehow re-invoked in the same process
110+
// lifetime (e.g. Mono re-raises SIGSEGV via tgkill after our handler chains
111+
// to it, and our handler gets re-installed between the two deliveries).
112+
// Unlike g_inHandler this is intentionally NOT cleared before the re-raise.
113+
volatile sig_atomic_t g_dumpWritten = 0;
114+
107115
// ----------------------------------------------------------------------------
108116
// Async-signal-safe formatters (no malloc, no stdio, no locale).
109117
// ----------------------------------------------------------------------------
@@ -983,6 +991,28 @@ static void crashHandler(int sig, siginfo_t* info, void* ucontext) {
983991
}
984992
g_inHandler = 1;
985993

994+
// Duplicate-dump guard. If we already wrote a dump for this process
995+
// lifetime (e.g. the handler was re-invoked after Mono re-raised the
996+
// signal), skip the dump but still chain to the previous handler so the
997+
// system tombstone is produced. Unlike g_inHandler this latch is never
998+
// cleared — one dump per crash, not one dump per signal delivery.
999+
if (g_dumpWritten) {
1000+
bool restored = false;
1001+
for (size_t i = 0; i < kNumSignals; ++i) {
1002+
if (kSignals[i] == sig) {
1003+
restored = (sigaction(sig, &g_prevHandlers[i], nullptr) == 0);
1004+
break;
1005+
}
1006+
}
1007+
// If sigaction failed we cannot chain cleanly — fall back to default
1008+
// disposition so the process at least terminates and debuggerd runs.
1009+
if (!restored) signal(sig, SIG_DFL);
1010+
g_inHandler = 0;
1011+
raise(sig);
1012+
return;
1013+
}
1014+
g_dumpWritten = 1;
1015+
9861016
// Open the dump file (append). If g_logPath is empty we still log to logcat.
9871017
//
9881018
// Pre-rotate runaway: if the existing log is more than 4× the soft cap

osu.Game/osu.Game.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3939
</PackageReference>
4040
<PackageReference Include="Realm" Version="20.1.0" />
41-
<PackageReference Include="ppy.osu.Framework" Version="2026.502.1" />
41+
<PackageReference Include="ppy.osu.Framework" Version="2026.502.3" />
4242
<!--
4343
Explicitly pin `ppy.Veldrid.SPIRV` to the winnerspiros fork build that
44-
`ppy.osu.Framework 2026.502.1` was compiled against. This version is the only
44+
`ppy.osu.Framework 2026.502.3` was compiled against. This version is the only
4545
one whose `runtimes/android-arm64/native/libveldrid-spirv.so` is aligned to 16 KB
4646
pages (required by Android 16+). It lives only as a release asset on
4747
<https://github.com/winnerspiros/veldrid-spirv/releases/tag/1.0> and is vendored

osu.iOS.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
3434
</PropertyGroup>
3535
<ItemGroup>
36-
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.502.1" />
36+
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.502.3" />
3737
</ItemGroup>
3838
</Project>

0 commit comments

Comments
 (0)