473,657 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting strange InteropServices .SEHException exception

MJB
I never get the above exception in Windows 2k. It only happens in
Windows XP, which is the first oddity. My application is multi-threaded and
I use the webbrowser control and media player. The exception normally occurs
when I open the browser control or media control, but sometimes it just
occurs randomly. I was thinking first that it was some sort of build
difference with the COM interop components, but I re-referenced and rebuilt
everything on an XP machine and that didn't help. I'm now thinking it's
some sort of multi-threading error. I don't know, I'm at a loss. If anyone
has experienced a similar problem and can provide me with some info. I will
greatly appreciate it.

Here's the full exception dump:

System.Runtime. InteropServices .SEHException: External component has thrown
an exception.
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
at
System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32 reason,
Int32 pvLoopData)
at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at MyApp.frmMain.M ain() in C:\SoftwareDev\ MyApp\MyApp
v5.0\SourceCode \MyApp\frmMain. cs:line 2901
Jul 21 '05 #1
4 9067
In article <Oc************ **@TK2MSFTNGP12 .phx.gbl>, MJB wrote:
I never get the above exception in Windows 2k. It only happens in
Windows XP, which is the first oddity. My application is multi-threaded and
I use the webbrowser control and media player. The exception normally occurs
when I open the browser control or media control, but sometimes it just
occurs randomly. I was thinking first that it was some sort of build
difference with the COM interop components, but I re-referenced and rebuilt
everything on an XP machine and that didn't help. I'm now thinking it's
some sort of multi-threading error. I don't know, I'm at a loss. If anyone
has experienced a similar problem and can provide me with some info. I will
greatly appreciate it.

Here's the full exception dump:

System.Runtime. InteropServices .SEHException: External component has thrown
an exception.
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
at
System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32 reason,
Int32 pvLoopData)
at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at MyApp.frmMain.M ain() in C:\SoftwareDev\ MyApp\MyApp
v5.0\SourceCode \MyApp\frmMain. cs:line 2901


You wouldn't be updating the UI from a background thread would you? And
if you are, are you making sure your using .Invoke to do it?

Tom Shelton
Jul 21 '05 #2
MJB
I removed the entry:

Application.Ena bleVisualStyles ();

from my main function, and so far it seems to be more stable. I have a few
more tests to run, but I hope this nipped it in the bud.

Thanks,
Matt
"MJB" <mb*@email.co m> wrote in message
news:Oc******** ******@TK2MSFTN GP12.phx.gbl...
I never get the above exception in Windows 2k. It only happens in
Windows XP, which is the first oddity. My application is multi-threaded and I use the webbrowser control and media player. The exception normally occurs when I open the browser control or media control, but sometimes it just
occurs randomly. I was thinking first that it was some sort of build
difference with the COM interop components, but I re-referenced and rebuilt everything on an XP machine and that didn't help. I'm now thinking it's
some sort of multi-threading error. I don't know, I'm at a loss. If anyone has experienced a similar problem and can provide me with some info. I will greatly appreciate it.

Here's the full exception dump:

System.Runtime. InteropServices .SEHException: External component has thrown
an exception.
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
at
System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at MyApp.frmMain.M ain() in C:\SoftwareDev\ MyApp\MyApp
v5.0\SourceCode \MyApp\frmMain. cs:line 2901

Jul 21 '05 #3
Hi MJB, Do you have Application.DoE vents after
Application.Ena bleVisualStyles ??

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflecti on Master "

==== Converting to 2002 ====
Remove inline declarations
"MJB" <mb*@email.co m> wrote in message
news:#y******** ******@TK2MSFTN GP09.phx.gbl...
I removed the entry:

Application.Ena bleVisualStyles ();

from my main function, and so far it seems to be more stable. I have a few more tests to run, but I hope this nipped it in the bud.

Thanks,
Matt
"MJB" <mb*@email.co m> wrote in message
news:Oc******** ******@TK2MSFTN GP12.phx.gbl...
I never get the above exception in Windows 2k. It only happens in
Windows XP, which is the first oddity. My application is multi-threaded

and
I use the webbrowser control and media player. The exception normally

occurs
when I open the browser control or media control, but sometimes it just
occurs randomly. I was thinking first that it was some sort of build
difference with the COM interop components, but I re-referenced and

rebuilt
everything on an XP machine and that didn't help. I'm now thinking it's
some sort of multi-threading error. I don't know, I'm at a loss. If

anyone
has experienced a similar problem and can provide me with some info. I

will
greatly appreciate it.

Here's the full exception dump:

System.Runtime. InteropServices .SEHException: External component has thrown an exception.
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg) at

System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32

reason,
Int32 pvLoopData)
at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason, ApplicationCont ext context)
at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at MyApp.frmMain.M ain() in C:\SoftwareDev\ MyApp\MyApp
v5.0\SourceCode \MyApp\frmMain. cs:line 2901


