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

Merging sliders causes new objects to become invisible #26859

Closed
kongehund opened this issue Jan 31, 2024 · 6 comments · Fixed by #27768
Closed

Merging sliders causes new objects to become invisible #26859

kongehund opened this issue Jan 31, 2024 · 6 comments · Fixed by #27768

Comments

@kongehund
Copy link
Contributor

Type

Game behaviour

Bug description

Using the editor, make two sliders, select both, then select "merge selection" - this sometimes creates an error where new objects become invisible, and existing objects can seemingly not be deleted. Saving the map and entering the editor makes the invisible objects appear.

Screenshots or videos

osu-merge-bug.mp4

Version

2024.130.2-lazer

Logs

compressed-logs.zip

@kongehund
Copy link
Contributor Author

I am currently looking into this.

@64ArthurAraujo
Copy link
Contributor

I am currently looking into this.

Are you still looking into this? I would like to fix it.

@peppy
Copy link
Member

peppy commented Mar 31, 2024

I am currently looking into this.

Are you still looking into this? I would like to fix it.

I'd go ahead, it's been over a month.

@kongehund
Copy link
Contributor Author

Please do, I'm not working on it

@64ArthurAraujo
Copy link
Contributor

64ArthurAraujo commented Mar 31, 2024

I can't reproduce exactly like the video above (sliders with the same StartTime but different EndTime), maybe something changed in the code since, but having 2 exact equal sliders at the same StartTime and EndTime triggered this error for me.

Relevant Log:

2024-01-31 02:46:51 [error]: An unhandled error has occurred.
2024-01-31 02:46:51 [error]: System.InvalidOperationException: Can not change depth of drawable which is not contained within this CompositeDrawable.
2024-01-31 02:46:51 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.ChangeInternalChildDepth(Drawable child, Single newDepth)
2024-01-31 02:46:51 [error]: at osu.Game.Screens.Edit.Compose.Components.EditorBlueprintContainer.OnBlueprintDeselected(SelectionBlueprint`1 blueprint)

The exception is thrown by first line of this method:

protected virtual void OnBlueprintDeselected(SelectionBlueprint<T> blueprint)
{
        SelectionBlueprints.ChangeChildDepth(blueprint, 0);
        SelectionHandler.HandleDeselected(blueprint);
}

It seems the merge is trying to deselect the merged slider after deleting the slider (?), i still need to take a deeper look in that part.

At the moment simply checking if blueprint exists before changing its depth seems to work and doesn't brake anything. But idk how to feel about this.

image

Also being unable to add objects after the merge seems to just be a side effect of a unhandled exception in the editor.

@64ArthurAraujo
Copy link
Contributor

64ArthurAraujo commented Apr 1, 2024

I am starting to think this may be a framework issue, my other fix to this was to check in the merge method if there was any slider at the same start time of the first one and increment it so they would differ from each other and them re-order them again by StartTime. That fixed the issue, but when i tried to do the same with 3 sliders the problem appeared again, for some reason even if the third slider is not selected it still crashes the game as you can see in the video below, this is what makes me think it is a framework problem.

weird.mp4

As you cant see the amount of selected objects right before it crashes because of the stacktrace there it is:

image

relevant part of the merge method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants