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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:32:59+00:00 2026-05-31T15:32:59+00:00

A user of my program has reported an inability to startup the application. I

  • 0

A user of my program has reported an inability to startup the application. I am not yet done troubleshooting, but I’m simply baffled.

Logging still works, so I used logging statements and was able to narrow down the crash to a single line in a user control’s InitializeComponent:

this.HorizontalBox.Image =
((System.Drawing.Image)(resources.GetObject(“HorizontalBox.Image”)));

Here are the relevant clues from his end:

  • 64 bit Windows 7
  • Correct .NET Framework (4.0 Client Profile)
  • No visual elements ever show, and no error dialogs. It is a silent shutdown when starting.
  • Logging works, but there were no logged errors.
  • He has uninstalled and reinstalled the .NET 4.0 Client Profile framework.
  • He doesn’t have any Visual Studio or other development tools mucking with stuff.

I have spent a week or so eliminating theories and I’m becoming confused and desperate. Here are relevant details and things I have found:

  • I am targeting x86 explicitly.
  • The logging which failed to log any exception is set up to catch and log any unhandled exceptions and thread abort exceptions.
  • Whatever is killing the application also prevents the final “shutting down” logging message in the program’s basic entry point.
  • I had read that certain icon (.ICO) file formats don’t work in Windows XP. A far fetched theory, since this is Windows 7. This is the one and only case of ICO files in the project, so I was suspicious and switched it to PNG. No difference. I since figure that the image is failing merely because it is the first image loaded from a resource.
  • I had read that the Form_Load event may swallow exceptions (and only when debugging). Also, InitializeComponent() is in the constructor, so the theory was shaky. Nonetheless, I wrapped the call to InitializeComponent() in a try/catch, but the catch and its associated logging never get called.
  • I have seen posts about resource compilation problems between x86 and x64, but nothing relevant to runtime issues. (See this post)
  • I assumed there must be something wrong unique with the program showing issues, so I made a WindowsFormsApplication1 test application with nothing more than a single image embedded in the associated resource file. This also fails to load in the same way. This test application was also targeting x86.
  • It works fine on other x86 and x64 machines!

What could possibly be going on his machine? Why is exception handling failing me? This problem is crazy!

Edit: More Details, and I’m still baffled!

  • I have since sent the test application (a single form with a single image on it) built as x86, x64, and “Any Cpu”. The x64 and “Any Cpu” applications both work.
  • 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-31T15:33:00+00:00Added an answer on May 31, 2026 at 3:33 pm

    Some questions spring to mind. Have you got a similar build machine with which to test – this may help to identify if it is the build/program integration or some possible issue with his build (i.e. a windows problem/virus/etc).

    Has he installed to the default folder or did he do a customised install?

    Has he tried a full uninstall / reinstall of your app? (I note you said the runtime was refreshed) – possibly to a different folder to make sure.

    Can you recreate on a similar build (OS version) with VS installed to do a code walkthrough in the debugger – stack trace and output buffer may help identify – so may disasembly – and can set it to stop at all exceptions?

    Unfortunatly unhandled exceptions can not always be caught in C# (especially post 2.0) – so a debugger of WinDBG may be your only option in the end (yuk!).

    Can I suggest something though first…Just a thought:

    Before the line that fails, as a test, output something like this:

    var obj = resources.GetObject("HorizontalBox.Image");
            Console.WriteLine("Obj = " + (obj is Bitmap));
    

    Because I have a feel that the failure is happening when trying to marshal the resource into the Bitmap Type and getting a memory exception (maybe something corrupt with the image stride/pixel format etc or maybe something on the culprit machine is making the image file look like a non image file).

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

Sidebar

Related Questions

A user of my program has reported problems reading a settings file written by
My program has two threads: Main execution thread that handles user input and queues
I'm writing a program that has an NSView embedded in an NSScrollView which user
I'm currently working on a program that has many of those the user SHOULD
This program has the user input name / age pairs and then outputs them,
How I can get the user's temp folder path in C++? My program has
I have a pretty simple problem. When program has been started and user tries
I have a Java program which has a number options it allows the user
I have developed a grails/groovy application for a legacy database which has user maintenance
My program has a main thread that takes command input from a user. Separately,

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.