Borim7 / radio-tray

RadioTray a simple music streaming player
Other
5 stars 0 forks source link

Crash in HistoryPlugin on Ubuntu 22.04 #8

Closed dev-rke closed 12 months ago

dev-rke commented 1 year ago

Hi @Borim7 ,

i am still a happy user of the reincarnation of radiotray. :-) Recently i upgraded to Ubuntu 22.04, which now causes a new exception within the HistoryPlugin:

Message:
radiotray crashed with AttributeError in on_song_changed(): 'NoneType' object has no attribute 'get_buffer'

Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/radiotray/AudioPlayerGStreamer.py", line 209, in on_message
  self.eventManager.notify(EventManager.SONG_CHANGED, metadata)
 File "/usr/lib/python3/dist-packages/radiotray/events/EventManager.py", line 46, in notify
  callback(data)
 File "/usr/share/radiotray/plugins/HistoryPlugin.py", line 71, in on_song_changed
  buffer = self.text.get_buffer()
 AttributeError: 'NoneType' object has no attribute 'get_buffer'

Installed Package: radiotray.0.8.2-ppa~focal Operating System: Ubuntu 22.04.3 (jammy)

When looking into HistoryPlugin.py i assume inside of activate_gtk() method self.text = self.gladefile.get_object('textview1') might not resolve the textview1 object, as it is of type NoneType.

Could it be, that the gladefile cannot be resolved properly?

By the way: where is the location of the logfile? Didn't found that out yet.

Thanks for your support and have a nice weekend!

Borim7 commented 1 year ago

Hey,

good to know that I use radiotray not alone ^^ The History Plugin is not used by me, but I will look into it.

By the way: where is the location of the logfile? Didn't found that out yet.

~/.local/share/radiotray/radiotray.log

dev-rke commented 1 year ago

Hey @Borim7 ,

radiotray is still the most important app on my machine. It's running always, it's starting automatically on boot and will be stopped only when consuming other media. :D

I observed the error is raised when the stream sends some advertisement audio clips. My assumption is, that there might be a switch to a different audio stream which causes the history plugin to scream.

Therefore i studied this a bit more and checked, if i can reproduce this behaviour when just switching to a different radio station....and voilá, exception is raised. :-)

But the error cannot be reproduced multiple times it seems. When the error has been triggered once, it won't happen again.

I will track this deeper to make it better reproducible.

dev-rke commented 12 months ago

Thank you, can't wait to get the update! :heart: