PC Review


Reply
Thread Tools Rate Thread

Application only crashes on a few system

 
 
=?Utf-8?B?V29uZ193ag==?=
Guest
Posts: n/a
 
      24th Mar 2005
Hi all,

I have created a VB.net application using:
Microsoft Development Environment 2002 Version 7.0.9466
Microsoft .NET Framework 1.0 Version 1.0.3705

The application was working fine in one system but crashes on the other.
1) Functioning PC
OS :Window XP service pack 1, Version 1 (Build 2600.xpsp2.030422-1633)
..Net : Version V1.1.4322

2) Not Functioning PC
OS :Window XP service pack 1, Version 1 (Build 2600.xpsp2_gdr.040517-1325)
..Net : Version V1.1.4322

Any suggestion on what could be the problem?
What other information do I need to pinpoint where could be the problem?
Is it because of the XP service pack version? I can find any information
regarding the different build information.

Thanks,
Wong

 
Reply With Quote
 
 
 
 
=?Utf-8?B?V29uZ193ag==?=
Guest
Posts: n/a
 
      24th Mar 2005
The error msg is as follows:

System.IO.IOException: Bad file name or number
at Microsoft.VisualBasic.FileSystem.PrintLine(Int32 FileNumber, Object[]
Output)
at FileComparator.Selection.Button_start_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
..........


"Wong_wj" wrote:

> Hi all,
>
> I have created a VB.net application using:
> Microsoft Development Environment 2002 Version 7.0.9466
> Microsoft .NET Framework 1.0 Version 1.0.3705
>
> The application was working fine in one system but crashes on the other.
> 1) Functioning PC
> OS :Window XP service pack 1, Version 1 (Build 2600.xpsp2.030422-1633)
> .Net : Version V1.1.4322
>
> 2) Not Functioning PC
> OS :Window XP service pack 1, Version 1 (Build 2600.xpsp2_gdr.040517-1325)
> .Net : Version V1.1.4322
>
> Any suggestion on what could be the problem?
> What other information do I need to pinpoint where could be the problem?
> Is it because of the XP service pack version? I can find any information
> regarding the different build information.
>
> Thanks,
> Wong
>

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      24th Mar 2005
Wong,

The only thing I can come up from this information and because of the
different versions, (I don't know if that is for language types), that it
can be that the computers have different country settings and that you have
hard coded stringsformat which you use as filenames.

However can maybe show the code where that io operation is done where it
crashes?

Cor


 
Reply With Quote
 
=?Utf-8?B?V29uZ193ag==?=
Guest
Posts: n/a
 
      24th Mar 2005
Hi Cor,

Thanks for the reply.
Here are some of the codes which might be causing the problem.

Private Sub Button_start_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button_start.Click
Dim filename, filename2 As String
Dim file1, file2 As String
Dim startcheck As Boolean

startcheck = False
totError = 0

filename = TextBox_file1.Text
filename2 = TextBox_file2.Text
file1name = extractFilename(filename)
file2name = extractFilename(filename2)

If selectType = 1 Then
saveFilename = UDFolder + "\" + file1name + "_NCZvsNCZ.rep"
startcheck = startError()

If startcheck Then
'Header
FileSystem.PrintLine(1,
"************************************************")
FileSystem.PrintLine(1, " NCZ vs NCZ Comparison")
FileSystem.PrintLine(1, " " + file1name + ".NCZ vs " +
file2name + ".NCZ Comparison")
FileSystem.PrintLine(1, " " & Date.Now.ToString())
FileSystem.PrintLine(1,
"************************************************")
FileSystem.PrintLine(1, "")
FileSystem.PrintLine(1, "")

'Open and Sort file
Try
OpenSortNCZ(filename, 1)
OpenSortNCZ(filename2, 2)
Catch
MsgBox("Critical Error during opening file!",
MsgBoxStyle.Critical)
End
End Try

'Checking both file
Try
checkNCZVsNCZ()
Catch
MsgBox("Critical Error during checking file!",
MsgBoxStyle.Critical)
End
End Try
End If
............
End Sub

Public Function extractFilename(ByVal filename As String) As String
Dim strFullPathToFileName As String
Dim strPath As String
Dim strFileName As String
Dim backslashPos As Integer

'delete away \ path
strFullPathToFileName = filename
backslashPos = InStrRev(strFullPathToFileName, "\")
If backslashPos > 0 Then
strPath = Microsoft.VisualBasic.Left(strFullPathToFileName,
backslashPos)
strFileName = Mid(strFullPathToFileName, backslashPos + 1)
Else
strPath = ""
strFileName = strFullPathToFileName
End If

'delete away ext
strFileName = Microsoft.VisualBasic.Left(strFileName,
InStrRev(strFileName, ".") - 1)

'MsgBox(strFileName)
Return strFileName

End Function

Hope this helps.....


"Cor Ligthert" wrote:

> Wong,
>
> The only thing I can come up from this information and because of the
> different versions, (I don't know if that is for language types), that it
> can be that the computers have different country settings and that you have
> hard coded stringsformat which you use as filenames.
>
> However can maybe show the code where that io operation is done where it
> crashes?
>
> Cor
>
>
>

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      24th Mar 2005
Wong,

I don't see directly what can be the error, however one thing I see is that
you use some dangerous code in the part where it goes wrong by using the +
as concatenator instead from the &. This can give errors in some situation.

As well would I use the streamwriter in your situation, not that it helps,
however makes it in my opinion more readable.

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps anyhow,

Cor


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      24th Mar 2005
"Wong_wj" <(E-Mail Removed)> schrieb:
> Public Function extractFilename(ByVal filename As String) As String


You may want to use 'System.IO.Path.GetFileName' instead of your
implementation. (This won't solve the problem.)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Random application crashes & system restarts =?Utf-8?B?R3VndWxvaQ==?= Windows XP Help 0 2nd Feb 2006 05:55 AM
My application crashes when I open Word! (System.NullReferenceException) Graeme Neath Microsoft VB .NET 2 6th Sep 2005 04:45 PM
System crashes when .net application is installed on Windows98 Pradeep Microsoft Dot NET Framework Forms 1 28th Jan 2004 02:12 PM
XP System Crashes and System Restore Doesnt Work Scott Proudfoot Windows XP Performance 1 18th Oct 2003 08:14 PM
Multi-processor system and application crashes seesharp Microsoft Dot NET 1 9th Sep 2003 08:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 PM.