0auBSQ / OpenTaiko

An improved and personalized version of TJAPlayer3-Develop-Rewrite, .tja chart player axed on entertainment and creativity.
MIT License
341 stars 86 forks source link

[Bug] Crash or infinite notechart when selecting "fake" and undefined difficulties, caused by specifying `LEVEL:` before `COURSE:` #625

Open IepIweidieng opened 1 month ago

IepIweidieng commented 1 month ago

This issue can be avoided by editing the .tja file. However, it might cause confusions to some notechart makers. At least a diagnosis or an alert for the notechart is expected.

Probably related issue: 0auBSQ/OpenTaiko#7

Version and Environment

OpenTaiko (0auBSQ) Pre v0.6.0 b3 (x64), on Windows 11.

See Log Files for details.

Test Cases and Behaviors

All the crashing cases occur when entering the gameplay (ensou) screen for the "fake" Extreme (Oni) difficulty.

The infinite notechart issue occurs in the broken-COURSE+LEVEL+COURSE.tja case.

Songs with Single Difficulty

In the song selection menu, OpenTaiko seems to recognize difficulties by the LEVEL: header, while TaikoJiro seems to do so by instead the COURSE: header.

.tja file Case Behavior in
OpenTaiko (0auBSQ) Pre v0.6.0 b3 (x64)
Behavior in
TaikoJiro 1 v2.92
Expected Behavior
working-almost-absolutely-nothing.tja (No notecharts defined) The song is not listed in the song selection screen. Extreme (Oni): ★×0 The song is not listed or has no selectable difficulties.
broken-nothing.tja (1 notechart defined) The song is selectable but has no selectable difficulties. Extreme (Oni): ★×0 (Default): ★×(Default)
broken-COURSE-only.tja Easy The song is selectable but has no selectable difficulties. Easy: ★×0 Easy: ★×(Default)
working-LEVEL-only.tja ★×3 Extreme (Oni): ★×3 Extreme (Oni): ★×3 (Default): ★×3
working-COURSE+LEVEL.tja Easy, ★×3 Easy: ★×3 Easy: ★×3 Easy: ★×3
crash-LEVEL+COURSE.tja ★×3, Easy Extreme (Oni): ★×3
Crash when entering the gameplay screen.
Easy: ★×3 Easy: ★×3
No crashes.
broken-COURSE+LEVEL+COURSE.tja Easy, ★×3, Normal Easy: ★×3
The notechart seems to never end.
Easy: ★×3 / Normal: ★×0
Both notecharts end normally.
Normal is selectable. At least 1 difficulty is ★×3.
All notecharts end normally.
crash-LEVEL+COURSE+LEVEL.tja ★×5, Easy, ★×3 Easy: ★×3 / Extreme (Oni): ★×5
Crash on Extreme when entering the gameplay screen.
Easy: ★×3 Easy: ★×3
No crashes.

Songs with "Deceptive Difficulty Stars"

By examining the test cases in which multiple difficulties are defined with the LEVEL+COURSE and LEVEL+COURSE+LEVEL patterns, the displayed difficulty stars in the song selection screen seems to be determined by the last LEVEL: header defined in all file regions where the last defined COURSE: header specifies the current difficulty ("regions of current difficulty"), while the actual difficulty stars in the gameplay screen seems to be determined by instead the last LEVEL: header before the #START command.

Therefore, it is possible to achieve "deceptive difficulty stars", which means the displayed difficulty star in the song selection screen is made different from the actual difficulty star in the gameplay screen. However, only a deceptive difficulty star can be specified for each difficulty (at least in TaikoJiro), while the actual difficulty star can be specified individually for each player side for each count of players.

Although such behavior itself might be considered as intended, the crashing behavior of OpenTaiko in cases where TaikoJiro does not crash should still be considered to be not intended.

