473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MyApp.frmMain.Main() in C:\SoftwareDev\MyApp\MyApp
v5.0\SourceCode\MyApp\frmMain.cs:line 2901
Nov 15 '05 #1
4 1818
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.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MyApp.frmMain.Main() 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
Nov 15 '05 #2
MJB
I removed the entry:

Application.EnableVisualStyles();

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.com> wrote in message
news:Oc**************@TK2MSFTNGP12.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.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MyApp.frmMain.Main() in C:\SoftwareDev\MyApp\MyApp
v5.0\SourceCode\MyApp\frmMain.cs:line 2901

Nov 15 '05 #3
Hi MJB, Do you have Application.DoEvents after
Application.EnableVisualStyles??

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

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

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

Application.EnableVisualStyles();

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.com> wrote in message
news:Oc**************@TK2MSFTNGP12.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.UnsafeNativeMethods.DispatchM essageW(MSG& msg) at

System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32

reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MyApp.frmMain.Main() in C:\SoftwareDev\MyApp\MyApp
v5.0\SourceCode\MyApp\frmMain.cs:line 2901


Nov 15 '05 #4
I am getting the same problem. But I havent used
Application.EnableVisualStyles(); 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.com> wrote in message
news:#y**************@TK2MSFTNGP09.phx.gbl...
I removed the entry:

Application.EnableVisualStyles();

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.com> wrote in message
news:Oc**************@TK2MSFTNGP12.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.UnsafeNativeMethods.DispatchM essageW(MSG& msg) at

System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32

reason,
Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at MyApp.frmMain.Main() in C:\SoftwareDev\MyApp\MyApp
v5.0\SourceCode\MyApp\frmMain.cs:line 2901


Nov 15 '05 #5

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

Similar topics

4
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...
0
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: ...
0
by: Robert Manookian | last post by:
Embedded ShDocVw control into .Net application. Getting this exception when web page containing JavaScript. Web pages without JavaScript display properly. Any ideas?
3
by: cneff78 | last post by:
I have a COM based component that raises an exception and I'm awaiting a patch for it. However, I need to be able to recover from the exception, destroy the COM object and then regenerate it @ a...
0
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...
1
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...
4
by: - R | last post by:
Hello all. I'm new to .Net so please help me out. I have a application with several "Threads" running to observe various things. From time to time each thread need to add an log entry, which...
2
by: ankur seth via DotNetMonster.com | last post by:
Getting error Null Reference exception when a procedure is called in vb.net ..Why does it occur and how to resolve it. --- ANkur -- Message posted via http://www.dotnetmonster.com
0
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:...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.