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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:03:01+00:00 2026-05-30T17:03:01+00:00

Apparently, Windows eats my errors. Literally. I have this C# .Net 4.0 @ VS

  • 0

Apparently, Windows eats my errors. Literally. I have this C# .Net 4.0 @ VS 2010 application I’m working on and it eventually crashed. Windows came up and said it did some “compatibility” modifications to allow the application to “work better”, then my application window just disappeared and bye-bye debug mode.

I ran again. When the application was supposed to crash, it just quit, no errors, no nothing.

Anyway, I knew what the error was and I fixed it. It was all ok for a few days.

But today, I implemented some simple threading via ThreadPool. What happens is that something crashes in my thread and here’s the awesome stuff:

Visual Studio navigates in the solution, opening the file AND THE FUNCTION which crashes, but then its stops short of breaking my application and showing me the error. It just opens the proper file, the proper function, and my thread quits, the progress bar on my window keeps spinning forever and that’s it… stuck in limbo…

To make matters even more complicated (and this happens even in single-threaded scenarios), check this out: I tried trapping THE ENTIRE program. This should technically catch ANY error that occurs. Well guess what, it doesn’t. I see no Error written in my Error Log.

What’s interesting is that it seems to happen only when accessing the database via my strong-typed datasets (which use the MySQL libraries for .Net). Other errors are logged successfully.

But I used the same MySQL libraries on Windows XP a few months ago and I always had all errors logged and, when debugging with Visual Studio, shown to me at run-time.

  try //Main application loop. Logs all errors, yeah.
  {
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    ETKSession.DebugMode = false;
    Application.Run(new frmLogin());
  }
  catch (Exception ex)
  {
    AErrorLogging.Log(ex); //This is a tested error log writer of mine which usually worked.
    if (ETKSession.DebugMode) throw new Exception(ex.Message, ex);
  }

Any ideas about what the hell is going on in there?! I tried clicking on some links when Windows told me of its “compatibility improvements” but all I got was stupid Support Center links and nothing relevant. I can’t even CHANGE those compatibility settings. Upon investigating my application’s EXE properties, I find absolutely no compatibility changes made ::- (. Extremely frustrating!

  • 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-30T17:03:02+00:00Added an answer on May 30, 2026 at 5:03 pm

    I would try to catch exception this way instead :

    static void Main()
    {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        ETKSession.DebugMode = false;
        Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
        Application.Run(new frmLogin());
    }
    
    static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
    {
        AErrorLogging.Log(ex); //This is a tested error log writer of mine which usually worked.
        if (ETKSession.DebugMode) throw new Exception(ex.Message, ex);
    }
    

    You mentioned earlier that Form_Load and Timers does not contains try catch code. I think adding a try catch with your handler in them could help : there is an existing issue on 64bits where exceptions are silently dropped from Form_Load.

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

Sidebar

Related Questions

I have a Windows Forms application (.NET 4) that runs fine on my development
A project I have been working on for several years apparently has gotten so
We have a WCF (Windows Communication Foundation) client and service application. We're using Windows
Apparently visual studio 2010 built DLLs do not support Windows 2000. Is there a
I have a need to parse Bezier Path Strings, but apparently the System.Windows.Media.Geometry version
I have a Windows application based on Java, that I should like to install
This should be simple, but isn't apparently. Since..Windows 3 or so, there is a
I am porting a Unix C application to Windows. This application renames files while
Some Windows applications add buttons to the control box, which apparently is the name
We've installed Windows Search Server Express on one of our servers, which apparently runs

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.