locked
Application Error on exit with error message : the exception unknown software exception (0xc0020001) at location (0x7c80bee7)

    Question

  • hi everyone,
    sorry for the subject legth. I have been searching an answer for 3 days but i couldn't find a solution. Here is my problem.

    I got a vb.net desktop application that works at 12 different notebooks and on my local machine. it works great on these computers. 3 days ago i was told to run the program on a new machine. I have loaded my program to new machine. It worked fine at first. But than i made updates.Than suddenly my program started to crash with the exception error : the exception unknown software exception (0xc0020001) at location (0x7c80bee7).   then i tried to write a log file in  UnhandledException method. But the interesting thing is my program never runs that code. Here is what i tried to do :

    Partial Friend Class MyApplication

    Private Sub MyApplication_UnhandledException(ByVal sender As Object, ByVal e As ApplicationServices.UnhandledExceptionEventArgs) Handles Me.UnhandledExceptionMessageBox.Show("Came here")
    My.Application.Log.WriteException(e.Exception, TraceEventType.Critical, "Application shut down at " & My.Computer.Clock.GmtTime.ToString)Dim writer As New StreamWriter("c:\log.txt")
    writer.WriteLine(e.Exception)
    writer.WriteLine(TraceEventType.Critical)
    writer.WriteLine(
    "Application shut down at " & My.Computer.Clock.GmtTime.ToString)
    writer.Close()
    End Sub
    End Class

    as you can see i both tried to write a log and my own log file. But i can't even see that message box alert     "came here".  I hope somebody give me some advice about this. Because this is getting hard to explain it to my boss :)

    thanx a lot...




    1 and 0's. That's all the problem...
    Thursday, October 09, 2008 9:09 AM

Answers

  • If its after adding a sql query, i will second guess that the query its self will be there problem? I would double check the sql query and the database to make sure your not missing a value thats requiered by the database.

    I feel im getting a bit out of my depth, but if you could post what version of vs your using, what type of sql and the query that would be great :)

    I mean have you used try/catch blocks everywhere else in your program? B/c you could create a function just to write to a system log, detailing the error and that will tend to find any errors really.

    Agreeing with the above, make sure your framework of the program matches that of the target machine.

    Stu.

    • Marked as answer by Xingwei Hu Tuesday, October 14, 2008 7:55 AM
    Friday, October 10, 2008 8:11 PM

All replies

  • Hi there,

    Can I just ask if you have try...catch blocks on your code?? This is helpful for finding where the error occured. Also, after which update did the program stop working?

    Link To MSDN Error Handling in VB.net

    I am unfamilar with the error message but answering the above might help others understand and respond with a better soloution. :)

    Also, I tried the code you supplied but Me.UnhandlesExceptionMessageBox.Show("Came Here") isnt declared. Dunno if this is just me, or you have a custom method/function for that. Either way, to me at least, the said code will execute when a UnhandledExceptionMessageBox is shown with the text "Came Here".

    Try Changing it to Handles Me.UnhandledExceptionMessageBox And see if the code executes then.

    HTH,

    Stuart B.
    Thursday, October 09, 2008 10:35 AM
  • thanx for your answer stuart,
    Well first, actually i just wrote messagebox.show ("came here"), but i think that was vb.net generated code. If you didnt say it, i would never see it. 

    And second, my update was to add a sql query. And i'm totally sure that it will never cause that kind of unknown software exception.

    And the last one; my program runs on a different server but that server doesn't have a visual studio.net so ı cant debug my code.but i have added some message boxes into my code to understand until where program can run.my program runs even system.environement.exit(-1) and after that it crashes. it is such a bad situation to me.

    but i didnt use try catch block to handle system.environement.exit(-1) exceptions. i will try it now but if anyone has knowledge about this situation i would love to know.
    thanx...
    1 and 0's. That's all the problem...
    Friday, October 10, 2008 7:53 PM
  • when you publish the application have you insured that Prerequisites are set correctly?  Maybe the pc that doesn't work is using a different version of .Net
    Friday, October 10, 2008 8:09 PM
  • If its after adding a sql query, i will second guess that the query its self will be there problem? I would double check the sql query and the database to make sure your not missing a value thats requiered by the database.

    I feel im getting a bit out of my depth, but if you could post what version of vs your using, what type of sql and the query that would be great :)

    I mean have you used try/catch blocks everywhere else in your program? B/c you could create a function just to write to a system log, detailing the error and that will tend to find any errors really.

    Agreeing with the above, make sure your framework of the program matches that of the target machine.

    Stu.

    • Marked as answer by Xingwei Hu Tuesday, October 14, 2008 7:55 AM
    Friday, October 10, 2008 8:11 PM
  • thanx for your answers again,

    i'm trying to get more information about my problem. I will write deeper information in a few days. Thank you very much indeed for your interest.
    1 and 0's. That's all the problem...
    Saturday, October 11, 2008 7:11 PM