Skip to content

Comments

fix main loop hang cli subcommmands#233

Merged
marin-m merged 1 commit intomarin-m:mainfrom
bodoque-01:fix/main-loop-hang-cli-subcommands
Feb 21, 2026
Merged

fix main loop hang cli subcommmands#233
marin-m merged 1 commit intomarin-m:mainfrom
bodoque-01:fix/main-loop-hang-cli-subcommands

Conversation

@bodoque-01
Copy link
Contributor

@bodoque-01 bodoque-01 commented Feb 21, 2026

Found a problem with some legacy CLI subcommands, the audio-file-to-recognized-song and fingerprint-to-recognized-song hang indefinitely, never exiting.
These subcommands created a new glib::MainContext but never set it as the thread default. The future scheduled via main_context.spawn_local() was never polled and this (I think) made the Shazam API request never execute and main_loop.run() blocked forever doing nothing.
And after fixing this, The async block had no main_loop.quit() call, so after printing the result the main loop would keep running.

Tested using cargo run -- audio-file-to-recognized-song python-version/tests/stupeflip.wav

@marin-m marin-m merged commit 13a9958 into marin-m:main Feb 21, 2026
2 checks passed
@marin-m
Copy link
Owner

marin-m commented Feb 21, 2026

Thanks!

@bodoque-01
Copy link
Contributor Author

Thank you instead for the merge!

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.

2 participants