How my BBC Sounds Plugin briefly broke LMS. A cautionary tale!
expectingtofly <expectingtofly.a0ro9c-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
The BBC sounds plugin has always had an frequent incremental releases.
I release usable functional changes when they are ready with quickly
released bug fixes when required.
With the view that the plugin is mostly self contained and it is much
more beneficial to myself, and everybody who uses it, to get usable
functionality in small changes in a plugin that is always improving.
So when I was provided with a 'surprise pull request'
(https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin/pull/86) for a
useful piece of functionality. All was good. It was low impact, well
written, easy to understand.
I gave it a quick test to make sure it was working as described and
released.
A few hours later I got reports that favourites were disappearing,
various plugins were not working all caused by this seemingly innocuous
BBC sounds release! I quickly deleted the release. But not before 200
people had downloaded and installed. A back out has now been released
to correct.
WHAT HAPPENED?
The change included using XML::Simple and had been included like this :
Code:
--------------------
use XML::Simple qw(:strict);
--------------------
The developer was dutifully following 'the XML::simple manual'
(https://metacpan.org/pod/XML::Simple#SYNOPSIS) . Where it states that
the strict mode will "save you pain"
As 'explained by @mavit'
(https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin/pull/86/commits/a6b06ce2fab3766043373d28e3d5b8b5224972e1)
:
It turns out there was a bug in XML::Simple ( fixed in 2012 )
https://rt.cpan.org/Public/Bug/Display.html?id=41562 where setting
strict mode set a global flag turning on strict mode on for all modules
that use XML::Simple .
The XML:simple version packaged in LMS is an older version, hence the
continued existence of the bug.
So, that's what happened. Sorry for all the chaos yesterday.
Stuart McLean
EXPECTINGTOFLY PLUGINS :
- *BBC Sounds* :
https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin
- *Virgin Radio (UK)* :
https://github.com/expectingtofly/LMS_Virgin_Radio_Plugin
- *Times Radio* :
https://github.com/expectingtofly/LMS_TIMES_RADIO_PLUGIN
- *Global Player (UK)* :
https://github.com/expectingtofly/LMS_GlobalPlayer_Plugin
For BBC Sounds help see the 'BBC Sounds Wiki'
(https://github.com/expectingtofly/LMS_BBC_Sounds_Plugin/wiki).
------------------------------------------------------------------------
expectingtofly's Profile: http://forums.slimdevices.com/member.php?userid=63263
View this thread: http://forums.slimdevices.com/showthread.php?t=114469