ribbons / RadioDownloader

An easy to use application for managing podcast subscriptions and downloads.
https://nerdoftheherd.com/tools/radiodld/
GNU General Public License v3.0
15 stars 11 forks source link

Fixed crash when a programme or episode description contained just a numeric value. #189

Closed ribbons closed 11 years ago

ribbons commented 11 years ago

Original report from elliott.line@yahoo.co.uk at 21:05:08 on 2012-10-20

For the last few days each time it tries to download a programme, it gets to the very end of the progress bar, in the processing phase, and then says that RD has encountered a problem and needs to close. I attach the error report.


Imported from Bug 717 in the NerdoftheHerd.com Bugzilla.

ribbons commented 11 years ago

Original comment from elliott.line@yahoo.co.uk at 21:08:03 on 2012-10-20

screen grab of error report

ribbons commented 11 years ago

Original comment from Matt Robinson at 16:20:07 on 2012-10-21

Could you let me know the number for one of your error reports so I can look at the full details?

ribbons commented 11 years ago

Original comment from elliott.line@yahoo.co.uk at 20:50:19 on 2012-10-22

Of course, it is 36957. Elliott

ribbons commented 11 years ago

Original comment from elliott.line@yahoo.co.uk at 19:20:48 on 2012-10-24

Hi Matt I'm not a full-on techie, but I might be able to follow reasonably straightforward instructions. I have the workaround of my old PC for the time being, on which nothing else works but Radio Downloader still does! But obviously it's not ideal switching between the two computers.

By the way, a thousand thank yous for creating RD - a great program!

ribbons commented 11 years ago

Original comment from Matt Robinson at 19:50:50 on 2012-10-23

It is a little bit difficult to work out what is happening here as the .NET JIT compiler has optimised the crucial bit of code quite a bit so the line number isn't right.

However, my best guess is that you've ended up with an entry in the episodes table of your application database with a null value for the name column, which is crashing the application when it tries to fetch information about that episode.

I'll add a NOT NULL constraint to that table so that (if I'm correct) the offending row will be dumped out of the database when you upgrade to the next version, but that doesn't help you much in the mean time.

Are you enough of a techie that I could give you the command to run against your database which should fix it if my guess is correct, or would you find that all a bit too much?

ribbons commented 11 years ago

Original comment from Matt Robinson at 19:48:48 on 2012-10-24

Okay, let us give this a try then. First you'll need to close Radio Downloader and then download the following:

http://www.sqlite.org/sqlite-shell-win32-x86-3071401.zip

Once you have done that, open up the zip and extract sqlite3.exe onto your desktop. Then press the start button and enter "cmd" (without the quotes) and press enter.

Next, enter the following commands in the window that appears:

cd Desktop
sqlite3 "%appdata%\nerdoftheherd.com\Radio Downloader\store.db"
select count(*) from episodes where name is null;

The last command should return a number which should prove or disprove my theory - could you let me know what it is? If I'm right, I'll let you know the commands to fix the issue.

If you get stuck, just let me know and I'll try to clarify or correct the instructions.

ribbons commented 11 years ago

Original comment from Matt Robinson at 12:50:26 on 2012-10-26

Looks like you may have double-clicked on sqlite3.exe - you need to open the start menu, type the word cmd in the search box and then press the enter key before entering those three commands.

ribbons commented 11 years ago

Original comment from elliott.line@yahoo.co.uk at 09:45:22 on 2012-10-26

sql syntax error

Hi Matt I've tried a few times, but it keeps returning a syntax error. I'm not that familiar with SQL, so I'm not sure what the problem is. I'll attach a screen grab of the SQL screen. Elliott

ribbons commented 11 years ago

Original comment from elliott.line@yahoo.co.uk at 17:23:15 on 2012-10-28

Hi Matt, The number returned is 0. Does this confirm your theory or scupper it? Elliott

ribbons commented 11 years ago

Original comment from julianstokes@googlemail.com at 00:07:43 on 2012-10-29

Matt,

I seem to be getting the same issue, crashing while processing after it has downloaded. The processing stage is very slow. I generated a new set of data files and I was able to download one programme when I subscribed.

If I try my original store.db file with all my 66 subscriptions (which is 418Mb) it still crashes. A recent error report was number 37152.

If I enter the commands you have suggested I also get "0" as the output.

I hope this helps? I'd really appreciate it if you could resolve this issue.

Many thanks,

Julian

ribbons commented 11 years ago

Original comment from julianstokes@googlemail.com at 00:27:16 on 2012-10-29

One further comment: having read Bug 695, I've checked my temp directory. I can see the flv and mp3 temporary files being created.

ribbons commented 11 years ago

Original comment from Matt Robinson at 19:40:54 on 2012-10-30

Okay, as promised:

http://www.nerdoftheherd.com/tools/radiodld/downloads/packstoredb.exe

If one of you could download and run the above and then upload the resulting file (a compressed version of your Radio Downloader database with images removed) to this bug I'll see if that sheds any light on the subject...

ribbons commented 11 years ago

Original comment from julianstokes@googlemail.com at 20:45:31 on 2012-10-29

Thanks for your quick response. I look forward getting the updated utility.

Cheers,

Julian

ribbons commented 11 years ago

Original comment from Matt Robinson at 20:14:54 on 2012-10-29

The query returning 0 does rather scupper my theory, but that is at least the point of doing testing ;-).

Julian: Have checked your error report and it does look like you are experiencing the same issue as Elliott - it isn't related to bug 695.

Think I'll need some further information from one of your databases to try and work out what has happened. I've got a utility for gathering this but it needs updating so will try and do that tomorrow evening and then let you know.

ribbons commented 11 years ago

Original comment from julianstokes@googlemail.com at 20:53:37 on 2012-10-30

Hi,

I've put the store.db.7z output file here, as it is too big to upload to your site:

https://docs.google.com/open?id=0B5HeKHAN5Nd4NmRGSDVjdWh5elE

Cheers,

Julian

ribbons commented 11 years ago

Original comment from Matt Robinson at 17:42:05 on 2012-11-04

Thanks for providing your database - I've had the chance to sit down and have a proper look at this and have found the cause of the problem.

The description fields in the database for episode (and programme) have a type of 'memo' which SQLite doesn't understand to be a text field. This means that if the description just contains a numeric value then this crash occurs.

ribbons commented 11 years ago

Original comment from Matt Robinson at 18:05:43 on 2012-11-04

Updated the programme and episode description fields in the database to be 'type' varchar rather than memo in 5d1cbad.

ribbons commented 11 years ago

Original comment from Matt Robinson at 20:20:38 on 2012-11-05

Any idea when the new code will be available?

Busy week this week, hope to get closer to being able to release it over the weekend, but more than that I don't know.

ribbons commented 11 years ago

Original comment from julianstokes@googlemail.com at 09:36:44 on 2012-11-05

Fix sounds great - thanks again for the quick response. Any idea when the new code will be available? I'm happy to trial the new code if that helps? Cheers, Julian.

ribbons commented 11 years ago

Original comment from julianstokes@googlemail.com at 23:16:56 on 2012-11-05

Great - thanks. :-)