473,666 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application only crashes on a few system

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.0304 22-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

Nov 21 '05 #1
5 1726
The error msg is as follows:

System.IO.IOExc eption: Bad file name or number
at Microsoft.Visua lBasic.FileSyst em.PrintLine(In t32 FileNumber, Object[]
Output)
at FileComparator. Selection.Butto n_start_Click(O bject sender, EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs 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.0304 22-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

Nov 21 '05 #2
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
Nov 21 '05 #3
Hi Cor,

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

Private Sub Button_start_Cl ick(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button_start.Cl ick
Dim filename, filename2 As String
Dim file1, file2 As String
Dim startcheck As Boolean

startcheck = False
totError = 0

filename = TextBox_file1.T ext
filename2 = TextBox_file2.T ext
file1name = extractFilename (filename)
file2name = extractFilename (filename2)

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

If startcheck Then
'Header
FileSystem.Prin tLine(1,
"************** *************** *************** ****")
FileSystem.Prin tLine(1, " NCZ vs NCZ Comparison")
FileSystem.Prin tLine(1, " " + file1name + ".NCZ vs " +
file2name + ".NCZ Comparison")
FileSystem.Prin tLine(1, " " & Date.Now.ToStri ng())
FileSystem.Prin tLine(1,
"************** *************** *************** ****")
FileSystem.Prin tLine(1, "")
FileSystem.Prin tLine(1, "")

'Open and Sort file
Try
OpenSortNCZ(fil ename, 1)
OpenSortNCZ(fil ename2, 2)
Catch
MsgBox("Critica l Error during opening file!",
MsgBoxStyle.Cri tical)
End
End Try

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

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

'delete away \ path
strFullPathToFi leName = filename
backslashPos = InStrRev(strFul lPathToFileName , "\")
If backslashPos > 0 Then
strPath = Microsoft.Visua lBasic.Left(str FullPathToFileN ame,
backslashPos)
strFileName = Mid(strFullPath ToFileName, backslashPos + 1)
Else
strPath = ""
strFileName = strFullPathToFi leName
End If

'delete away ext
strFileName = Microsoft.Visua lBasic.Left(str FileName,
InStrRev(strFil eName, ".") - 1)

'MsgBox(strFile Name)
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

Nov 21 '05 #4
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
Nov 21 '05 #5
"Wong_wj" <Wo****@discuss ions.microsoft. com> 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/>

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4656
by: VinnieT | last post by:
I have a load balanced system that consists of 3 production servers. There are about 20 different applications that are used on these boxes. One of my applications in particular is used more than the others. Since updating 2 applications, I have had problems on the event log of the servers, following stopping of the aspnet_ws.exe process. Something is causing the following error in the windows application event log: The description for...
2
2135
by: Christian Kreimer | last post by:
Hi I created an C# windows forms application that holds a user control. The user control itself is an editor for geographical information systems and is based on an ActiveX Library for providing basic geografic operations. It works fine most of the time, but sometimes it crashes with weird messages and i'm not able to track the error down - to find out the reason for this problem. It's some kind of an memory problem - I get the message...
8
6036
by: mike2036 | last post by:
I have an application (that has unmanaged code) and when I launch it without 'FullTrust' permissions (LocalIntranet_Zone), it crashes. When I set 'FullTrust' permissions, it launches fine. Is there a way I can compile the application such that it won't even attempt to launch without correct permissions instead of just crashing? Thanks for any help. -Mike
1
1703
by: Stefan Pascal | last post by:
Hello. I have a very strange problem on my system with running C# applications from a longer than usual (>127 chars) path. I was able to reproduce the following 2 cases: 1. Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // <-- crashes here #1 2. SqlConnection con = new SqlConnection("Persist Security Info=False;server=MyServer\\MyInstance;database=MyDataBase;Connect
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8638
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7381
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6191
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.