473,837 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

executionengine exception in forms.dll

MD
I have been converting a program from VB6 to VB.Net and enhancing it as
well. All has been progressing OK although its been hard work. Now, all of
a sudden, when I try to execute a ShowDialog() on one of my forms I get "An
unhandled exception of type 'System.Executi onEngineExcepti on' occurred in
system.windows. forms.dll".

I can't work out what has caused this, and can't find any help on the
Microsoft site or anywhere else on the web. Can anyone help?

Thanks,
Mike
Nov 20 '05 #1
13 5591
Hi MD,

|| Can anyone help?

Maybe, he says tentatively. ;-)

You'll need to show us the code - where it's called and the New and Load
of the dialogue..

Regards,
Fergus
Nov 20 '05 #2
"MD" <me@here.com> schrieb
I have been converting a program from VB6 to VB.Net and enhancing it
as well. All has been progressing OK although its been hard work.
Now, all of a sudden, when I try to execute a ShowDialog() on one of
my forms I get "An unhandled exception of type
'System.Executi onEngineExcepti on' occurred in
system.windows. forms.dll".

I can't work out what has caused this, and can't find any help on
the Microsoft site or anywhere else on the web. Can anyone help?


Please post the callstack when the execption occurs.
--
Armin

Nov 20 '05 #3
"MD" <me@here.com> scripsit:
I have been converting a program from VB6 to VB.Net and enhancing it as
well. All has been progressing OK although its been hard work. Now, all of
a sudden, when I try to execute a ShowDialog() on one of my forms I get "An
unhandled exception of type 'System.Executi onEngineExcepti on' occurred in
system.windows. forms.dll".

I can't work out what has caused this, and can't find any help on the
Microsoft site or anywhere else on the web. Can anyone help?


That's a really bad exception. Do you use any ActiveX controls or the
controls from the Visual Basic Compatibility Library on the
form?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
MD
Thanks for your responses. First of all, an apology. The line it crashes
on is not the ShowDialog() but the statement
CType(Me.Common Dialog1,
System.Componen tModel.ISupport Initialize).Beg inInit()
which is issued during the processing of ShowDialog(). I thought it was the
ShowDialog() but that was when it occurred if I commented out the real
culprit. Here's some more info you requested:

Armin: the stack contains this:
[<Non-user Code>]
SCS.exe!scs.fmE dit.InitializeC omponent() Line 2748 + 0x24 bytes Basic

SCS.exe!scs.fmE dit.New() Line 23 + 0xb bytes Basic
SCS.exe!scs.fmE dit.get_DefInst ance() Line 2763 + 0x14 bytes Basic
SCS.exe!scs.Cue Editor.displayE dit(Integer pCuePtr = 1) Line 124 + 0x6
bytes Basic
SCS.exe!scs.fmM ain.btnEdit_Cli ck(Object eventSender =
{System.Windows .Forms.Button}, System.EventArg s eventArgs =
{System.EventAr gs}) Line 2225 + 0x9 bytes Basic
[<Non-user Code>]
SCS.exe!scs.frm Splash.Main() Line 5 + 0x1d bytes Basic

Herfried: I'm not sure how to identify an ActiveX control, but there are
some VB6 controls that I do still use. In the references section I have
some Ax... references, so I guess these are the ActiveX controls. The Ax...
references shown are AxMSComCtl2, AxMSComctlLib, AxMSComDlg,
AxMSFlexGridLib , AxRichTextLib. There are also references to these same
names without the Ax, eg MSComCtl2, etc. Does this mean I still have a lot
of VB6 baggage hanging around? I'd like to keep the FlexGrid as it seems to
me to be a major job to convert this to a DataGrid, but if I should be
converting any of the other controls to VB.Net equivalents then I will.

Fergus: The ShowDialog() is called by clicking a button from my main form,
which executes this:

Private Sub btnEdit_Click(B yVal eventSender As System.Object, ByVal
eventArgs As System.EventArg s) Handles btnEdit.Click
Dim nCurrentCue As Integer
nCurrentCue = grdCues.Row ' grdCues is MSFlexGrid
displayEdit(nCu rrentCue)
fmEdit.DefInsta nce.ShowDialog( )
End Sub

