Solved

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

Posted on 2009-03-30
11
2,796 Views
Last Modified: 2013-11-26
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
Comment
Question by:Rabbit80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24016820
0
 
LVL 1

Author Comment

by:Rabbit80
ID: 24037772
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
 
LVL 1

Author Comment

by:Rabbit80
ID: 24038520
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 48

Expert Comment

by:jpaulino
ID: 24054814
Don't you have some external controls ?
0
 
LVL 1

Author Comment

by:Rabbit80
ID: 24063135
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
 
LVL 1

Author Comment

by:Rabbit80
ID: 24078026
Given up on this one and written a new Initialize routine to reload everything instead!
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 24078454
Sorry I couldn't help you more but this is a odd problem and not usual (as you may know)
0
 
LVL 1

Author Comment

by:Rabbit80
ID: 24082301
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
 
LVL 48

Expert Comment

by:jpaulino
ID: 24082340
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
 
LVL 1

Author Comment

by:Rabbit80
ID: 24082559
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
 
LVL 48

Expert Comment

by:jpaulino
ID: 24082589
How about create a new solution and import all your forms, classes, etc ?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question