- Jul
- 576
- 10
I think I’ve run into this before, but just.. HOW HOW HOW HOW can execution end when i return from a gosub, and not continue to the next line of a .BTM?
Literally, with echo on:
I see the gosub. I see it return from the gosub. And the “echo done 444" line (and all future lines) simply DON’T EXECUTE.
I even got suspicious of the fact that iff behaves different from if, and tried doing something reductive and changing it to:
It still never comes back. Every line of the subroutine refresh_current_lyric_provider_metadatas excutes just fine. You see the return echo’ed out. Yet the next line? Doesn’t happen.
and it’s not like the subroutine is doing anything complicated:
To add insult to injury, the exact same scripts on the exact same files do NOT behave this way in a new TCC instance.
So it’s something in the environment that is getting corrupted. It’s not the script. It’s the environment exposing some kind of bug or weird behavior that is intentionally designed for a reason but which isn’t a bug but appears like one.
Literally, with echo on:
Code:
iff "1" != "%QUICK_LRC_MODE%" then
gosub refresh_current_lyric_provider_metadatas
endiff
echo "done 444"
I see the gosub. I see it return from the gosub. And the “echo done 444" line (and all future lines) simply DON’T EXECUTE.
I even got suspicious of the fact that iff behaves different from if, and tried doing something reductive and changing it to:
Code:
if "1" == "%QUICK_LRC_MODE%" goto :skip_the_refresh_234
gosub refresh_current_lyric_provider_metadatas
:skip_the_refresh_234
echo "done 444"
It still never comes back. Every line of the subroutine refresh_current_lyric_provider_metadatas excutes just fine. You see the return echo’ed out. Yet the next line? Doesn’t happen.
and it’s not like the subroutine is doing anything complicated:
Code:
:refresh_current_lyric_provider_metadatas [opt]
iff "%CURRENT_LYRIC_PROVIDER%" == "LyricsGenius" .or. "%CURRENT_LYRIC_PROVIDER%" == "GENIUS" then
set CURRENT_LYRIC_PROVIDER=LyricsGenius
set CURRENT_LYRIC_PROVIDER_DISPLAY=LyricsGenius
set OTHER_LYRIC_PROVIDER=SyncedLyrics
set OTHER_LYRIC_PROVIDER_DISPLAY=SyncedLyrics
else
set CURRENT_LYRIC_PROVIDER=SyncedLyrics
set CURRENT_LYRIC_PROVIDER_DISPLAY=SyncedLyrics
set OTHER_LYRIC_PROVIDER=LyricsGenius
set OTHER_LYRIC_PROVIDER_DISPLAY=LyricsGenius
endiff
return
To add insult to injury, the exact same scripts on the exact same files do NOT behave this way in a new TCC instance.
So it’s something in the environment that is getting corrupted. It’s not the script. It’s the environment exposing some kind of bug or weird behavior that is intentionally designed for a reason but which isn’t a bug but appears like one.