Skip to content

report progress about how many songs have been parsed#1100

Merged
barbeque-squared merged 5 commits into
UltraStar-Deluxe:masterfrom
dgruss:loadingprogress
Apr 27, 2026
Merged

report progress about how many songs have been parsed#1100
barbeque-squared merged 5 commits into
UltraStar-Deluxe:masterfrom
dgruss:loadingprogress

Conversation

@dgruss
Copy link
Copy Markdown
Contributor

@dgruss dgruss commented Nov 30, 2025

In some prior UltraStar versions there was a loading progress. This commit adds this as well on the loading screen, first discovering how many txts there are to load, and then reporting the progress in how many have been loaded.

@dgruss dgruss force-pushed the loadingprogress branch 2 times, most recently from dfc34b2 to 9a893fe Compare December 15, 2025 19:10
@barbeque-squared
Copy link
Copy Markdown
Member

NOTE TO MAINTAINERS: this PR appears to build off #1121, so look at that one first

dgruss I don't know if this is intentional, since the unique commits in this PR modify only USongs.pas, which isn't modified by the other PR at all. But can also just rebase once 1121 is in.

@dgruss
Copy link
Copy Markdown
Contributor Author

dgruss commented Mar 1, 2026

@barbeque-squared rebased to master, so this now works without #1121

@dgruss dgruss force-pushed the loadingprogress branch 3 times, most recently from eaac8c7 to 49a0bb6 Compare March 8, 2026 12:48
@g3n35i5
Copy link
Copy Markdown

g3n35i5 commented Apr 11, 2026

@dgruss I am trying to rebase #1226 to this PR but when I compile and execute on my machine, I get

Sorry, an error ocurred! Please report this error to the game-developers. Also check the Error.log file in the game folder.
Stacktrace:
Exception class: EAccessViolation
Message: Access violation
  $0000000000000000
  $00000001047468C4
  $0000000104746710
  $00000001047464E0
  $0000000104773598
  $00000001046E5F18

I am on MacOS.

@dgruss
Copy link
Copy Markdown
Contributor Author

dgruss commented Apr 11, 2026

can you try just #1100 right away or #1129 (both have both merged)? See whether it works in principle...

@g3n35i5
Copy link
Copy Markdown

g3n35i5 commented Apr 11, 2026

This one (#1100) is causing the crash. #1129 is working. Sorry I have to go now, maybe I can continue this evening. Cheers!

@dgruss
Copy link
Copy Markdown
Contributor Author

dgruss commented Apr 12, 2026

loadingprogress.mp4

Added the progress bar idea from #1226

Copy link
Copy Markdown
Member

@barbeque-squared barbeque-squared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loses the Log.LogDebug('Recursing: ' + Dir.Append(FileName).ToWide, 'TSongs.FindFilesByExtension'); debuglog when it's recursing into subdirectories. This has proven quite useful in the past since we know there's issues with some special characters, but it also makes it so that if directories are somehow unreadable (ie wrong permissions, no executable bit, that kind of stuff) we can see that it found the directory but not any of the txt's in it. Ideally we can have that back.

The bar doesn't really add anything for me. I don't know where it's getting its color etc from, because I'd like to at least test what happens if I start messing with those elements (like width 0 for example). I suppose people will visually like it, though it's also just duplicating information already shown by the text.

I'm also not sure if having the number of found files be on the screen this long is a good idea. Personally I don't have any issue with it, but "normal" users also see a song total in the song selection list and if there is just 1 random txt that isn't an ultrastar txt at all somewhere, "the numbers won't match" or something.

Aside from the missing recursing log statement I'm fine with it as-is, just know that as soon as users start making "issues" it might change again.

@dgruss
Copy link
Copy Markdown
Contributor Author

dgruss commented Apr 27, 2026

the bar just uses transparency - it works across different themes because i didn't add new theme elements for it

@dgruss
Copy link
Copy Markdown
Contributor Author

dgruss commented Apr 27, 2026

this PR also fixes an issue on macOS I think, where the game is unresponsive during start

@dgruss
Copy link
Copy Markdown
Contributor Author

dgruss commented Apr 27, 2026

@barbeque-squared i re-added the missing debug line

@bohning
Copy link
Copy Markdown
Collaborator

bohning commented Apr 27, 2026

I just tested this and this finally fixes a long-standing issue that macOS didn't update the screen until everything was loaded - so I only had a black screen with the spinning ball until I saw the transition to the main menu screen. Now I see the loading of songs with the progress bar, very nice. Great progress, thanks a lot!

@dgruss
Copy link
Copy Markdown
Contributor Author

dgruss commented Apr 27, 2026

i added two more things here: a bit more SDL event pumping, and prefixing the logfile with ms-accurate timestamps, which is super useful for debugging where time is lost in the log file

@barbeque-squared barbeque-squared merged commit c82c3fe into UltraStar-Deluxe:master Apr 27, 2026
5 checks passed
@dgruss dgruss deleted the loadingprogress branch April 27, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants