[Mono-dev] Mono crash on opening Logfile!

Easy_Rider9999 jhmgbl2 at t-online.de
Sun Mar 29 08:44:23 EDT 2009


In my program I open the logfile of my application and read the contents. The
code is:

lblLogFileName.Text =
My.Application.Log.DefaultFileLogWriter.FullLogFileName

      intFile = FileSystem.FreeFile
      gStatus = CodeLoc & "FreeFile " & intFile
      fLen = CInt(FileSystem.FileLen(lblLogFileName.Text))
      gStatus = CodeLoc & "fLen " & fLen
      gStatus = CodeLoc & "FileOpen " & lblLogFileName.Text
      FileSystem.FileOpen(intFile, lblLogFileName.Text, OpenMode.Input,
OpenAccess.Read, OpenShare.Shared)
      gStatus = CodeLoc & "InputString"
      txtLog.Text = FileSystem.InputString(intFile, fLen)

Error Message: DefaultSource	Error	2	Object reference not set to an instance
of an object Application Error  at 3/29/2009 1:38:04 PM gstatus:
frmLog_LoadFileOpen /home/mono/Desktop/repetit/Repetit.Net.T.SQLite.log
Version: 0.6.3375.24687

System.NullReferenceException: Object reference not set to an instance of an
object
  at Microsoft.VisualBasic.FileSystem.FileOpen (Int32 FileNumber,
System.String FileName, OpenMode Mode, OpenAccess Access, OpenShare Share,
Int32 RecordLength) [0x00000] in
/usr/src/packages/BUILD/mono-basic-2.2/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic/FileSystem.vb:291 
  at Repetit.net.T.SQLite.frmLog.frmLog_Load (System.Object sender,
System.EventArgs e) [0x00000] 

 Innerexception: 


Hans
-- 
View this message in context: http://www.nabble.com/Mono-crash-on-opening-Logfile%21-tp22767226p22767226.html
Sent from the Mono - Dev mailing list archive at Nabble.com.



More information about the Mono-devel-list mailing list