.tja file Case Behavior in
OpenTaiko (0auBSQ) Pre.0.6.0.b3.x64
Behavior in
TaikoJiro 1 v2.92
Expected Behavior
deceptive-diffstars-linear-shifted.tja ★×1, Easy, 1, ★×2, Normal, 2, ★×3, Hard, 3 Song selection: ★×2/3/-/1
1/2/-/(Crash)
Song selection: ★×2/3/1/-
1/2/3/-
Notechart played: 1/2/3/-
Deceptive: ★×2/3/(3, 1, or default)/-
Actual: ★×1/2/3/-
Notechart played: 1/2/3/-
Extreme is not selectable.
No crashes.
deceptive-diffstars-circular-shifted.tja ★×1, Easy, 1, ★×2, Normal, 2, ★×3, Hard, 3, ★×4, Extreme, 4 Song selection: ★×2/3/4/1
Notechart played: 1/2/3/4
Song selection: ★×2/3/4/1
Gameplay: ★×1/2/3/4
Notechart played: 1/2/3/4
(Same as TaikoJiro if deceptive difficulty stars are allowed)
deceptive-diffstars-circular-shifted-reversed.tja ★×4, Extreme, 4, ★×3, Hard, 3, ★×2, Normal, 2, ★×1, Easy, 1 Song selection: ★×-/1/2/3
Notechart played: -/2/3/4
Easy is not selectable.
Song selection: ★×4/1/2/3
Gameplay: ★×1/2/3/4
Notechart played: 1/2/3/4
Deceptive: ★×(1, 4, or default)/1/2/3
Actual: ★×1/2/3/4
Notechart played: 1/2/3/4
deceptive-diffstars-linear-wrapped.tja ★×3, Easy, ★×1, 1, Normal, ★×2, 2, Hard, 3 Song selection: ★×1/2/-/3
Notechart played: 1/2/-/(Crash)
Song selection: ★×1/2/3/-
Gameplay: ★×1/2/2/-
Notechart played: 1/2/3/-
Deceptive: ★×1/2/(2, 3, or default)/-
Actual: ★×1/2/2/-
Notechart played: 1/2/3/-
Extreme is not selectable.
No crashes.
deceptive-diffstars-step-wrapped.tja ★×5, Easy, ★×1, 1, Normal, 2, Hard, ★×3, 3, Inner Extreme, 5 Song selection: ★×1/-/3/5/-
Notechart played: 1/-/3/(Crash)/-
Normal and Inner Extreme are not selectable.
Song selection: ★×1/5/3/-/5
Gameplay: ★×1/1/3/-/3
Notechart played: 1/2/3/-/5
Crash on Inner Extreme in 2-player mode because of the unended drumroll.
Deceptive: ★×1/(1, 5, or default)/3/-/(3, 5, or default)
Actual: ★×1/1/3/-/3
Notechart played: 1/2/3/-/5
Only (Outer) Extreme is not selectable.
No crashes.
deceptive-diffstars-any.tja Easy, ★×1, 1, ★×9, Normal, ★×2, 2, ★×99, Hard, ★×3, 3, ★×999, Extreme, ★×4, 4, ★×9999, Inner Extreme, ★×5, 5, ★×99999 Song selection: ★×9/99/999/9999/99999
Notechart played: 1/2/3/4/5
Song selection: ★×9/99/999/9999/99999
Gameplay: ★×1/2/3/4/5
Notechart played: 1/2/3/4/5
Crash on Inner Extreme in 2-player mode because of the unended drumroll.
(Same as TaikoJiro if deceptive difficulty stars are allowed, but no crashes)
deceptive-diffstars-any-playside.tja
(Too long; click to expand) Easy, ★×2, SP: 11, ★×8, Easy, ★×1, P1: 1, ★×7, Easy, ★×3, P2: 12, ★×9, Normal, ★×5, SP: 22, ★×88, Normal, ★×4, P1: 2, ★×77. Normal, ★×6, P2: 21, ★×99, Hard, ★×8, 33, ★×888, Hard, ★×7, P1: 3, ★×777, Hard, ★×9, P2: 34, ★×999. Extreme, ★×11, SP: 44, ★×8888, Extreme, ★×10, P1: 4, ★×7777, Extreme, ★×12, P2: 43, ★×9999, Inner Extreme, ★×14, SP: 51, ★×88888. Inner Extreme, ★×13, P1: 58, Inner Extreme, ★×15, P2: 52, ★×99999
Song selection: ★×9/99/999/9999/99999
Gameplay: ★×2/5/8/11/14
Notechart played: 11/22/33/44/51
2–player-side notecharts are not used in the 2-player mode.
Song selection: ★×9/99/999/9999/99999
Gameplay, SP: ★×2/5/8/11/14
Notechart played: 11/22/33/44/51
Gameplay, P1: ★×1/4/7/10/13
Notechart played: 1/2/3/4/58
Gameplay, P2: ★×3/6/9/12/15
Notechart played: 12/21/34/43/52
(Same as TaikoJiro if deceptive difficulty stars are allowed)

The actual difficulty star information for OpenTaiko is omitted from the above table. In TaikoJiro, the actual difficulty star(s) are displayed on the window title in the gameplay screen. However, in OpenTaiko, the actual difficulty star(s) are not shown in the default skins.

Log Files

