Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8612695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:41:28+00:00 2026-06-12T04:41:28+00:00

I have a very strange situation, I haven’t seen such a thing before. I’m

  • 0

I have a very strange situation, I haven’t seen such a thing before.

I’m using the COM interface of third-party app, to communicate with the program. It’s in-process COM server. I use dynamic typing to access the object model of target application.

dynamic app = Activator.CreateInstance(Type.GetTypeFromProgID("SomeProgId"));

I use that app object to get other dynamic objects of the application. One of such objects represent quite large array, elements of which have numerous properties. I traverse all the elements of this array, and read all their properties, i.e. I parse the said object in a big loop (executing several minutes).

The problem is the following: sometimes, say once in ten tries, the thread just “hangs” when reading one of such properties (different one everytime):

string someString = app.SomeArrayObject.Get(i).SomeStringProperty;

I use the background worker to do this, and it just hangs on the above assignment. Quick note: the above statement is one-line simplification, in reality I access the objects one level at a time (“only one dot in each statement”), so it actually hangs on reading the SomeStringProperty property. Doesn’t throw exception, or anything, just hangs indefinitely. I noticed that The thread '<No Name>' (0x1240) has exited with code 0 (0x0). message is posted in the debugger’s output window just before that, so I believe some of the threads terminate unexpectedly (though no exceptions recorded!). When I break the debugging, the call stack is practically useless, as its usage is quite limited in such scenarios (inside COM object).

I don’t know why that happens, and how that’s even possible. Reading the simple string property results in a permanent hang. Do you have any ideas?..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:41:29+00:00Added an answer on June 12, 2026 at 4:41 am

    It was revealed, that the COM server was registered as being MTA-capable, but actually was designed for the STA mode only. The framework assumed it was ok to use it in MTA mode (as the corresponding registration entry in registry stated MTA was supported), and probably was creating some background threads periodically that resulted in exception. Setting thread’s mode to STA, or changing COM server’s parameters in registry to report STA-only, solved this mysterious random crashing problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very strange situation. I have a large set of records to
I have a very strange situation. I´m working on a pretty big Java application
I have the next very strange situation and problem: .NET 4.0 application for diagram
I have faced a very strange situation here. I am accessing database (MDB) through
Very strange situation here: I'm using L2S to populate a DataGridView. Code follows: private
I have a very strange situation happening and I'm hoping someone here knows why.
I am running into a very strange situation with an app I have that
I am writing an Android app and have run into a very strange situation.
I have a very strange situation. Basically I have code that uses a decryptor
a noob question here. I have a very strange situation that's very puzzling to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.