Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] (Charting State) Loading a song without difficulty/variation behaves unexpecfully or crashes #2468

Open
gamerbross opened this issue May 11, 2024 · 9 comments · May be fixed by #4391
Open
Labels
status: pending pull request Dependent on a pull request that is currently awaiting review. topic: chart editor Related to the operation of the Chart Editor. type: major bug Involves a major bug, including crashes, softlocks, or issues blocking progression

Comments

@gamerbross
Copy link
Contributor

gamerbross commented May 11, 2024

If you had loaded previously a song with another variation (like Erect) or difficulty and then try to load a dfifferent song unexpectedly changes song data or crashes.
(I think only crashes with song templates)

This could be easily fixed by resetting the variation and difficulty when loading a different song.

Video example: (using song template)

Recording.2024-05-12.014721.mp4

Video example: (loading existing chart)

Recording.2024-05-12.015142.mp4
@gamerbross gamerbross added the type: minor bug Involves a minor bug or issue. label May 11, 2024
@amyspark-ng
Copy link
Contributor

nice catch!

@NotHyper-474
Copy link
Contributor

0.4.0 and still has not been fixed

@EliteMasterEric EliteMasterEric added status: pending triage Awaiting review. and removed type: minor bug Involves a minor bug or issue. labels Jun 17, 2024
@AbnormalPoof
Copy link
Collaborator

Does this still happen in v0.5.1?

@NotHyper-474
Copy link
Contributor

NotHyper-474 commented Oct 10, 2024

Does this still happen in v0.5.1?

Yes, and can be replicated if you open a song without a Pico variation as well.

[lime.utils.Assets] ERROR: There is no BINARY asset with an ID of "songs:assets/songs/tutorial/Inst-pico.ogg"
  in lime/utils/Log.hx#37
  in lime/utils/Assets.hx#138
  in lime/utils/Assets.hx#169
  in openfl/utils/Assets.hx#135
  in funkin/Assets.hx#29
  in funkin/ui/debug/charting/handlers/ChartEditorAudioHandler.hx#105
  in funkin/ui/debug/charting/handlers/ChartEditorImportExportHandler.hx#73
  in funkin/ui/debug/charting/dialogs/ChartEditorWelcomeDialog.hx#162
  in haxe/ui/util/EventMap.hx#90
  in haxe/ui/backend/ComponentBase.hx#441
  in haxe/ui/backend/flixel/MouseHelper.hx#201
  in haxe/ui/backend/flixel/MouseHelper.hx#191
  in haxe/ui/backend/flixel/MouseHelper.hx#173
  in haxe/ui/backend/flixel/MouseHelper.hx#103

@AbnormalPoof AbnormalPoof added the type: major bug Involves a major bug, including crashes, softlocks, or issues blocking progression label Jan 22, 2025
@Lasercar
Copy link
Contributor

Lasercar commented Mar 2, 2025

I can't reproduce this in 0.5.3/ the development build.

@VioletSnowLeopard
Copy link

This just in, this bug still exists on the 0.5.3 develop branch:

=====================
 Funkin Crash Report
=====================

Generated by: Friday Night Funkin' - v0.5.3 (develop : e83b88d) PROTOTYPE
  Git hash: e83b88d (CLEAN)
System timestamp: 2025-03-26-00-29-35
Driver info: OpenGL Vendor=NVIDIA Corporation Version=4.6.0 NVIDIA 566.07 Renderer=NVIDIA GeForce RTX 4070 Laptop GPU/PCIe/SSE2 GLSL=4.60 NVIDIA
Platform: Windows
Render method: DRAW_TILES

I was able to make it occur twice. One for a song without an Erect variation:

[lime.utils.Assets] ERROR: There is no BINARY asset with an ID of "songs:assets/songs/2hot/Inst-erect.ogg"
  in lime/utils/Log.hx#37
  in lime/utils/Assets.hx#138
  in lime/utils/Assets.hx#169
  in openfl/utils/Assets.hx#135
  in funkin/Assets.hx#29
  in funkin/ui/debug/charting/handlers/ChartEditorAudioHandler.hx#105
  in funkin/ui/debug/charting/handlers/ChartEditorImportExportHandler.hx#73
  in funkin/ui/debug/charting/dialogs/ChartEditorWelcomeDialog.hx#160
  in haxe/ui/util/EventMap.hx#90
  in haxe/ui/backend/ComponentBase.hx#441
  in haxe/ui/backend/flixel/MouseHelper.hx#201
  in haxe/ui/backend/flixel/MouseHelper.hx#191
  in haxe/ui/backend/flixel/MouseHelper.hx#173
  in haxe/ui/backend/flixel/MouseHelper.hx#103

Another for a song without a Pico mix:

[lime.utils.Assets] ERROR: There is no BINARY asset with an ID of "songs:assets/songs/thorns/Inst-pico.ogg"
  in lime/utils/Log.hx#37
  in lime/utils/Assets.hx#138
  in lime/utils/Assets.hx#169
  in openfl/utils/Assets.hx#135
  in funkin/Assets.hx#29
  in funkin/ui/debug/charting/handlers/ChartEditorAudioHandler.hx#105
  in funkin/ui/debug/charting/handlers/ChartEditorImportExportHandler.hx#73
  in funkin/ui/debug/charting/dialogs/ChartEditorWelcomeDialog.hx#160
  in haxe/ui/util/EventMap.hx#90
  in haxe/ui/backend/ComponentBase.hx#441
  in haxe/ui/backend/flixel/MouseHelper.hx#201
  in haxe/ui/backend/flixel/MouseHelper.hx#191
  in haxe/ui/backend/flixel/MouseHelper.hx#173
  in haxe/ui/backend/flixel/MouseHelper.hx#103

@VioletSnowLeopard
Copy link

Using debugging with breakpoints, I believe I have found the problematic area in the code. The issue occurs in ChartEditorImportHandler.hx. After the for loop on line 42, the metadata and chart data for the song you're trying to load are just fine:

Image

After the call to the loadSong function on line 56, however, the variation of the song you had selected previously is erroneously added to the song's metadata. (I had a Pico mix song selected before trying to load Roses):

Image

This causes the variation to be added to the chart data too after the call to the sortChartData function on line 58.

Image

Because the issue occurred after the call to the loadSong function. I decided to use breakpoints to investigate it. The song metadata and chart data is passed into it correctly:

Image

These values are fine until this line (line 124) executes:

Conductor.instance.instrumentalOffset = state.currentInstrumentalOffset;

After that line, the variation for the song you were previously on is added to the metadata of the new song you are trying to load:

Image

@AbnormalPoof AbnormalPoof added the topic: chart editor Related to the operation of the Chart Editor. label Mar 26, 2025
@NotHyper-474
Copy link
Contributor

NotHyper-474 commented Mar 26, 2025

Yep, that happens because when it's retrieving the instrumental offset it accesses currentSongMetadata which will generate a default blank variation if it doesn't exist, I'm not sure if this behavior should be intentional.

Image

@AbnormalPoof AbnormalPoof added status: pending pull request Dependent on a pull request that is currently awaiting review. and removed status: pending triage Awaiting review. labels Mar 26, 2025
@NotHyper-474
Copy link
Contributor

NotHyper-474 commented Mar 31, 2025

Still an issue in 0.6.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending pull request Dependent on a pull request that is currently awaiting review. topic: chart editor Related to the operation of the Chart Editor. type: major bug Involves a major bug, including crashes, softlocks, or issues blocking progression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants