pblecha

I have a project that is having issues with SP2. It is a browser that was created to incorporate encryption and decryption protocols. I have done some minor fixes to the code since it was originally made, on my machine with SP2; now, the browser has exceptions on machines still running SP1 with the Explorer 6 browser object.

In order to recompile this application to run on these older machines, do I need to remove SP2 from my own machine, or does anyone know of a workaround

Thanks



Re: Visual C# General SP2 causing error?

Gabriel Lozano-Moran

Can you describe these issues




Re: Visual C# General SP2 causing error?

pblecha

The error is as follows:

Application has generated an exception that could not be handled.

Process id=0x15c(348), Thread id=0x734(1844).

The machine had Windows XP SP1 and IE6 installed. This was the same error that appeared on a machine with Windows 2000 and IE6.

Thanks for the help.





Re: Visual C# General SP2 causing error?

Gabriel Lozano-Moran

But do you know that is causing this behaviour I mean what code in your application.




Re: Visual C# General SP2 causing error?

RizwanSharp

SP's are for improvements not for disasters. I'm running Windows XP with SP2. Not having any problem in any application.

Exception tells that there is some nasty thing going in your code but from that error its not obvious that where

To get that complete message put this code in your application:

AppDomain currentDomain = AppDomain.CurrentDomain;

currentDomain.UnhandleException += new UnhandledExceptionEventHandler(UnhadledExceptionHere);

private void (object sender, UnhandledExceptionEventArgs e)

{

Exception ex = e.ExceptionObject;

MessageBox.Show("Message : " + ex.Message + "\r\nStack Trace : " + ex.StackTrace);

}

Whenever an unhandled exception will be raised it'll be sent to this function with complete stack trace and exception messages. So you'll know where did the bad thing happen.

But ofcourse you'll need to recompile the applicaiton before you check it again on the same machine which is causing error.

Then you can see the error message and fix your code appropriately.

I hope this will help.

Best Regards,

Rizwan aka RizwanSharp

}






Re: Visual C# General SP2 causing error?

pblecha

I'm sure willing to try; but my application is comprised of several different solutions at this point (I'm working on putting them all together in one solution, but running into compilation errors because of output settings, so that won't happen any time soon). Consequently, I'm not sure where to put this code. Some of my projects are base class wrappers for third-party dlls; should I put the code in there, or more toward the final steps of the application



Re: Visual C# General SP2 causing error?

RizwanSharp

"Consequently, I'm not sure where to put this code."

You can Put this in your main Form's Constructor:

AppDomain currentDomain = AppDomain.CurrentDomain;

currentDomain.UnhandleException += new UnhandledExceptionEventHandler(UnhadledExceptionHere);

And this anywhere in the main Form's class:

private void (object sender, UnhandledExceptionEventArgs e)

{

Exception ex = e.ExceptionObject;

MessageBox.Show("Message : " + ex.Message + "\r\nStack Trace : " + ex.StackTrace);

}

So whenever there is an unhandled exception, It'll come into this block and it'll popup a message box showing the exception message and its complete stack trace so you'll know what caused this error.

Ultimately you'll be able to solve that problem.

Best regards,

Rizwan aka RizwanSharp






Re: Visual C# General SP2 causing error?

boban.s

Why don't you try to build your project on XP SP1 machine. Maybe SP2 is not the problem. Maybe some IE update is causing the problems. Or maybe some completly different reason, like old version of your app. Try the app on other machine with SP2. It is normal that on Dev machine everything works but when you need to deploy something is missing on client machines.




Re: Visual C# General SP2 causing error?

pblecha

I'm in the midst of that now. Could something like this be as simple as some security update How could I track down such a thing if that's the case

Thanks for all the help!





Re: Visual C# General SP2 causing error?

Gabriel Lozano-Moran

Again by looking at the code that is causing this issue, you still haven't told us what the code does. I mean for all I know you could be automation Word to print reports.




Re: Visual C# General SP2 causing error?

pblecha

If I could tell what code was causing the problem, I'd be halfway to a solution. The problem is, I can't tell what code is causing the issue. These issues arose on an application already in production, that suddenly has a problem. I've been trying to attach the VS2003 debugger to the process to get a clearer idea which code is issuing the exception; but I'm not adept at reading disassembly code, so it's not getting me very far.



Re: Visual C# General SP2 causing error?

pblecha

I've successfully entered the code as suggested; however, the application isn't giving me a clear indication of the cause of the crash. In fact, it's happening at the end of a method! I'm trying to track down the source of the method call, but shouldn't a stack trace give me that For some reason, it isn't.



Re: Visual C# General SP2 causing error?

Gabriel Lozano-Moran

You could load the symbol files which will narrow it down




Re: Visual C# General SP2 causing error?

pblecha

How do I do that



Re: Visual C# General SP2 causing error?

Gabriel Lozano-Moran

You must make sure that when you build a version and especially one that is going to be deployed in production that you make a full copy of the source code, the build version and debug symbols and put that on a network share or burn a CD/DVD with everything on it. When you attach a debugger you can load the symbol files and then point to the correct .pdb files. In Visual Studio when you attach to a process go to menu Debug => Windows => Modules, right click a module you want to load the symbols for and click on "Load Symbols" then point to the .pdb file.

Another good strategy is to setup a Symbol Server for your team/departement/company.