Jul 21 '05 #4
I am getting the same problem. But I havent used
Application.Ena bleVisualStyles (); Specifically my error occurs on a return
from a dynamically created form, after a showdialog. Removing showdialog
removes the problem (but i dont know conclusively).
Thanks,
Hananiel

"MJB" <mb*@email.co m> wrote in message
news:#y******** ******@TK2MSFTN GP09.phx.gbl...
I removed the entry:

Application.Ena bleVisualStyles ();

from my main function, and so far it seems to be more stable. I have a few more tests to run, but I hope this nipped it in the bud.

Thanks,
Matt
"MJB" <mb*@email.co m> wrote in message
news:Oc******** ******@TK2MSFTN GP12.phx.gbl...
I never get the above exception in Windows 2k. It only happens in
Windows XP, which is the first oddity. My application is multi-threaded

and
I use the webbrowser control and media player. The exception normally

occurs
when I open the browser control or media control, but sometimes it just
occurs randomly. I was thinking first that it was some sort of build
difference with the COM interop components, but I re-referenced and

rebuilt
everything on an XP machine and that didn't help. I'm now thinking it's
some sort of multi-threading error. I don't know, I'm at a loss. If

anyone
has experienced a similar problem and can provide me with some info. I

will
greatly appreciate it.

Here's the full exception dump:

System.Runtime. InteropServices .SEHException: External component has thrown an exception.
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg) at

System.Windows. Forms.Component Manager.System. Windows.Forms.U nsafeNativeMeth o
ds+IMsoComponen tManager.FPushM essageLoop(Int3 2 dwComponentID, Int32

reason,
Int32 pvLoopData)
at System.Windows. Forms.ThreadCon text.RunMessage LoopInner(Int32 reason, ApplicationCont ext context)
at System.Windows. Forms.ThreadCon text.RunMessage Loop(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at MyApp.frmMain.M ain() in C:\SoftwareDev\ MyApp\MyApp
v5.0\SourceCode \MyApp\frmMain. cs:line 2901


Jul 21 '05 #5

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

Similar topics

0
613
by: Carsten | last post by:
Hi, I have a problem with instantiating a Web service. When the constructor for the proxy is called a SEHException is thrown. The call stack is shown below: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
0
2673
by: Robert Mayr | last post by:
Hello, i know that this is a bug of the .net framework, when you activate the VisualStyles, so i deactivate this features. But i get sometimes this exception when i call <Form>.ShowDialog (not allways from the same form) This also occures sometimes in the forms initialization when the form tries to load an object (image or icon) from the ressources. Message: System.Runtime.InteropServices.SEHException: Eine externe
2
2021
by: ksskumar2000 | last post by:
Hi, I have added following two reference under COM tab, Microsoft Office 11.0 Object Library Microsoft Word 11.0 Object Library The software I have used: Visual studio 1.14 Microsoft Office 2003
4
1831
by: MJB | last post by:
I never get the above exception in Windows 2k. It only happens in Windows XP, which is the first oddity. My application is multi-threaded and I use the webbrowser control and media player. The exception normally occurs when I open the browser control or media control, but sometimes it just occurs randomly. I was thinking first that it was some sort of build difference with the COM interop components, but I re-referenced and rebuilt...
1
2143
by: Micke | last post by:
Hi all! I have a problem and don't know what to do. I have written an application in asp.net using C# as my language. The application calls an external dll file. This is written i VS.NET C++. I have on my machine for development placed the resulting dll-file in the bin folder of my web application and it all works well. Here my OS is WinXp Pro. But when I try to deploy my solution to a Win 2003 Server (Standard Edition). I can't call the...
3
6000
by: Chris | last post by:
Hi As I understand things, when my unmanaged C++ code throws an exception it is wrapped into a SEHException when it reaches managed code. Now is there a way from the managed catch clause to get the original unmanaged exception class that was wrapped in the SEHException ? Chris.
0
1201
by: akash | last post by:
Hi, I've got some C# code instantiating a managed C++ class which in turn instantiates an unmanaged C++ class. I'm getting intermittent exceptions caught by my C# code, but the I can't get any details of the root cause. The info I have is: System.Runtime.InteropServices.SEHException was unhandled by user code ErrorCode=-2147467259 Message="External component has thrown an exception."
0
2314
by: =?Utf-8?B?VGhvbWFzIFR1dGtv?= | last post by:
An ASP.NET web project has recently began crashing WebDev.WebServer.exe with a System.Runtime.InteropServices.SEHException. The EventLog for the crash looks like this: Application ID: WebDev.WebServer.EXE Process ID: 1552 Exception: System.Runtime.InteropServices.SEHException
0
2440
by: THEDuke141 | last post by:
Hi guys, I've lately been plagued with a SEHException while trying to debug VB.Net applications. I'm not exactly sure when the problem started to appear but it literally just appeared out of nowhere as debugging was working fine one day and then this error the next. I've read plenty of posts relating to this error but they all seem outdated and they mostly seem to point to Application.EnableVisualStyles() which i do not use. Also note...
0
8420
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
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
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...
0
8617
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
7353
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
6176
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
5642
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
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1733
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.