Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Application stalled and now I get an exception?

Posted on 2014-01-10
8
Medium Priority
?
286 Views
Last Modified: 2014-01-13
Not sure what caused this but my application stalled on startup so I stopped the execution and then restarted my app. When I got the point in the image it threw an exception (see attachment). Any ideas on why this happened and how to resolve it?

thanks,
Screenshot.jpg
0
Comment
Question by:BlakeMcKenna
[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
  • 4
  • 3
8 Comments
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 39772883
Hi BlakeMcKenna;

It is hard to tell from the exception dialog box. What is more helpful is to see if there is any inner exception which would be more meaningful. When you get this exception in the section of the dialog box "Action" click on Copy exception details to the clipboard then post that into a Code block, Code icon above. Also see if this is occurring in your code, "Make sure you do not have an infinite loop or infinite recursion. Too many method calls is often indicative of a very deep or unbounded recursion".
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 39773364
Since this happens on the declaration of Private variables, it is outside of a method, so I would not look for recursion, even it if is the most common cause of a StackOverflowException.

We would need to see more of the code to understand what happens.

Could it be in the déclarations of a Structure? Structures should be small objects. Microsoft suggests no more than 16 bytes for a Structure. In such a case, changing the Structure to a Class could solve the problem
0
 

Author Comment

by:BlakeMcKenna
ID: 39776686
I figured it out. It was a Private declaration to instantiate a Form from the main assembly.

Public Class FileIndicator

     Private BH As New BusinessLayer.CalBusiness
     Private EH As New ErrorHandling.ErrorHandler

     Private frm As New frmEquipmentSetup    'Line in question

Open in new window


Not sure why this would do that. When I came to the line in question, it executed then went back up to the first declaration of the BH variable, which started an infinite loop. I don't understand why it would do that though?
0
Technology Partners: 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!

 
LVL 64

Expert Comment

by:Fernando Soto
ID: 39776704
So this is what caused the error, "Make sure you do not have an infinite loop or infinite recursion. Too many method calls is often indicative of a very deep or unbounded recursion".

Good, glad to see you found it.
0
 

Author Comment

by:BlakeMcKenna
ID: 39776716
But I don't understand why it would execute that statement and then return to the top of the declarations?
0
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 39776736
As far why that declaration was causing an infinite loop I would suspect that creating that form frmEquipmentSetup  makes a new  FileIndicator instance which call starts the infinite loop going.
0
 

Author Comment

by:BlakeMcKenna
ID: 39776940
that makes sense!

thanks
0
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 39776952
Did you mark the correct post as the solution?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

688 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