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?
Printable View
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?
if that PC doesn't meet VS.NET requirements then expect worst:D
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.
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.
Ok , paste this code where you expect the error fires.
http://www.codeproject.com/useritems/FormClosing.asp
It should help .;)
As this happens on a target machine then i have build the setup project, unistall the previous and so on... not that easy :(Quote:
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.
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.
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!!??" ;)Quote:
Ok , paste this code where you expect the error fires.
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....
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
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.
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
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.
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.