External component has thrown an exception как исправить

Whenever a user reports an error such as

System.Runtime.InteropServices.SEHException — External component has thrown an exception?

is there anything that I as a programmer can do to determine the cause?

Scenario : One user (using a program my company wrote) has reported this error.
This may or may not have been a one off error. They mentioned that in the last month, the computer has twice ‘stopped working’. I have learnt from experience, not to take this description too literally, as it usually means that someone relating to the computer is not working as expected. They were unable to give me more details and I could not find any logged errors. Hence it may or may not have been this error.

From the stack-trace, the actual error was when constructing a class which does not directly call any interop code, but perhaps complicated by the fact that the object may be part of a list that is databound to a DevExpress Grid.

The error was ‘caught’ by an unhandled exception routine which normally will close down the program, but has an option to ignore and continue. If they opted to ignore the error, then the program continued working but the error re-occurred when this routine was next run. However it did not occur again after closing and restarting our application.

The computer in question did not seem to be stressed out. It is running Vista Business, has 2GB of memory and according to Task Manager was only using about half of that with our application just about 200Mb.

There is one other piece of information that may or may not be relevant. Another section of the same program uses a third party component which is effectively a dotnet wrapper around a native dll and this component does have a known issue where very occasionally, you get a

Attempted to read or write protected memory. This is often an indication that other memory is corrupt

The component makers say that this has been fixed in the latest version of their component which we are using in-house, but this has not been given to the customer yet.

Given that the consequences of the error are low (no work is lost and restarting the program and getting back to where they were only takes a minute at most) and given that the customer will shortly be getting a new version (with the updated third-party component), I can obviously cross my fingers and hope the error won’t occur again.

But is there anything more I can do?

  • Remove From My Forums
  • Question

  •    I am getting error «External component has thrown an exception.» in VB.net project.

    Below is the stack trace of the error

    at globalmodule.Main1.AddColToSubGrid(AxMSFlexGrid msfg, String colName, String ClWidth, String Cntrl, String ColValid)
       at globalmodule.Main1.getSubGridDesign(AxMSFlexGrid& msfg, String mainGridColName, DataSet DSFrmshrtctTemp, Boolean GetXmlDesignData)

    can anyone tell me what has caused the error?

    thank you

    • Moved by

      Wednesday, January 9, 2013 1:42 AM
      (From:Visual Studio Unit Testing)

Problem

User launches Controller, and clicks ‘Reports — Run’ or ‘Reports — Create’. User receives error message.
Problem also occurs if user launches Excel and uses the Controller Excel link menu to achieve the same task.

Symptom

There are many different potential errors that can occur, some are intermittent, for example:

Example #1

IBM Cognos 8 Controller Link

External component has thrown an exception.
OK

Example #2

CallFunc::GetIDsOfNames ‘…’ returned 0x80020006

Example #3
Standard Error
Number: 458
Source: Microsoft.VisualBasic
Description: Bad variable type. (Excpetion from HRESULT: 0x80020008(DISP_E_BADVARTYPE))

Example #4

Standard Error
Number: -2147467261
Source: interop.Excel
Description: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Example #5

Standard Error
Number: 91
Source: Microsoft.VisualBasic
Description: Object variable or With block variable not set.

Cause

The client cannot download the .NET code components automatically.

There are a number of possible causes for this, for example:

  1. Controller application server not inside the list of ‘trusted sites’ inside the trusted zone in Internet Explorer, on the client PC
  2. Client PC Internet Exploer’s trusted zone security level not set to ‘low’
  3. I.T. policy (e.g. Microsoft Active Directory policy) overriding any settings configured in (1) and (2)
  4. Third-party application (e.g. a popup-blocker utility) installed on the client PC, stopping the automatic download of .NET components from the Controller website

Diagnosing The Problem

To test whether these components are being blocked, perform the following:

  • Logon to the client PC
  • Launch the following: http://co ntrollerserver/cognos8/controllerbin/ccr.exe

If everything is correctly configured, then you *should* see the Controller program immediately launch as normal.

