raineaeternal / Quest-SongCore

A library/mod for Quest Beat Saber that handles song loading, song requirements and capabilities.
MIT License
5 stars 5 forks source link

[Bug] v4 beatmap lighting defaults to all black; no events play #22

Closed bleonard252 closed 6 months ago

bleonard252 commented 7 months ago

When trying to play a v4 beatmap, created with the latest official editor, no lighting events are triggered and the custom palette is not used. It uses some default configuration and does not change.

The level itself is playable, although I have to override the color scheme in game to play it because otherwise, all of the notes are also black.

The screenshot below was taken in "zen mode" from the Quest.

31c31bd256171ed47f213a5d84d4d70d

I thought it was because I switched environments after creating some lighting events, but after recreating the lightshow file, there is no change.

raineaeternal commented 7 months ago

What version are you on, and can you give me a logcat?

bleonard252 commented 7 months ago

I'm on the latest everything (so, SongCore is 1.1.10, BS on Quest is 1.36.1_8647505571, BS on PC is at least 1.36.0 but it won't tell me without PCVR). I think this is probably the most salient piece of information from the logcat:

04-22 22:01:14.052  8642  8664 I beatsaber-hook: INFO[478485731696] [/home/runner/work/Quest-SongCore/Quest-SongCore/extern/includes/beatsaber-hook/shared/utils/il2cpp-utils.hpp:716:25 @ attach_thread]: Attaching thread 478485731696
04-22 22:01:14.053  8642  8664 E beatsaber-hook: ERROR[478485731696] [/home/runner/work/Quest-SongCore/Quest-SongCore/extern/includes/beatsaber-hook/shared/utils/il2cpp-utils.hpp:745:30 @ il2cpp_catch_invoke]: Invoking function in thread id 478485731696
04-22 22:01:14.056  8642  8664 I beatsaber-hook: INFO[478484691312] [/home/runner/work/Quest-SongCore/Quest-SongCore/extern/includes/beatsaber-hook/shared/utils/il2cpp-utils.hpp:716:25 @ attach_thread]: Attaching thread 478484691312
04-22 22:01:14.057  8642  8664 E beatsaber-hook: ERROR[478484691312] [/home/runner/work/Quest-SongCore/Quest-SongCore/extern/includes/beatsaber-hook/shared/utils/il2cpp-utils.hpp:745:30 @ il2cpp_catch_invoke]: Invoking function in thread id 478484691312
04-22 22:01:14.058  8642  8664 I beatsaber-hook: INFO[478484691312] [/home/runner/work/Quest-SongCore/Quest-SongCore/extern/includes/beatsaber-hook/shared/utils/il2cpp-utils.hpp:729:25 @ detach_thread]: Detaching thread 478484691312
04-22 22:01:14.058  8642  8664 I beatsaber-hook: INFO[478485731696] [/home/runner/work/Quest-SongCore/Quest-SongCore/extern/includes/beatsaber-hook/shared/utils/il2cpp-utils.hpp:729:25 @ detach_thread]: Detaching thread 478485731696
raineaeternal commented 7 months ago

this unfortunately doesn't tell me much, I would appreciate a full log so I can scroll through it myself

RedBrumbler commented 7 months ago

could you provide the map in a zip file for testing? that makes it easier for us to test whether what we change is affecting things properly

RedBrumbler commented 7 months ago

ohh looking through the code, this might be what is resulting in things being all black (no color set)

https://github.com/raineio/Quest-SongCore/blob/9fc2012042b8aa1b4c3c8dbf7fa31bd530ca9833/src/SongLoader/LevelLoader.cpp#L423-L428

basically idk how the saber colors are written in that string field but it may just be the html color parsing here that's messing up, having the map here would let me test out whether this is the problem

bleonard252 commented 7 months ago

That could potentially explain the colors part, I don't think it solves the other part, though.

If you open this in the official editor the color schemes reset to all black; this appears to be an editor bug. The issue should manifest itself immediately so the map is empty past the full wall.

IssueReproduction.zip

RedBrumbler commented 7 months ago

ah yeah, the colors don't start with a # so the parsing fails and returns all black, at least that's my theory. maybe the same thing happens in the editor?

image

RedBrumbler commented 7 months ago

aha, the library used for html color parsing does this: image

this means that a '#' is required, which songcore doesn't check for. fix seems simple enough (prepend a # to the color)

RedBrumbler commented 7 months ago

once this action completes please give the artifact a try, see if the map colors work properly and whether that solves the lightmap thing too (I am hoping it just stops showing the light events if the colors are black) https://github.com/raineio/Quest-SongCore/actions/runs/8815554656

bleonard252 commented 7 months ago

That seems to fix the color scheme issue on the regular map (on my copy of the reproduction map, it doesn't for some reason). The lighting events are still not recognized; it's not like it's just not triggering events, it is being set to something that I'm not setting it to.

edit: also, the action is apparently set to version 1.1.7 so QuestPatcher yelled at me when I tried to apply the patched mod

RedBrumbler commented 7 months ago

QP yelling is expected, as long as it let you install it that's good. mm weird that the events are not triggering, I'll have to take a better look at that area of the code where it gets the events from

raineaeternal commented 6 months ago

We've figured out why the environment didn't have lighting events, and will be fixed with #29. I'm just waiting for someone to test the PR, when I get confirmation it works, I'll make a release.

raineaeternal commented 6 months ago

The test map turned out to be the culprit, the lightmap somehow didn't line up with what the game expected, but the issue has been fixed.