The fmEdit New sub is as follows:
Public Sub New()
MyBase.New()
If m_vb6FormDefIns tance Is Nothing Then
If m_InitializingD efInstance Then
m_vb6FormDefIns tance = Me
Else
Try
'For the start-up form, the first instance created is the default
instance.
If
System.Reflecti on.Assembly.Get ExecutingAssemb ly.EntryPoint.D eclaringType Is
Me.GetType Then
m_vb6FormDefIns tance = Me
End If
Catch
End Try
End If
End If
'This call is required by the Windows Form Designer.
InitializeCompo nent()
End Sub

The InitializeCompo nent is 2560 lines long, starting with:
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Me.components = New System.Componen tModel.Containe r
Dim resources As System.Resource s.ResourceManag er = New
System.Resource s.ResourceManag er(GetType(fmEd it))

and the line it actually crashes on is:
CType(Me.Common Dialog1,
System.Componen tModel.ISupport Initialize).Beg inInit()
which is about 150 lines into InitializeCompo nent.

Earlier in the code (earlier than the start of InitializeCompo nent) is:
Me.CommonDialog 1 = New AxMSComDlg.AxCo mmonDialog

I appreciate your help, everyone.

Regards,
Mike
Nov 20 '05 #5
"MD" <me@here.com> schrieb
Thanks for your responses. First of all, an apology. The line it
crashes on is not the ShowDialog() but the statement
CType(Me.Common Dialog1,
System.Componen tModel.ISupport Initialize).Beg inInit()
which is issued during the processing of ShowDialog(). I thought it
was the ShowDialog() but that was when it occurred if I commented out
the real culprit. Here's some more info you requested:

Armin: the stack contains this:
[<Non-user Code>]
SCS.exe!scs.fmE dit.InitializeC omponent() Line 2748 + 0x24 bytes Basic SCS.exe!scs.fmE dit.New() Line 23 + 0xb bytes Basic
SCS.exe!scs.fmE dit.get_DefInst ance() Line 2763 + 0x14 bytes
Basic SCS.exe!scs.Cue Editor.displayE dit(Integer pCuePtr = 1) Line 124
+ 0x6 bytes Basic
SCS.exe!scs.fmM ain.btnEdit_Cli ck(Object eventSender =
{System.Windows .Forms.Button}, System.EventArg s eventArgs =
{System.EventAr gs}) Line 2225 + 0x9 bytes Basic
[<Non-user Code>]
SCS.exe!scs.frm Splash.Main() Line 5 + 0x1d bytes Basic

Could you please expand the "non-user code" (by right-clicking in the
callstack window and select "expand non-user code" (or similar)) when the
exception occurs and post it again? As you wrote below, it must be somewhere
in ISupportInitial ize.BeginInit, so the error might be hard to find.

The InitializeCompo nent is 2560 lines long, starting with:
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Me.components = New System.Componen tModel.Containe r
Dim resources As System.Resource s.ResourceManag er = New
System.Resource s.ResourceManag er(GetType(fmEd it))

and the line it actually crashes on is:
CType(Me.Common Dialog1,
System.Componen tModel.ISupport Initialize).Beg inInit()
which is about 150 lines into InitializeCompo nent. Earlier in the code (earlier than the start of InitializeCompo nent)
is:
Me.CommonDialog 1 = New AxMSComDlg.AxCo mmonDialog


Earlier? Before Sub InitializeCompo nent is called? Hard to imagine because
there should only be the "If m_vb6FormDefIns tance Is Nothing..." stuff. The
assignment "Me.CommonDialo g1 = ..." should be _within_ Initializecompo nent.

--
Armin

Nov 20 '05 #6
Hi Mike,

At this stage it's of no use to you other than interest, but there's
another on-going query regarding a program that crashes at the EndInit() of
ISupportInitial ize. This time it's in association with an AxBrowser control.

Regards,
Fergus
Nov 20 '05 #7
Cor
Fergus,
Which one is it?
Cor
Nov 20 '05 #8
Good morning Cor,

I usually give the topic but I left it out this time because it's very
long (30 messages) and the bulk of it is on a different issue. The "BANG!,
zip, pop and whirr" problem only arises in the last few messages when the
first issue had been thoroughly [but :-(( unsuccesfully] explored.

The topic is: Strange? DesignMode Behaviour, dated 19th Sep, 11:00am

Regards,
Fergus
Nov 20 '05 #9
Cor
Good morning Fergus,

I got the idea already that it had to do with Charles
I did give a small answer to Charles in the other thread.
It is something I always have to think on when I have those problems with
the webbrowser but never did investigation in.

Cor
Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3814
by: Magnus Ullberg | last post by:
How do i convert the following structure declaration from c++ to c#? #pragma pack(push,1) //Byte alignment struct TtsrPlayerInfo { int PlayerID; int ChannelID; char NickName; int PlayerChannelPrivileges; int PlayerPrivileges;
0
3258
by: BeeFirst | last post by:
hi, i meet a problem when i try to develop an application with an ocx in c#. the same ocx works well in vc,but not in c#,the Microsoft .NET common language runtime throw a System.ExecutionEngineException error message.msdn said it is a bug of .NET and advice make sure not have any indirect module dependencies.i do not know what it means,but i do need this ocx control.what should i do? pls tell me , thanks in advance and sorry for my...
1
7149
by: Tim Mulholland | last post by:
I have an application that uses an external C(?) Dll and it seems like after I make a specific call to that dll the application will crash at a random call to the dll in the future. It sometimes crashes the next call after said call, while sometimes it doesn't crash for 5 minutes; but it always crashes. As long as I don't call tira_get_captured_data it doesn't crash so I am assuming that is the cause. I get a...
2
2066
by: TT (Tom Tempelaere) | last post by:
Hi people, In my code I get an ExecutionEngineException. I don't know what to do with it, and I can't seem to get rid of it. How can I figure out what is causing it? It always appears on the exact same line of code. I'm willing to supply extra info (code, compiler version, framework version,...) if that would help. The program is written in C#. Cheers,
14
2045
by: TT (Tom Tempelaere) | last post by:
Hi people, The code that follows throws an ExecutionEngineException. This was written in C# (Microsoft Visual C# .NET 69462-335-0000007-18823) using MSDE 7.1 (7.1.3088). The framework is .NET 1.1 (1.1.4322). I tested the program on a Windows XP Professional/SP1, with a Pentium 4/2.6Ghz processor, with 2Gb RAM. The code is a single form that when run throws an ExecutionEngineException in 'AddRowsToTable'. If someone with more...
3
3771
by: NormD | last post by:
An exception 'System.ExecutionEngineException' has occurred in servername I have deployed a windows application on a server; I'm running the same on my pc using http://servername/myApps/myApp.exe. myApp.exe contains some third party controls used to display data in a grid and to print a preview of the data. I am getting the above listed error when I attempt to preview/print a DevExpress GridControl using the DevExpress printing control. A...
0
2059
by: sagar.jawale | last post by:
Hi, In my c# windows application, i am using AxSHDocVw.AxWebBrowser. I am displaying a generated receipt html in this browser. Also, for printing the same html, i am using the following command : axWebBrowser2.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER,ref empty,ref empty);
2
4391
by: Fredo | last post by:
I'm going to try to post this without having to paste in hundreds of lines of code. I'm trying to override IInternetSecurityManager. I'm taking sort of a minimalist approach and adding code as I take each step because I'm not 100% sure about what I'm doing here. First of all, I've created a WebBrowser class. It is defined as: public class WebBrowser : AxSHDocVw.AxWebBrowser,
0
2237
by: selvialagar | last post by:
i've done a calibration tool. In that, there will be list of parameters and the value for the parameters are coming from the external device using TCP communication. The Screen will be refreshed once in a second. Now, i'm trying to establish the connection with the device in the form Load event. Whenever the form loads, it tries to connect to the device. when the device is switched on, it opens the communication and all things going on very...
0
9847
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10899
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10280
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7012
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4481
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3128
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.