• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2855
  • Last Modified:

VB.Net Application.Restart() crashing error "EventType clr20r3"

Why does the application.restart() method crash with "EventType clr20r3" recorded in the application logs on some PC's? How can I go about finding the cause of the error?

Example code below:
Imports System.Windows.Forms
Public Class Form1
    Private Sub buttonRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonRestart.Click
        Application.Restart()
    End Sub
    Private Sub buttonQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonQuit.Click
        Application.Exit()
    End Sub
End Class

Open in new window

0
Rabbit80
Asked:
Rabbit80
  • 6
  • 5
1 Solution
 
Rabbit80Author Commented:
OK - I tried the above - I have no listviews in my program :(

The error trapping routine in the second link does not catch the error. I have put the addhandler into ApplicationEvents.vb startup.

I still have no ideas what is causing this - It does not happen on every machine.. Most PC's seem to be fine, but I have 2 (so far) that cause this error!
0
 
Rabbit80Author Commented:
I just installed VB Express on one of the PC's with issues. If I run my program from within VB everything works fine. If I publish my program and install it, thats when I start to have problems!
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
jpaulinoCommented:
Don't you have some external controls ?
0
 
Rabbit80Author Commented:
Yes - I use several external controls (firefox - due to a bug in IE causing high CPU usage, libcurl and a text capture dll)

What effect does this have on the restart? The application starts fine manually, it exits fine - except on shutdown/logoff.. Its only if I restart it that I have an issue!
0
 
Rabbit80Author Commented:
Given up on this one and written a new Initialize routine to reload everything instead!
0
 
jpaulinoCommented:
Sorry I couldn't help you more but this is a odd problem and not usual (as you may know)
0
 
Rabbit80Author Commented:
Sure - thanks for trying.

Could you give me some pointers in how I might trace the cause - for example if it is one of the external controls? I'll award you the points for trying anyway!
0
 
jpaulinoCommented:
This problems are very difficult to trace. Sometimes you need to comment some instructions and run the application, then uncomment those ones and comment another ones, etc.
Something, and you can try that maybe, you can create a new solution and copy all you forms to there.
0
 
Rabbit80Author Commented:
The problem with that is that it will break my application and not necessarily allow me to get to the part where it restarts..
0
 
jpaulinoCommented:
How about create a new solution and import all your forms, classes, etc ?
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now