My programs won't start up on Win98 or Win2000

I've been struggling hard with this for about a month.  I have a program written in C# .Net 1.1, that has about 170,000 lines of code and is in daily use by thousands of users.  Any version that I released after about 9/1/05 simply fails to start up at all on Win98 or Win2000.   "An unhandled exception has occurred", followed by thread id, but absolutely none of the usual details.  Keep in mind that it continues to work flawlessly on WinXP, and it always worked flawlessley on Win98/2k until one month ago.  The problem does not affect previously compiled versions, only those which I compiled after that date.

I've gone through a lot in the last month.  Here are some of the highlights:
1. Replacing my hard drive and starting over with a fresh system had no effect.
2. A new solution will run fine, so it's specific to my solution (corrupted ).
3. At one point, removing a particular ImageList from my main form did cause it to start working, and it was repeatable.  But I had already removed lots of other controls from that form, so I'm not sure yet if it was just that one item or something more complex.
4. At one point, the Debug build worked, but not the Release build, even if I changed all the settings so they were identical.  Huh
5. I have altered every property of the Project and Solution I could find, including "Do not Use Mscorlib".  No changes had any effect.
6. In 2 out of 3 cases, starting a fresh solution and copying the files over from the old one seemed to work.  But the third one didn't, and that's the one I need, of course.

So unless anyone has any bright ideas, I'm going to keep plugging away at #6 for about another week, and then maybe look into #3.   This is the worst bug I've ever had, and it's costing me a lot of lost productivity.  Thank you to anyone who takes the time to read this.



Answer this question

My programs won't start up on Win98 or Win2000

  • Bernie a

    Mate Please do one thing.The Pc that has win 2000 reinstall it make sure its not in Dual boot .Update your system with microsoft patches and make sure you have IE6 Sp1 and Windows SP4 for your windows 2000.I think this would resolve your issue.Big Smile

  • Andre Azevedo

    Lemme suggest one thing...why don't you check on the Automatic Updates for the PC that runs your application and check for the patches/updates.  I am assuming that the reason this happened was that Automatic Updates installed something new in your machine that is not compatible with your application.  You mentioned that it only happened after a certain date.  Secondly, the reason why it is not running on a fresh install of Win98/Win2000 is that it probably needed something else for it to run (like patches or updates).  What does this have to do with programming   We normally do not bother Automatic Updates as they occur in the background but I always recommend that before you deploy updates on the network, make sure that every application will work smoothly after installation of the update.

    Ask your systems admin for help regarding this. And review the documentation for your application as well. 

  • CoreComps

    Well, my Win2000 machine that I'm using for testing is a fresh install, but it would make sense to install all patches.  I think I did install SP4, but I will check again.  However, my program does not use IE, so that doesn't seem relevant.  And even if that works, how do I explain to hundreds of users that they have to update their systems.  What a headache.  Still, I will try.  And of course, as soon as I do fix it, I will make a post here and mark this question answered.  But something like this can take a long time to sort out.
  • Sarah Brian

    You sir, are a genius Idea.  VS had a manifest.  Deleting it cured the problem.  I already had DoEvents as my second line.  It wasn't a problem with my code or my manifest, but with the one in the VS environment.  I'm really pissed off that I wasted an entire month sorting out an MS bug, but I'll just channel my anger and move on.  Keeping my fingers crossed that this really was the solution and that it won't come back.

    Thank you so much.  I'll have to hang out in this forum for a while and return some of the love.

  • mycall

    Have you tried using the remote debugger over a network   This will allow you to debug your program on a win98/2000 machine from your Visual Studio XP box.

    Also, when you started over with a fresh system, did you let the XP auto-updates to run   It's possible (although unlikely) that one of the service packs or updates that Microsoft sent are causing the problem... if you reinstall windows on a test box and turn off auto-updates, it may work, otherwise the problem is due to some control or function you added in the past month.

    Which version of visual studio are  you running ... 2003

    Best of Luck,
    Josh Lindenmuth



  • olmich

    Well, another week has gone by with no solution in sight.  I am very desperate now and I'm willing to pay for some one on one telephone support.  If the person can help me figure it out, I would pay upwards of $500.  Any suggestions where to go   My current problem is that I can't use the remote debugger because it can't find my Win2000 machine.  I have tried everything I know.  I strongly suspect it's security related, but I've tried everything.

    Update: Josh has suggested I load VS on my Win2000 computer to compile.  Great idea!

    Update: mscorlib chokes every time it tries to deserialize one of my imagelists.  And not just one either, but a bunch.  I just can't believe I'm the only programmer having this issue.  This is a very critical bug in the deserializer.

  • anandss

    Did you say ImageList Big Smile

    So I must ask again:

    By any chance ... are you using a manifest for Windows XP visual styles, but not for your program but for Visual Studio Look at the Solution Explorer tree, does it have +/- like Windows 2000 or like Windows XP

    What version of Windows do you use to compile your program

    Add the line:


    Application.DoEvents();

     


    exactly after

    Application.EnableVisualStyles();
     


    Try using a real manifest instead of Application.EnableVisualStyles. This method is buggy.

  • spirit7301

    When you use the remote debugger, where does the exception/problem occur   During load, or during program execution   Can you put a break point on the first line of code and see if the program reaches that line   Typically you can solve problems like this with the remote debugger, since it even shows you which dlls and such it's loading and when.

    Josh

  • David Felker

    You really need to look at it using a debugger. Even it doesn't give you the usual stack trace of .NET at least you may find out where does that unhandled exception occurs.

    ImageList may cause some problems although it is unlikely. By any chance ... are you using a manifest for windows xp visual styles

    What about installed service packs for .NET Framework, IE6, Windows



  • Cytodex

    Thanks for the suggestions.

    I've been careful not to add too many Windows updates on my new system for now, just in case that's the problem.  I have restore points in place also.

    I did spend a few days on a debugger, but it was very uninformative.  I'm not familiar with a remote debugger, so I will look into that.  Thanks.

    Using VS 2003.  I think I'm using a manifest for XP styles, but I never see it.   I just have this line as the first line in my program: Application.EnableVisualStyles();  I think that handles the manifest for me.  Commenting out that line has no effect.  Although, since it is the first line of my program, I will explore that further as a possibility.

  • My programs won't start up on Win98 or Win2000