473,804 Members | 3,716 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 5584
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
3813
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
3257
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
2065
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
2042
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
3770
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
4390
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
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
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
9161
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...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6856
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();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.