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

Button panel crashes immediately upon playback #13

Closed
mntk87 opened this issue Aug 22, 2021 · 10 comments · Fixed by #16
Closed

Button panel crashes immediately upon playback #13

mntk87 opened this issue Aug 22, 2021 · 10 comments · Fixed by #16
Labels
bug Something isn't working

Comments

@mntk87
Copy link

mntk87 commented Aug 22, 2021

Hello,

I originally posted this as a comment on reddit but now I'm registering it as an issue on GitHub so it's easier for both of us to track. Whenever I play a song with TripleQ installed, the following error message pops up and the button panel changes to red with the error message "Aw, crashed :(":

Error: Spider Monkey Panel v1.5.2 (buttonpanel: buttonpanel by RQ)
left_buttons.buttons.leftb3 is undefined

File: TripleQ_panel_buttons.js
Line: 280, Column: 44
Stack trace:
  update_replaygain_button@TripleQ_panel_buttons.js:280:44
  on_selection_changed@TripleQ_panel_buttons.js:478:2

I think my setup is pretty normal. foobar2000 v1.6.7 standalone with Windows 10 (not using wine on a mac). Theme was installed into %appdata%\foobar2000. Thank you again for your hard work on the theme and please let me know if you need any additional information to investigate the issue.

@raphaelquast
Copy link
Owner

hey, thanks for moving this discussion to github!

that error is pretty odd... from a quick look at the code I don't see where things go wrong here
... also I can't reproduce it on my pc... (win10 with foobar2000 v1.6.7)
does this happen with any song you play?

could you try to install the theme with a portable foobar installation and check if you get the same error? (Readme/install/portable)

@mntk87
Copy link
Author

mntk87 commented Aug 23, 2021

Thank you for your suggestion to try the theme with a portable foobar installation! I'm happy to report that the error is now gone :)

@raphaelquast
Copy link
Owner

that's great news! 😄

it's still puzzling what's wrong with your standalone installation, but since I can't reproduce it I can't really do anything about it right now... (the only thing I can think of is that there's some path-mixup with the location of the button-images... but then I would have expected another error than the one you reported...)

@solclearsky
Copy link

I had the same error, then I tried your suggestion using the portable installation instead so I went and done that.
The error went away at first but when I rotate my display using Screen Rotate App (v1.2.5) downloaded from Microsoft Store, the error came back even though I was still using the portable installation.
The error message is a bit different tho:

Error: Spider Monkey Panel v1.5.2 (buttonpanel: buttonpanel by RQ)
left_buttons.buttons.leftb3 is undefined

File: TripleQ_panel_buttons.js
Line: 280, Column: 44
Stack trace:
update_replaygain_button@TripleQ_panel_buttons.js:280:44
on_metadb_changed@TripleQ_panel_buttons.js:483:2

and since that happened, the error always happen every time I start foobar, if I reload the crashed panel, it'll fix itself but will later crash again in several seconds

@raphaelquast
Copy link
Owner

@solclearsky sorry to hear that...
I'm really having trouble with this one since I can't reproduce it on my side...
(I even installed the Screen Rotate App just to see if it actually results in this error... but as expected it's unrelated)
If you can give me any hints on how I could reproduce it I can try to help...

In the meanwhile... you could try to just comment (//) the calls to the button-upates and see if it helps...
(it should not interfere with the functionality at all... you just don't get a red button if a track has no replay-gain)

e.g. at the very end of the file ... \themes\TripleQ\src\TripleQ_playback_buttons.js:

function on_selection_changed () {
	//update_replaygain_button()
	//update_output_device_button()
};

function on_metadb_changed(handle_list, fromhook) {
	//update_replaygain_button()
}

function on_output_device_changed() {
	//update_output_device_button()
}

@solclearsky
Copy link

I think I found out how to reproduce it.
So I tried manually resizing the width (enlarging it) after reloading the crashed panel, voila it works normally without crashing.
Then I tried shrinking the width, boom in a couple of seconds the panel crashed.
I guess there's a lower limit on how wide the player is before the panel crash

@raphaelquast
Copy link
Owner

OK, now I've tried resizing my foobar window in all possible ways but I still don't get any crash...
I think this might somehow be connected to your media-library...
(after all the function is only triggered if there's some change in foobar's meta-database or if the selected track changes)

did you try my suggestion from above?
(it would at least show that all works as expected if the strangely inexistent button is never updated)

@solclearsky
Copy link

solclearsky commented Oct 19, 2021

So I tried messing around some more,

y
the panel only crashed (when changing music) if I reduce the width until either replay gain button or playback device button weren't visible.

n
and when I enlarged it back so both of these buttons were visible, the panel wouldn't crash (when changing music)

Then I tried your suggestion by commenting out update_replaygain_button() and update_output_device_button(), the panel didn't crash when changing music even if I reduced the width so that the buttons weren't visible.

So for now at least I'll just remember not to reduce the width excessively when playing music or by commenting out those functions.
I don't know if this can be considered a bug or not.

@raphaelquast
Copy link
Owner

Hey, thanks for the detailed analysis!
now I was finally able to reproduce it... so yep, I'd consider this a bug...
(actually changing the track while it is resized to a very small size was the key...)

I usually keep the player in full-size and use cntrl + shift + space to show/hide it so I guess that's why I never stumbled upon this issue so far.

I'll try to come up with a solution as soon as possible!

@raphaelquast raphaelquast added bug Something isn't working and removed fixed in portable can't reproduce labels Oct 19, 2021
@raphaelquast raphaelquast linked a pull request Oct 19, 2021 that will close this issue
@raphaelquast
Copy link
Owner

@mntk87 @solclearsky this should be fixed now in TripleQ v1.3.1
thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants