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 4086832
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:46:41+00:00 2026-05-20T18:46:41+00:00

I’ve got a quite strange startup behavior for my application. The first time the

  • 0

I’ve got a quite strange startup behavior for my application.

The first time the application is started the process takes up one CPU Core (50% on dual core, 25% on quad core) and RAM consumption stops at a specific value (each start the same, different on other machines/different build versions as we change the application around to test).

If I start an other instance while the first is running the second instance starts normally.

I inserted some logging into the application and it seems the application crashes the first time a UI element is shown. Initially logging ended just before the splash screen should show up – after removing the splash screen it stopped as a Messagebox Control should be shown.

The issue happens on some machines, not all. Copying the same files to an other machine can “fix” the problem. If I deploy a debug compiled build, builded by my workstation the issue disappears completely.

Additional Info (March 18th): The required “hanging” instances count seems to depend on the number of available cores.

If the machine runs on a dual core* system, the second process starts, the first taking 50% CPU (= 1 core@100%). If the machine runs on a quad core system the *fourth proces*s starts, the first three taking 25% CPU each (= 3 cores@100%).

Update (March 19th):
So… we solved it!
A colleague wrote a thread manager with some code to wait on something. This manager is called when UI elements are shown. Running a debug version or running the release version on a very slow VM (the machine which functioned fine has been a virtual one on a really busy machine) seem to change the timing and make it work.

He said he implemented some sort of timeout to fix it.

I will take a closer look at his solution (and why such strange things are required) on Monday and post an update here to provide a proper solution to my question for following visitors.

The bounty goes to Stephen Chung, thank you all for your help.

  • 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-05-20T18:46:42+00:00Added an answer on May 20, 2026 at 6:46 pm

    Your question is not very clear. You should try to provide as much debug/error log info as possible.

    Hunch below

    However, considering that you are using 100% of a CPU core, this sounds suspicious. Are you hogging threads? Are you using ThreadPool? .NET programs require at least a few spare ThreadPool threads to operate — a couple of years ago, it used to be that if you hog up the threads in the ThreadPool (running never-ending loops etc.), and the number of free threads drop below 3, the system will crash. You should check the number of free threads in the ThreadPool if that’s what you’re using.

    This is only a hunch.

    Summarizing the problem

    However, I am trying to summarize your problem below. See if I get it right:

    1. Program will hog 100% CPU time on one core only — which suggests only one single thread (as more threads will be scheduled on another CPU) — what kind of thing are you doing to that poor CPU core that will strain it like this???!!! Are you doing System.Threading.Thread.Sleep() occasionally to yield some CPU time back to the system? Have you marked your process as background priority instead of high?
    2. n-1 program instances will run fine (n = number of cores).
    3. The n-th program instance will fail (n = number of cores).
    4. Failure is always with the inability to open up a window in the Windows UI.

    Failure pattern

    This pattern seems to suggest that, when your last program hogs up 100% time on the last CPU, Windows processes are left fighting for CPU time.

    If you have one core free, then Windows processes can always run on that core and your UI will be responsive. Once you hog that up too, you may be seeing a time-out detected by Windows on unresponsive applications — you may be straining the machine so much that Windows cannot function.

    To Test: Run n program instances (n = number of cores). Then run other programs. Will they be sluggish, or will they run fine?

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

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
i got an object with contents of html markup in it, for example: string
I have thousands of HTML files to process using Groovy/Java and I need to
I have just tried to save a simple *.rtf file with some websites and

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.