Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

'System.StackOverflowException'

Posted on 2004-04-27
9
Medium Priority
?
480 Views
Last Modified: 2012-05-04
I am in the process of upgrading a VB6 Application I did not write...

I am running into a problem on pretty much every form I call from the Main Form.

If I call a form by clicking a command once it is fine, however, if I call the form then close it and call it again I get an error.

An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll

it breaks  in the windows form designer code at the line

 <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  BREAKS HERE =>      Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMunQuarter))

Any help greatly appreciated.

Thanks!!
0
Comment
Question by:bberdel
[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
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 6

Expert Comment

by:gtvingo14
ID: 10930105
are you using SQL?
0
 

Author Comment

by:bberdel
ID: 10931193
It is a Database Application but it is running off an access database.

There are some SQL Queries...
0
 
LVL 10

Expert Comment

by:EBatista
ID: 10932159
by the error you are getting i think you have a cyclically executed method/function.
provide us with the code of that command you are clicking
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10933460
it is code that is recursing beyond allowed stack ...
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10933463
oops sorry EB you said that
0
 

Author Comment

by:bberdel
ID: 10938324
This is the code after teh upgrade to open the form  

Private Sub Command18_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command18.Click
        'Open_Report Command18.Caption
        VB6.ShowForm(frmMunQuarter.DefInstance, 0, frmMain.DefInstance)
    End Sub
0
 
LVL 10

Accepted Solution

by:
EBatista earned 700 total points
ID: 10942385
replace the code in the button event handler for this one:

Private Sub Command18_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command18.Click
        Dim ofrmMunQuarter as new frmMunQuarter()
        ofrmMunQuarter.Owner=Me
        ofrmMunQuarter.ShowDialog() 'or ofrmMunQuarter.Show()
End Sub

the event for the button that close the frmMunQuarter instances must look like:

Private Sub Command18_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command18.Click
   me.Dispose()
End Sub
 
the upgrading feature is a nice tool, but i never have felt 100% happy with it due to the odd code it place.

regards
0
 

Author Comment

by:bberdel
ID: 10942616
Thanks, I actually figured it out earlier today (using the same solution)

I got it from a microsoft article, but I will award you the points.

Thanks again!
0
 
LVL 10

Expert Comment

by:EBatista
ID: 10942880
thanks bberdel :)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

636 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