Constantly Crashing


The program crashes after any song has been playing for 5-10 seconds before it crashes. Sometimes it has shown the popup, sometimes not.
I have tried this with the stable release (from Apr 27) and downloading the source and debugging in Visual Studio. When running the stable release I get "iTuner has stopped working" error with a System.NullReferenceException. When debugging the program just exits without warning. In the debug window I can see
A first chance exception of type 'System.NullReferenceException' occurred in iTuner.exe
A first chance exception of type 'System.InvalidOperationException' occurred in PresentationCore.dll
Also, why is it that the stable version has normal text and the working version has all the letters messed up?
Closed Sep 10, 2014 at 2:07 PM by stevenmcohn


coderforlife wrote May 4, 2012 at 12:22 AM

I found that the error is dumping to a log file (saw your SmartException class). Here is the dump:

<?xml version="1.0" encoding="utf-16"?>
<SmartException etype="System.NullReferenceException">
<message>Object reference not set to an instance of an object.</message>
<stackTrace> at iTuner.iTunes.CatalogBase.FilterMusicalExtensions(IEnumerable`1 list) in D:\Documents\Programming\iTuner\iTuner\iTuner\iTunes\Librarian\Catalog\CatalogBase.cs:line 365
at iTuner.iTunes.TerseCatalog.LoadExtensions() in D:\Documents\Programming\iTuner\iTuner\iTuner\iTunes\Librarian\Catalog\TerseCatalog.cs:line 1337
at iTuner.iTunes.CatalogBase.IsValidExtension(String ext) in D:\Documents\Programming\iTuner\iTuner\iTuner\iTunes\Librarian\Catalog\CatalogBase.cs:line 281
at iTuner.iTunes.Librarian.DoFileExistence(Object sender, FileSystemEventArgs e) in D:\Documents\Programming\iTuner\iTuner\iTuner\iTunes\Librarian\Librarian.cs:line 348
at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)</stackTrace>
<helpLink />

coderforlife wrote May 4, 2012 at 12:33 AM

Okay, further research, the problem is with "OpenSubKey(ext)" returning in the line:

string perceived = Registry.ClassesRoot.OpenSubKey(ext).GetValue("PerceivedType", "") as string;

Which is true for any ext that is not found on the computer. The offending extension was:


I have web-playlists, which apparently don't jive well. My suggestion is to breakup this line into something like this:

RegistryKey key = Registry.ClassesRoot.OpenSubKey(ext);
if (key == null) continue;
string perceived = key.GetValue("PerceivedType", "") as string;

stevenmcohn wrote May 4, 2012 at 1:37 AM

Awesome diagnostics! Thanks! I'll make sure it's fixed up. I haven't even tried web playlists. Guess I will now....

As for the "messed up" text when running from VS, see the "Translation" doc page. I did this intentionally to ensure 100% coverage for all translatable text.


wrote May 4, 2012 at 1:42 AM

wrote May 4, 2012 at 4:30 PM

wrote Sep 1, 2012 at 1:30 PM

wrote Sep 1, 2012 at 1:32 PM

wrote Feb 21, 2013 at 11:44 PM

wrote May 16, 2013 at 11:11 AM

wrote May 16, 2013 at 11:11 AM

wrote Jun 14, 2013 at 8:19 AM

wrote Sep 10, 2014 at 2:07 PM

wrote Sep 10, 2014 at 2:07 PM