473,654 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unexpected Error!!

A VB6 program that I created has been installed on a wide range of computers
and networks without any problems. Win 95, Win 98 and XP so far..
Occasionally, however, the function refuses to start on some systems, with
the only response being a critical error: 'Unexpected Error!', without even
trying to run.

Well! I didn't expect it, either!

Re-compiling and re-installing doesn't change anything. The program is
nothing really special. Reading, modifying and rewriting files is all it
does and all the files it needs to read are pre-written during install..

Does anyone have any idea what sort of problems commonly produce such a
message? Is the range of suspects far too great to even guess? Why does
it start OK on most computers but refuses on one or two?

Frustrating!!! A meaningful error message would help.

Don
Mar 5 '06 #1
8 12517
D & J G wrote:
A VB6 program that I created has been installed on a wide range of computers
and networks without any problems. Win 95, Win 98 and XP so far..
Occasionally, however, the function refuses to start on some systems, with
the only response being a critical error: 'Unexpected Error!', without even
trying to run.

Well! I didn't expect it, either!


I suggest you put some logging in your code to see how far it gets if
anywhere.
Does it ever run on a machine its failed on?
Are you using any custom controls?

--
Dean Earley (de*********@ic ode.co.uk)
i-Catcher Development Team

iCode Systems
Mar 7 '06 #2
** Responses interspersed..

"Dean Earley" <de*********@ic ode.co.uk> wrote in message
news:44******** *************** @news.zen.co.uk ...
D & J G wrote:
A VB6 program that I created has been installed on a wide range of
computers and networks without any problems. Win 95, Win 98 and XP so
far.. Occasionally, however, the function refuses to start on some
systems, with the only response being a critical error: 'Unexpected
Error!', without even trying to run.

Well! I didn't expect it, either!
I suggest you put some logging in your code to see how far it gets if
anywhere.


** Not sure how to do this. I'm somewhat a newbie :O(
Does it ever run on a machine its failed on?
** No. Refuses to start.
Are you using any custom controls?
** No

** Thanks for your input.

--
Dean Earley (de*********@ic ode.co.uk)
i-Catcher Development Team

iCode Systems

Mar 8 '06 #3
D & J G wrote:
** Responses interspersed..

"Dean Earley" <de*********@ic ode.co.uk> wrote in message
news:44******** *************** @news.zen.co.uk ...
D & J G wrote:
A VB6 program that I created has been installed on a wide range of
computers and networks without any problems. Win 95, Win 98 and XP so
far.. Occasionally, however, the function refuses to start on some
systems, with the only response being a critical error: 'Unexpected
Error!', without even trying to run.

Well! I didn't expect it, either!

I suggest you put some logging in your code to see how far it gets if
anywhere.


** Not sure how to do this. I'm somewhat a newbie :O(


Either open a file for append and "print" to it, or msgboxes in key
places in the code.

--
Dean Earley (de*********@ic ode.co.uk)
i-Catcher Development Team

iCode Systems
Mar 9 '06 #4

"D & J G" <do********@opt usnet.com.au> wrote in message
news:44******** **************@ news.optusnet.c om.au...
A VB6 program that I created has been installed on a wide range of computers
and networks without any problems. Win 95, Win 98 and XP so far..
Occasionally , however, the function refuses to start on some systems, with the
only response being a critical error: 'Unexpected Error!', without even trying
to run.

Well! I didn't expect it, either!

Re-compiling and re-installing doesn't change anything. The program is
nothing really special. Reading, modifying and rewriting files is all it does
and all the files it needs to read are pre-written during install..

Does anyone have any idea what sort of problems commonly produce such a
message? Is the range of suspects far too great to even guess? Why does it
start OK on most computers but refuses on one or two?


No two computers are exactly alike. Stuff happens. If it's weird, don't ask the
why question :)

Some things you might check:

Which OS does it sometimes fail on? (I'm guessing XP...)
Where did you put those files "pre-written during install"? (I'm guessing
Program Files...)
Did you run a setup for the program? Look at the list of files in the setup
(setup.lst). Is every one of those files on the pesky machine? Is each one at
least as new as the version in your setup? Are your "pre-written" files present?

One possible scenario is that while many XP users are set up as machine
administrators, you have encountered someone who is not. They may be denied
permission to install some dlls, or may not have read/write permissions on files
located in Program Files. If your program tries something very early in startup
that is denied, the program might not be perceived by the OS to have even loaded
up and started, hence the "unexpected " error. The most common cause is probably
file permissions.
Mar 10 '06 #5

"D & J G" <do********@opt usnet.com.au> wrote in message
news:44******** **************@ news.optusnet.c om.au...
** Responses interspersed..
...
I suggest you put some logging in your code to see how far it gets if
anywhere.


** Not sure how to do this. I'm somewhat a newbie :O(


You can create a sub such as..

Sub myDebug(mystr$)
dim f$
f$ = App.Path & "\debug.txt "
Open f$ for append as # 1
print #1, mystr$
Close
End Sub
And call this routine to write out "markers where you're at in the program.
For example

Call myDebug("In sub MAIN getting preferences")
Call myDebug("Gettin g user network ID..")

Reading user settings..
etc.. etc..

Examining the file will give you an idea how far you get and where the
program may have issues..
Mar 10 '06 #6

"Raoul Watson" <Wa*****@Intell igenCIA.com> wrote in message
news:tLbQf.1967 1$6h1.18785@trn dny09...

"D & J G" <do********@opt usnet.com.au> wrote in message
news:44******** **************@ news.optusnet.c om.au...
** Responses interspersed..
> ...
> I suggest you put some logging in your code to see how far it gets if
> anywhere.


** Not sure how to do this. I'm somewhat a newbie :O(


You can create a sub such as..

Sub myDebug(mystr$)
dim f$
f$ = App.Path & "\debug.txt "
Open f$ for append as # 1
print #1, mystr$
Close
End Sub
And call this routine to write out "markers where you're at in the
program.
For example

Call myDebug("In sub MAIN getting preferences")
Call myDebug("Gettin g user network ID..")

Reading user settings..
etc.. etc..

Examining the file will give you an idea how far you get and where the
program may have issues..

When running, as soon as the code gets to
myDebug
I get the message

Compile Error:
"Argument not optional"

Huh! Am I too green for this?
Don
Mar 11 '06 #7

"D & J G" <do********@opt usnet.com.au> wrote in message
news:44******** *************** @news.optusnet. com.au...
When running, as soon as the code gets to
myDebug
I get the message

Compile Error:
"Argument not optional"


the routine expect a string to be passed. If you omit it, you will get an
error.
If you use a variable, make sure the variable is declared as a string, e.g

Dim mystr as String
....
mystr = "Getting user network ID."
call myDebug(mystr)

if not, you'll get a byref argument type mismatch. test out the routine by
itself
Just create a form with a button:

Private Sub Command1_Click( )
Dim mystr As String
mystr = "Cmd 1 Pressed"
Call myDebug(mystr)
End Sub

Sub myDebug(mystr$)
Dim f$
f$ = App.Path & "\debug.txt "
Open f$ For Append As #1
Print #1, mystr$
Close
End Sub
Mar 11 '06 #8

"Raoul Watson" <Wa*****@Intell igenCIA.com> wrote in message
news:%IzQf.3$Vb .2@trndny01...

"D & J G" <do********@opt usnet.com.au> wrote in message
news:44******** *************** @news.optusnet. com.au...

When running, as soon as the code gets to
myDebug
I get the message

Compile Error:
"Argument not optional"


the routine expect a string to be passed. If you omit it, you will get an
error.
If you use a variable, make sure the variable is declared as a string, e.g

Dim mystr as String
...
mystr = "Getting user network ID."
call myDebug(mystr)

if not, you'll get a byref argument type mismatch. test out the routine by
itself
Just create a form with a button:

Private Sub Command1_Click( )
Dim mystr As String
mystr = "Cmd 1 Pressed"
Call myDebug(mystr)
End Sub

Sub myDebug(mystr$)
Dim f$
f$ = App.Path & "\debug.txt "
Open f$ For Append As #1
Print #1, mystr$
Close
End Sub

Thank you so much, Raoul. How dumb I feel! All was OK except that I hadn't
declared the variable (Duh).

All is well now. Just have to test it in my program.

Don
Mar 11 '06 #9

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

Similar topics

3
11058
by: user_5701 | last post by:
Hello, I'm getting an error with a Docmd.Transferspreadsheet line of code: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2000, "tblTest", pathAndFilename, True The above line works perfectly fine, but when I change the table name argument (tblTest) to the name of a query, it fails and gives the following error:
1
2968
by: Angel | last post by:
I'm trying to connect to a fixed IP address (eg. http://10.60.903.50/TempFile) in order to retrieve one accii line of text in TempFile. I try to read the information with this code: string fullpath = " http://10.60.93.51/TempFile "; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(fullpath); //req.KeepAlive = false; HttpWebResponse res; StreamReader sr; string strResult = "";
1
8847
by: Fredrik L | last post by:
Hi, We have an application outside the firewall who talks to a webservice inside the firewall. 9 times of 10 this works, but sometimes we got the error "The underlying connection was closed: An unexpected error occurred on a receive." We have tested some of the solutions that we have found in this discussion group but the problem still exist. We use .NET Framework 1.1. The application server use Win2003. The webservice server use...
5
24747
by: Vijayakrishna Pondala | last post by:
Hi, We are using the following error randomly, when accessing a webservice method/servlet hosted on JBoss application server: The underlying connection was closed: An unexpected error occurred on a receive. We are using .NET v1.1.
0
1418
by: tharika | last post by:
Hi, We have an ASP.NET web application hosted on a development server, that invokes web services hosted on an offshore server in India, both being on the same intranet domain. The default page of the application makes a call to a service and is painted successfully. Navigation to any other application page, which invokes the same service throws the error, "Underlying connection was closed. An unexpected error occurred on receive"....
4
20477
by: Matthew.DelVecchio | last post by:
hello, i am developing an ASP.NET web app that consumes a 3rd party vendor webservice. it is my first one so while ive done my homework, im not an expert on the matter. our partner's webservice operates on SSL via an "https://" url. they also gave me a .PFX certificate which ive installed via window's MMC utility, into the "Computer account"'s Personal store; as indicated by articles id found. i then export a .CER to the filesystem...
11
4212
by: MLH | last post by:
Private Sub ButtonP_Click() On Error GoTo Err_ButtonP_Click Dim ThisForm As String ThisForm = Me.Name Exit_ButtonP_Click: Exit Sub Err_ButtonP_Click: Dim r As String, k As String, Message3 As String
0
3150
by: pct | last post by:
Please help !!!! while preparing visual basic 6.0 setup with crystal reports 8.5, once I clicked on Finish I got mesage 'unexpected error 28 : out of stack space', on the net I found the resolution for the same, ie. update the crpe32.dll, once this was done, The above mentioned error was gone but I got a new error 'unexpected error 76 has occured: path not found' can anybody help Thanks Pct
1
8835
by: Mrozik | last post by:
Hi! I have a problem - after deploying application in client environment, on some client machines occured error. Environment: App server: ASP.NET WebService/Win 2003/ secured SSL (.NET 2.0) Client app: SmartClient - WinForms (.NET 2.0) I trust all server cetrificates - at the start of client application I call:
0
8375
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
8815
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...
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8593
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
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2714
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
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
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.