A trimmed log file for [`crash-LEVEL+COURSE.tja`](https://github.com/0auBSQ/OpenTaiko/files/15501218/crash-LEVEL%2BCOURSE.tja.txt), with rough English (`en`) translation. ```txt DTXMania powered by YAMAHA Silent Session Drums Release: 0.6.0.0 2024/05/30 21:58:25.841 [INFO] ---------------------- 2024/05/30 21:58:25.842 [INFO] ■ アプリケーションの初期化 [en: ■ Initialization of Application] 2024/05/30 21:58:25.842 [INFO] OS Version: Microsoft Windows NT 10.0.22631.0 2024/05/30 21:58:25.842 [INFO] ProcessorCount: 8 2024/05/30 21:58:25.842 [INFO] CLR Version: 7.0.15 2024/05/30 21:58:25.843 [INFO] スキンの初期化を行います。 [en: Initializing skin.] [skipped...] 2024/05/30 22:00:03.915 [INFO] ---------------------- 2024/05/30 22:00:03.915 [INFO] ■ 曲読み込み [■ Song Loading] 2024/05/30 22:00:03.915 [INFO] 曲読み込みステージを活性化します。 [en: Activating the song-loading stage] 2024/05/30 22:00:03.917 [INFO] 曲読み込みステージの活性化を完了しました。 [en: Done activating the song-loading stage] 2024/05/30 22:00:03.945 [INFO] ---- Song information ----------------- 2024/05/30 22:00:03.945 [INFO] TITLE: Crash - LEVEL + COURSE 2024/05/30 22:00:03.945 [INFO] FILE: C:\Users\User\Games\OpenTaiko x64\Songs\L2 Custom Charts\crash-LEVEL+COURSE.tja 2024/05/30 22:00:03.945 [INFO] --------------------------- 2024/05/30 22:00:03.945 [INFO] Chart loading time: 00:00:00.0012133 2024/05/30 22:00:05.244 [INFO] Song loading time( 0): 00:00:01.2989166 2024/05/30 22:00:05.757 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\System\Open-World Memories\Graphics\5_Game\9_End\DondaFullCombo\bg.png) 2024/05/30 22:00:06.417 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\Songs\L2 Custom Charts\Dan_Plate.png) 2024/05/30 22:00:06.420 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\System\Open-World Memories\Graphics\5_Game\13_GENRE\Songs.png) 2024/05/30 22:00:06.422 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\System\Open-World Memories\Graphics\5_Game\5_Background\0\Background.png) 2024/05/30 22:00:06.423 [INFO] 総読込時間[en: Total loading time]: 00:00:02.4791478 2024/05/30 22:00:06.911 [INFO] 曲読み込みステージを非活性化します。 [en: Deactivating the song-loading stage] 2024/05/30 22:00:06.911 [INFO] 曲読み込みステージの非活性化を完了しました。 [en: Done deactivating the song-loading stage] 2024/05/30 22:00:06.911 [INFO] ---------------------- 2024/05/30 22:00:06.911 [INFO] ■ 演奏(ドラム画面) [en: ■ Song Performance (Drum Screen)] System.NullReferenceException: Object reference not set to an instance of an object. at TJAPlayer3.HGaugeMethods.UNSAFE_DrawGaugeFast(Int32 player, Int32 opacity, Int32 rainbowTextureIndex, Int32 soulFlameIndex) in C:\Users\raphael\Desktop\releases\Pre 0.6.0 b3\Repo\OpenTaiko-main\OpenTaiko\src\Helpers\HGaugeMethods.cs:line 499 at TJAPlayer3.CAct演奏Drumsゲージ.Draw() [en: TJAPlayer3.CActSongPerformanceDrumsGauge.Draw()] in C:\Users\raphael\Desktop\releases\Pre 0.6.0 b3\Repo\OpenTaiko-main\OpenTaiko\src\Stages\07.Game\Taiko\CAct演奏Drumsゲージ.cs:line 128 at TJAPlayer3.CStage演奏画面共通.t進行描画_ゲージ() [en: TJAPlayer3.CStageSongPerformanceScreenCommon.tDraw_gauge()] in C:\Users\raphael\Desktop\releases\Pre 0.6.0 b3\Repo\OpenTaiko-main\OpenTaiko\src\Stages\07.Game\CStage演奏画面共通.cs:line 3507 at TJAPlayer3.CStage演奏ドラム画面.Draw() [en: TJAPlayer3.CStageSongPerformanceDrumScreen.Draw()] in C:\Users\raphael\Desktop\releases\Pre 0.6.0 b3\Repo\OpenTaiko-main\OpenTaiko\src\Stages\07.Game\Taiko\CStage演奏ドラム画面.cs:line 419 at TJAPlayer3.TJAPlayer3.Draw() in C:\Users\raphael\Desktop\releases\Pre 0.6.0 b3\Repo\OpenTaiko-main\OpenTaiko\src\Common\TJAPlayer3.cs:line 2410 エラーだゴメン!(涙 [en: Sorry for the error! (Tears] System.InvalidOperationException: You cannot call `Reset` inside of the render loop! at Silk.NET.Windowing.Internals.ViewImplementationBase.Reset() at Silk.NET.Windowing.Internals.ViewImplementationBase.Dispose() at SampleFramework.Game.Dispose() in C:\Users\raphael\Desktop\releases\Pre 0.6.0 b3\Repo\OpenTaiko-main\FDK\src\01.Framework\Core\Game.cs:line 323 at TJAPlayer3.Program.Main() in C:\Users\raphael\Desktop\releases\Pre 0.6.0 b3\Repo\OpenTaiko-main\OpenTaiko\src\Common\Program.cs:line 127 エラーだゴメン!(涙 [en: Sorry for the error! (Tears] ```
A trimmed log file for [`broken-COURSE+LEVEL+COURSE.tja`](https://github.com/user-attachments/files/15506139/broken-COURSE%2BLEVEL%2BCOURSE.tja.txt), with rough English (`en`) translations. ```txt [skipped...] 2024/05/31 07:50:55.700 [INFO] ---------------------- 2024/05/31 07:50:55.700 [INFO] ■ 曲読み込み [■ Song Loading] 2024/05/31 07:50:55.700 [INFO] 曲読み込みステージを活性化します。 [en: Activating the song-loading stage] 2024/05/31 07:50:55.704 [INFO] 曲読み込みステージの活性化を完了しました。 [en: Done activating the song-loading stage] 2024/05/31 07:50:55.733 [ERROR] CDTXStyleExtractor is returning its input value early due to an inability to determine the best rank. This can occur if a course contains no #START. (seqNo=0, C:\Users\User\Games\OpenTaiko x64\Songs\L2 Custom Charts\broken-COURSE+LEVEL+COURSE.tja) 2024/05/31 07:50:55.733 [INFO] ---- Song information ----------------- 2024/05/31 07:50:55.733 [INFO] TITLE: Broken - COURSE + LEVEL + COURSE 2024/05/31 07:50:55.733 [INFO] FILE: C:\Users\User\Games\OpenTaiko x64\Songs\L2 Custom Charts\broken-COURSE+LEVEL+COURSE.tja 2024/05/31 07:50:55.733 [INFO] --------------------------- [skipped...] 2024/05/31 07:50:55.733 [INFO] Chart loading time: 00:00:00.0021364 2024/05/31 07:50:57.031 [INFO] Song loading time( 0): 00:00:01.2978768 2024/05/31 07:50:57.032 [INFO] LoudnessMetadataScanner.StopBackgroundScanning: Stopping background scanning thread... 2024/05/31 07:50:57.032 [INFO] LoudnessMetadataScanner.StopBackgroundScanning: Background scanning thread stopped. 2024/05/31 07:50:57.568 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\System\Open-World Memories\Graphics\5_Game\9_End\DondaFullCombo\bg.png) 2024/05/31 07:50:58.256 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\Songs\L2 Custom Charts\Dan_Plate.png) 2024/05/31 07:50:58.262 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\System\Open-World Memories\Graphics\5_Game\13_GENRE\Songs.png) 2024/05/31 07:50:58.267 [WARNING] テクスチャファイルが見つかりませんでした。[en: Could not found the texture file.](C:\Users\User\Games\OpenTaiko x64\System\Open-World Memories\Graphics\5_Game\5_Background\0\Background.png) 2024/05/31 07:50:58.268 [INFO] 総読込時間[en: Total loading time]: 00:00:02.5372166 2024/05/31 07:50:58.698 [INFO] 曲読み込みステージを非活性化します。 [en: Deactivating the song-loading stage] 2024/05/31 07:50:58.698 [INFO] 曲読み込みステージの非活性化を完了しました。 [en: Done deactivating the song-loading stage] 2024/05/31 07:50:58.698 [INFO] ---------------------- 2024/05/31 07:50:58.698 [INFO] ■ 演奏(ドラム画面) [en: ■ Song Performance (Drum Screen)] 2024/05/31 07:52:01.251 [INFO] LoudnessMetadataScanner.StartBackgroundScanning: BS1770GAIN is available. Starting background scanning thread... 2024/05/31 07:52:01.251 [INFO] LoudnessMetadataScanner.StartBackgroundScanning: Background scanning thread started. 2024/05/31 07:52:01.252 [INFO] ---------------------- 2024/05/31 07:52:01.252 [INFO] ■ Return to song select menu 2024/05/31 07:52:01.252 [INFO] 選曲ステージを活性化します。 [en: Activating the song-selection stage] 2024/05/31 07:52:01.317 [INFO] 選曲ステージの活性化を完了しました。 [en: Done activating the song-selection stage] [skipped...] ```