none
vshost.exe crashes when calling Close() RRS feed

  • Question

  • Hello everyone, I'm a student and I'm working on a project for college, a rather simple media player.

    I'm using an Access 2010 database to save the user's music library information and the program reads and writes to the DB when needed.

     

    Up until yesterday everything worked fine, today I started to work on playlist integration. It works by saving the file paths of the songs chosen to a text file, then it sends the file path of that text file and the playlist name to the appropriate table in the DB. Writing to a text file using the TextWriter class, and it looks something like this:

     

         
    
    System.IO.TextWriter writer;
    
    ....
    
    
    playlistPath = Application.StartupPath + "\\playlists\\" + playlistName + ".txt";
    writer = new StreamWriter(playlistPath, true);
          
          //write to file
          try
          { //BRNSong -> my own class for handling mp3 info
           //core.nowPlayling.songList is the list of currently selected songs
            foreach (BRNSong song in core.nowPlaying.songList)
            {
              writer.WriteLine(song.getFilePath());
            }
          }
    
          catch (Exception ex)
          {
            throw ex;
          }
          finally
          {
            writer.Close();
          }
    

     

     

    That part works fine, but here's the evil part, when I try to access the database(mind you, the function that does it comes after the code up there) to read data (select command),when I close that connection ( conn.Close() ), the program crashes vshost.exe and everything is ruined.

    The odd part here is that anywhere else that I use that function, the connection closes up just fine, so I have no idea why that happens.

     

    the error I get is this:

    http://bit.ly/batfgx

     

    full text:

    Problem signature:
     Problem Event Name:	APPCRASH
     Application Name:	BRNPlayer.vshost.exe
     Application Version:	9.0.30729.1
     Application Timestamp:	488f1c9b
     Fault Module Name:	tiptsf.dll
     Fault Module Version:	6.1.7600.16385
     Fault Module Timestamp:	4a5bdb20
     Exception Code:	c0000005
     Exception Offset:	0000197f
     OS Version:	6.1.7600.2.0.0.256.1
     Locale ID:	1037
     Additional Information 1:	0a9e
     Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
     Additional Information 3:	0a9e
     Additional Information 4:	0a9e372d3b4ad19135b953a78882e789
    
    Read our privacy statement online:
     http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    
    If the online privacy statement is not available, please read our privacy statement offline:
     C:\Windows\system32\en-US\erofflps.txt
    

     

     

    I really have no idea why that happens, tomorrow I'm going to try and reproduce this error in one of the college's computers, hopefully it's just malfunctioning on my end.

     

    If you got any suggestions or solutions, then please, by all means, let me hear them.

     

    Thanks.

     

    Wednesday, April 21, 2010 12:55 PM

Answers

  • OK so after some investigation, I disabled the whole Tablet PC package that Windows 7 has , and now everything's fine.

     

    So while it didn't solve the actual problem (the program will still crash in any other Win7 PC with Tablet options installed), I'll make sure the computer I'll showcase the program with will have that feature disabled.

     

     

    Thanks for the help! 

    • Marked as answer by SegevR Thursday, April 22, 2010 9:42 PM
    Thursday, April 22, 2010 12:28 PM

All replies

  • As an easy workaround you can disable the hosting process: http://msdn.microsoft.com/en-us/library/ms185330.aspx

    If you can reproduce the crash in your application, then you probably have a bug somewhere in your code - get a call stack and investigate it.

    Out of curiosity: Why do you use catch-Exception_ex-throw_ex? That code is useless as it is now, just remove it and keep only the finally block.

    -Karel

    Wednesday, April 21, 2010 4:48 PM
    Moderator
  • Another idea (related to the DLL that crashes) might be here: http://support.microsoft.com/?scid=kb%3Ben-us%3B827220&x=5&y=14. Otherwise, you'd need to reproduce this when having a debugger attached and with the correct symbol path set, as Karel lined out.

     

    Wednesday, April 21, 2010 7:38 PM
  • How is that I am having trouble with tiptsf.dll? I don't even have a tablet, and I'm running Windows 7.

    Is there a way to get rid of it?

     

    and Karel , I use the "throw ex" bit to throw the exception back to the source, there usually awaits a message box that is showing the exception if thrown.

    Thursday, April 22, 2010 12:10 PM
  • OK so after some investigation, I disabled the whole Tablet PC package that Windows 7 has , and now everything's fine.

     

    So while it didn't solve the actual problem (the program will still crash in any other Win7 PC with Tablet options installed), I'll make sure the computer I'll showcase the program with will have that feature disabled.

     

     

    Thanks for the help! 

    • Marked as answer by SegevR Thursday, April 22, 2010 9:42 PM
    Thursday, April 22, 2010 12:28 PM
  • Re: and Karel , I use the "throw ex" bit to throw the exception back to the source, there usually awaits a message box that is showing the exception if thrown.
    That will mess up the call stack. You will not see the beginning where the exception originated. As I said, it is useless code (it does actually nothing), get rid of it.

    -Karel

    Thursday, April 22, 2010 4:11 PM
    Moderator