HOWEVER, if you instead immediately see the following screen….

    File Download — Security Warning
    Do you want to run or save this file?
    Name: ccr.exe
    Type: Application
    From: controllerservername
    Run Save Cancel
    While files from the Internet can be useful, this file type can

potentially harm your computer. If you do not trust the source, do not
run or save this software. What’s the risk?

…then this proves that the automatic download of .NET components is not occurring, and therefore you should use the solution inside this IBM Technote.

Resolving The Problem

#1 — Ideal method
Ask your I.T. administrator to investigate why Microsoft Internet Explorer refuses to download .NET code automatically from the Microsoft IIS website on the Controller application server. For example, check that there is no Active Directory policy which is blocking this.

#2 — Alternative method
Install the ‘local’ Controller client (CCRLocalClient.Msi) onto the PC. This will bypass the need for MS Internet Explorer to download .NET code from the website.

NOTE: If you install the ‘local’ Controller client on a PC, you must ensure that the Controller website is configured to not automatically install the ‘normal’ Controller Excel client. Otherwise, you will end up with two clients installed!

Steps:

  1. Logon to the Controller application server, as an administrator
  2. Launch ‘Controller Configuration’ from the start menu
  3. Open section ‘Client Distribution Server Configuration’
  4. Check value of ‘InstallExcelLink’. If this is set to ‘true’, change it to ‘false’ and click ‘save’ icon at top-left corner
  5. Logon to client PC as an Administrator
  6. Launch Add/Remove Programs
  7. Uninstall any existing Controller clients
  8. Launch http://<controllerserver>/cognos8/controllerbin/CCRLocalClient.Msi
  9. Save this file on your desktop
  10. Double-click on file ‘CCRLocalClient.Msi’ and accept all defaults
  11. Notice that this creates a new Start Menu icon, from where you can now launch Controller from. Do not use the old ‘website’ method to launch Controller from!
  12. Test.

Related Information

[{«Product»:{«code»:»SS9S6B»,»label»:»IBM Cognos Controller»},»Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Component»:»Controller»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»Controller (Frango) 8.2″,»Edition»:»»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]

Historical Number

1038109

Just started to get this error this week. «External component has thrown an exception.»
Updated to Feb 2020 release but the problem persists.

The PBI Desktop file is connected to a small Access accdb file, pulling a single query. The db is only 492k in size.

The file has worked for a few months in this environment, until this week.

Evnironment is:

Remote VM Win 10 workstation with O365 32-bit, and PBI 32-bit.

The machine is at a client’s site and beyond my control. Not much I can do by way of testing.

Any ideas appreciated.

I have a client solution that consists of an Excel 2013 PowerPivot. When I open the workbook and attempt to Test the Connection I received the following error, «Failed to connect to the server: External Component has thrown an exception». Although
I had not used this feature for a while, none of the backup files work either. I believe it is related to the fact that I had installed a v2016 of Outlook only and something is now in conflict (based on items I have read online).  This is the Error Details:

============================

Error Message:

============================

External component has thrown an exception.

—————————-

Failed to connect to the server. Reason: External component has thrown an exception.

============================

Call Stack:

============================

   at System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper)

   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)

   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)

   at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions
userOptions)

   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)

   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)

   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)

   at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

   at System.Data.OleDb.OleDbConnection.Open()

   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.InitializeConnectionObject(String connectionIdentifier)

—————————-

   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.InitializeConnectionObject(String connectionIdentifier)

   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.Open(String& connectionIdentifier)

   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.Open()

   at Microsoft.AnalysisServices.Common.DataSourceBasic.TestConnection()

   at Microsoft.AnalysisServices.Common.DataSourceBasic.ClickTestConnection(Object progressControl)

Понравилась статья? Поделить с друзьями:

Не пропустите также:

  • Как найти песню дани милохина
  • Как найти ластик в виндовс 10
  • Как найти фанфик который давно читал
  • Как найти печника для строительства печи
  • Как найти общее увлечение с парнем

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии