forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Run `ExecutableProject` 2. Go to `Faulty` and change the string logged by `Console.WriteLine` Expectation: Console outputs new string Actual: Application dies with Unhandled exception. System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B) at osu.Game.Overlays.Profile.Faulty.<>c.<Method>b__0_0(Model s) at osu.Game.Overlays.Profile.Faulty.Method() at Program.<Main>$(String[] args) in /Users/salman/Projects/osu/ExecutableProject/Program.cs:line 9
- Loading branch information
1 parent
5651072
commit 5d56098
Showing
5 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\osu.Game\osu.Game.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// See https://aka.ms/new-console-template for more information | ||
|
||
using osu.Game.Overlays.Profile; | ||
|
||
Faulty faulty = new Faulty(); | ||
|
||
while (true) | ||
{ | ||
faulty.Method(); | ||
Thread.Sleep(1000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
|
||
namespace osu.Game.Overlays.Profile | ||
{ | ||
public class Faulty | ||
{ | ||
public void Method() | ||
{ | ||
Action<Model> action = s => | ||
{ | ||
s.Death(); | ||
Console.WriteLine("value: " + 3); | ||
}; | ||
|
||
action(new Model()); | ||
} | ||
} | ||
|
||
public class Model | ||
{ | ||
public void Death(bool? parameter = null) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters