Results 1 to 12 of 12

Thread: Application ends unexpectedly with no error

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474

    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?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    if that PC doesn't meet VS.NET requirements then expect worst

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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.

  4. #4
    Member Jared's Avatar
    Join Date
    Nov 2002
    Posts
    58
    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.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Ok , paste this code where you expect the error fires.
    http://www.codeproject.com/useritems/FormClosing.asp
    It should help .

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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!!??"

  7. #7
    Member Jared's Avatar
    Join Date
    Nov 2002
    Posts
    58
    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

  8. #8
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    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

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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.

  10. #10
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Try something like this:
    VB Code:
    1. 'here is to add the handler for the event
    2. AddHandler Application.ThreadException, AddressOf AppThreadError
    3.  
    4. 'here is the event delegate
    5.     Public Sub AppThreadError(ByVal sender As Object, ByVal e As Threading.ThreadExceptionEventArgs)
    6.         'handle error here
    7.     End Sub

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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.

  12. #12

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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
  •  



Click Here to Expand Forum to Full Width