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 on startup if HKCU\..\Run registry key is missing. #178

Closed ribbons closed 11 years ago

ribbons commented 11 years ago

Original report from Martin Lancaster at 09:55:35 on 2012-06-30

Upgraded 0.24 to 0.24.2

On start of application, UE is thrown:

version 0.24.2.0 errortext: SystemNullReferenceException: Object reference not set to an instance of an object. errordetails: SystemNullReferenceException at RadioDLD.OSUtils.ApplyRunOnStartup in e:\Visual Studio\Radio Downloader\Classes\OSUtils.cs:line 164 .....

Have sent Windows error report.

  1. OS = Windows 2003 R2 Enterprise Service Pack 2
  2. .Net framework 1.0.3705, 1.1.4322, 2.0.50727, 3.0 and 3.5 installed.
  3. Dual Xeon 2.80 GHz with 3GB RAM

Note, if the Microsoft "Please report this error" dialogue is not actioned, Radio Downloader works ok. When the error dialogue is actioned, Radio Downloader is closed down. Restart Radio Downloader, and error is replicated. Error refers to Drive e; this drive does not exist on the running machine - only c:, d: and m: Finally, error did not occur on 0.24 build.


Imported from Bug 670 in the NerdoftheHerd.com Bugzilla.

ribbons commented 11 years ago

Original comment from Matt Robinson at 23:29:17 on 2012-06-30

Could you give an example error report number? (The reports actually come to me, not Microsoft).

ribbons commented 11 years ago

Original comment from Martin Lancaster at 09:30:24 on 2012-07-01

I have just started the application again, and got the "Please tell us about the error" message. Clicked "Send error details", which it has done. Next popup says "Thanks" and quotes a report number of 34266.

Is this the error number you need?

Regards,

Martin

ribbons commented 11 years ago

Original comment from Matt Robinson at 10:02:18 on 2012-07-01

Is this the error number you need?

Yes.

If you open the Registry Editor (Start -> Run -> regedit), does the key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run exist?

ribbons commented 11 years ago

Original comment from Martin Lancaster at 10:10:05 on 2012-07-01

Hi,

No, HKCU/SOFTWARE\Microsoft\Windows\CurrentVersion\Run does not exist.

(HKCU/SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce does exist though)

Regards,

Martin

ribbons commented 11 years ago

Original comment from Matt Robinson at 10:27:33 on 2012-07-01

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]

Could you try applying this to your registry and seeing if it fixes the issue for you?

ribbons commented 11 years ago

Original comment from Matt Robinson at 10:25:57 on 2012-07-01

That looks to be the reason then. Interestingly, Windows 7 just seems to re-create the key if I delete it, so I can't so easily replicate the behaviour here.

ribbons commented 11 years ago

Original comment from Martin Lancaster at 10:36:24 on 2012-07-01

Hi,

OK, have run the .reg file on the registry (File | Import | HKCU_Run.reg).

Regedit reports that key has been imported successfully.

Start RadioDownloader, and no error, so it is a fix. Can I leave you to update bugzilla and close the report?

Many thanks for your help!

Regards,

Martin

ribbons commented 11 years ago

Original comment from Matt Robinson at 11:03:21 on 2012-07-01

Switched to calling CreateSubKey instead of OpenSubKey in 9bbd746 so that the Run key will be automatically created if it is missing.