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

  • Home
  • SEARCH
  • 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 8278739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:06:42+00:00 2026-06-08T09:06:42+00:00

I have a very strange situation. We have a relatively large app (~500K lines

  • 0

I have a very strange situation. We have a relatively large app (~500K lines of code), developed by upwards of 10 different developers over the last 6 years. It has been working fine until our most recent release. With the latest build, we have multiple customers complaining that it is sporadically hanging and we are having a heck of a time figuring out how/why! Here are some of the things making it challenging to debug:

  • Until this morning, we have been totally unable to reproduce this problem in house.
  • We have never seen this happen when the debugger is attached! This obviously makes it challenging to solve.
  • This does not tend to happen when people are using the app, but rather after they’ve stopped using it for some time.
  • Could this (maybe) be related to the screen saver coming on?
  • It seems to happen somewhat consistently when changing screen resolutions

This morning we finally figured out how to reproduce at least one scenario in house by:
– Running that app outside of the debugger
– Changing the screen resolution. This hangs the app.
– Then we can attach with the debugger.

The problem though (now that we can, at least in one case, reproduce it) is that our code is not running when it hangs! In other words, there is only one thread running at the time it hangs, and the line it breaks on is the Application.Run(form); from program.cs.

One final point is that the application is not completely hung. Specifically:
– It still does screen painting (refreshes parts of the screen covered by other apps for example)
– I can’t click on the UI elements that are shown, but it also doesn’t “beep” at me like I would expect if it were completely unresponsive
– When I “pause” the application after attaching the debugger, I can minimize/maximize it while paused. Otherwise, it won’t respond to minimize/maximize commands.
– Other than not beeping at me, it behaves as though there is a modal window off-screen that I just can’t see. Additional (as mentioned before), when I pause the app, it pauses on the Application.Run line, and there are no other threads/code running in the threads list (as I would expect to see if there were a modal dialog box blocking the main window.

The behavior is most strange IMHO – especially since it has only recently started happening. My next steps are going to have to be to start “subtracting” sections of the code until I find the culprit, but I figured I’d throw the problem up here first and see if anyone else has ever experienced anything like this before.

Thanks in advance for any guidance – I look forward to hearing any suggestions.

ej

Edit:
Another way of stating the behavior. After it has “hung” it behaves as though it has no problem, except that it receives no messages from my mouse and keyboard. In other words, it still repaints itself, and can be paused by the VS2010 debugger, but does not respond in any way shape or form to mouse/keyboard events. Here again though, it doesn’t start beeping at me as it does with other apps that are truly dead. Like, it does not show as being unresponsive in the task manager. It’s just in a sort of weird “I’m not listening for I/O anymore, sorry!” state… Strange!

Edit:

In my last edit, I mentioned that it was not accepting IO anymore. This got me thinking so, I added a TcpListener to see if that would still respond after it “hung” – and it does. Additionally, in thinking about the fact that it still updates the screen, I put a breakpoint in the paint event and got some (more) odd behavior. It hits the breakpoint in the paint event, but is NOT at the top of the call stack at that point. The top of the callstack shows “In sleep, wait or join”. Then the line in paint is next, then external code, then main. So the line highlighted on the screen is Green – not Yellow. Additionally, if I F10 (to step over), it does, moving down exactly 1 line, but still, the pain method is not at the top of the call stack. At this point, there are no other threads running, no other code executing, nothing else happening?!?! What is going on here?

One final point – I set a breakpoint in the TcpListener’s Accept Socket event, and when I connect to the TCP/IP port, it breaks on that code, and that code IS at the top of the call stack.

Sorry – But I’m still quite confused.

  • 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-08T09:06:43+00:00Added an answer on June 8, 2026 at 9:06 am

    You may have a problem with control (or its handle) created on non UI thread, check this question.

    • 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 am running into a very strange situation with an app I have that
I have a very strange situation. Basically I have code that uses a decryptor
I am writing an Android app and have run into a very strange situation.
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.
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.