|
-
Dec 22nd, 2002, 04:03 AM
#1
Thread Starter
Frenzied Member
Application ends unexpectedly with no error
My application ends unexpectedly during database update without generating any error. This happens only in one of computers which is a slow one. How can I avoid this?
-
Dec 22nd, 2002, 01:21 PM
#2
Sleep mode
if that PC doesn't meet VS.NET requirements then expect worst
-
Dec 22nd, 2002, 02:03 PM
#3
Thread Starter
Frenzied Member
From MSDN:
To run applications on the .NET Framework, you need:
Minimum Requirements :
Processor Intel Pentium class, 90 MHz or higher
Operating System Microsoft Windows 2000, with the latest Windows service pack and critical updates available from Microsoft Security Web site
Microsoft Windows XP
Microsoft Windows NT 4.0
Windows Millennium Edition (Windows ME)
Windows 98
(Note: Windows NT 4.0 Terminal Server is not supported)
Minimum RAM Requirements 32 MB (96 MB or higher recommended)
Hard Disk Hard disk space required to install: 160 MB
Hard disk space required: 70 MB
Display Video: 800×600, 256 colors
Input Device Microsoft mouse or compatible pointing device
Other Microsoft Internet Explorer 5.01 or later is required Microsoft Data Access Components 2.6 is required (Microsoft Data Access Components 2.7 is recommended).
That PC i am talking about meets the minimum requirments.
-
Dec 22nd, 2002, 05:40 PM
#4
Member
Try breakpoints where you suspect the 'error' is happening. If you don't have an idea of what section it is happening, you can use 'single stepping' through the entire code.
-
Dec 23rd, 2002, 11:15 AM
#5
Sleep mode
Ok , paste this code where you expect the error fires.
http://www.codeproject.com/useritems/FormClosing.asp
It should help .
-
Dec 23rd, 2002, 11:37 AM
#6
Thread Starter
Frenzied Member
Try breakpoints where you suspect the 'error' is happening. If you don't have an idea of what section it is happening, you can use 'single stepping' through the entire code.
As this happens on a target machine then i have build the setup project, unistall the previous and so on... not that easy 
By the way it would be nice if someone tell me how to build a setup project that automatically removes the previous one, using setup and deployment of VS.NET not those third party programs.
Ok , paste this code where you expect the error fires.
I have seen that post before and i was going to search for it and use it, thank you ,but i am almost sure it will return "Don't Know why I'm closing!!??"
-
Dec 23rd, 2002, 11:14 PM
#7
Member
Can't help you on the setup project that removes a previous version of the program being installed, but I know it is possible.
Regarding the unexpected error:
Instead of using break points, insert code to write to a .txt or .dat file, such as "code successfully completed Function Blah_Blah." After each section of code, write the next line to the Windows_poo_poo.txt/.dat file. You can also write the code to check to see if it has the Windows_poo_poo.txt or .dat file, and then create a second dump file, such as Windows_poo_poo2.txt. This way, you can run the suspected problem program several times, and see if the unexpected error is occurring at the same line of code, or see if it random.
Hopefully the end user won't find the fact that you have to install this "tester" program on his/her pc, but then again, it's either that or having the application fail all the time!
I just got home from working 13 hours, I am tired, so I won't give any code examples right now, but if you want, I can post some tomorrow.
Until then,,,, I hear my bed calling me....
"It is preoccupation with possessions, more than anything else, that prevents us from living freely and nobly." -Bertrand Russell
-
Dec 24th, 2002, 01:17 AM
#8
You could use a TraceWriter to send your debug statements to a file. You can probably even do it with an app config file without a recompile.
http://www.vbforums.com/showthread.p...trace+listener
-
Dec 25th, 2002, 06:01 AM
#9
Thread Starter
Frenzied Member
Nothing! no debug stamtments are written to files, no error is produced at all!!!!
The form in which this happens does not control the main life cycle of the program and should error close this form then the main form of the program should take over the control (am i right?) but tihis error happens at application level and I dont know how to use Application.ThreadException to control errors.
All i have found out is that the event happens about the 16th loop whether going up (for eample 0 to x) or down (x to 0 step -1)!!!
I have to do some more tests like making false loops to check it further.
-
Dec 26th, 2002, 01:27 AM
#10
Try something like this:
VB Code:
'here is to add the handler for the event
AddHandler Application.ThreadException, AddressOf AppThreadError
'here is the event delegate
Public Sub AppThreadError(ByVal sender As Object, ByVal e As Threading.ThreadExceptionEventArgs)
'handle error here
End Sub
-
Dec 26th, 2002, 05:47 AM
#11
Thread Starter
Frenzied Member
Thanks Edneeis,
I had to change that piece of code and it works fine, still i dont know why the previous didnt work on that special machine.
-
Dec 26th, 2002, 05:53 AM
#12
Thread Starter
Frenzied Member
Thanks Edneeis,
I had to change that piece of code and it works fine, still i dont know why the previous didnt work on that special machine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|