Subject: | Crashing on line 402 when trying to push undef to @cddbp_hosts |
Date: | Mon, 24 Jan 2011 13:05:14 +0100 |
To: | "bug-CDDB [...] rt.cpan.org" <bug-CDDB [...] rt.cpan.org> |
From: | "Santi, Timo" <timo.santi [...] digiphilos.com> |
Hi,
I would like to report a bug regarding cddb.pm v.1.220.
cddb.pm crashes on 402 when trying to push undef to @cddbp_hosts.
I noticed this bug when I tested my program against network failures. Steps to reproduce the bug.
1. Make a succesful search. cddb.pm adds undef element to @cddbp_hosts-array.
2. Disconnect your network.
3. Make a new search. HOST: while -loop goes through the @cddbp_hosts-array and crashes with the last element which was undef.
I don't know the exact reason why the cddb.pm is manipulating the @cddbp_hosts-array. In case of network failure it clears the @cddbp_hosts-array and when the network is again up, there are now server entries in @cddbp_hosts-array. This way cddb.pm doesn't find any results until the called program is restarted. I made a temporarily fix, by moving @cddbp_hosts-array initialization to new().
Best regards,
-Timo-