Visual Studio 2008 crashes horribly - c#

This has happened to me 3 times now, and I am wondering if anyone is having the same problem. I am running Visual Studio 2008 SP1, and hitting SQL Server 2005 developer edition.
For testing, I use the Server Explorer to browse a database I have already created. For testing I will insert data by hand (right click table -> show table data).
I can do this for a week without problems, but sometimes my computer will crash when the stars are aligned. It doesn't hang, it doesn't blue screen, I see the bios boot screen .2 seconds after I enter some value in a new row that hasn't been saved yet. I have never seen a crash like this, where it reboots instantly. I think it may happen when I enter something that violates a database constraint, but I am not sure yet (need a few more crashes to pinpoint it).
Anyone have the same problem? Know of a solution? Too bad VS wasn't written with managed code, eh? :)
UPDATE: I can reproduce it by inserting a duplicate primary key, clicking off the row, clicking OK on the database error notification, then trying to update the primary key again. I agree - it definitely sounds like a hardware or driver issue, but am not really sure how to solve this since this has only happened when doing this 1 particular thing in VS. I am not overclocking either - I am running a normal (single core) 3 Ghz Dell.

Just so you know, when your computer just snaps right back to the BIOS boot screen with no blue screen or other crash data, this is called a "triple fault" Basically, there was an exception (on a hardware level) whose exception handler triggered an exception whose exception handler triggered an exception. This is almost always a hardware issue since operating systems tend to be VERY careful in the double fault handler not to trigger an exception.
Needless to say, it could be a software problem, but I would check your RAM, CPU and motherboard for potential issues. I had a dell which was doing this fairly randomly with Vista and a new mobo/CPU from dell solved it perfectly.
EDIT: just to note, it can be very hard to convince dell that it is indeed a hardware issue, but stick with it and eventually they'll cave and fix it for you.

Test your memory, it's the most likely cause of your reboots.

Visual Studio 2008 is just an application, no application should be able to cause your machine to reboot like that.
What can cause your machine to reboot like that is drivers and hardware...

Not to just jump on the bandwagon, but in the past 15 years every instance of this type of situation I have come across has been caused by hardware failure.
Good news is at least that is often eaiser to fix.
Are you able to swap the entire box out, even if only for a few weeks? Often I really don't care what piece failed -- I just yank the whole thing and sort it out later.
Joe

Are you overclocking the machine? Reboots like that are a sign that you have a bad overclock, ie. too high, bad voltage settings, bad memory timings.

I have the same apps running on my machine (on Vists32), and have not hit that problem.
Sounds suspiciously like a RAM problem to me, although I had a bad hard drive in a test server cause similar problems too, it even fried the motherboard, but most often this sort of thing is RAM.

I am not having a crash per se' but when I attept to run the group expert in crystal reports VS2008 hangs and can only be closed by using the task manager.

I'm experienced (read: old) enough to know that this SHOULD be a hardware issue. But...
Another developer and myself at the company where I'm currently working installed VS2008 last week, and now we're both seeing this problem. Every now and then, about once a day, when using the IDE the machine will reset as if someone had pushed the reset switch. (The reset button is not expoesed on these machines.)
We have identical hardware (Dell Optiplex GX620, 2GB RAM, WinXPsp2) as do the other ~20 developers here. The other staff use VS2005. We are the only ones having the problem. The machines are stock (it's a stodgy corporate environment) and well-maintained.
So, while this shouldn't be related to VS, it's an awful lot of circumstantial evidence.
For what it's worth, I run VS2008 at home with no issues.

Do use Symantec anti-virus? I had a situation with a new machine where just pressing the ALT-TAB combination would cause my machine to spontaneously reboot about 50% of the time. When Windows restarted it said I had experienced an issue related to a driver.
I mentioned it to our IT guy and he said that it was Symantec and that he had an update that would fix it. Needless to say it really felt like a hardware issue to me, so I was more than skeptical. But he updated my Symantec install and the issue went away!
Try disabling your anti-virus to see if it goes away for a while. And if it does, see if there is an update from your anti-virus vendor

To check the status of your RAM or Hard drives use UBCD (link)

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=329016
http://social.msdn.microsoft.com/forums/en-US/winforms/thread/879ab314-07b2-484e-989c-5661e5bc234a/
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331888
I had the same problem early 2008. I believe it was a video driver problem. That a data table in a window could crash windows this way is amazing. There have been so many reports of this that I don't think it's hardware related. Microsoft won't accept it as a bug since they can't reproduce it. Still a bug though.

In house visual Studio 2008 debugger was crashing. Symantec was the culprit. Removal of Symantec services resolved that problem for this system. Thought this might help other developers that see strange crashes in VS2008 try disabling Symantec AV and stopping services on boot.

Related

Website frequently timing out, but can't determine why

I'm after some general advice here. We have an ASP.net 4 web forms application on Windows Server 2008 R2 and IIS 7.5, with SQL Server 2008. We're experiencing problems with the website timing out, seemingly at random. We've had reports of what people were doing on the site when they noticed it started timing out, and there is no consistency between these. We have also tried all of the things that users reported they were doing, and have had no joy bringing the site down. We have static html pages on the site (albeit with .net4 friendly URLs) and these pages display when the site is timing out.
At first we thought it was a cyber attack, so spend time making sure all ports were closed, remote access only available to select IPs, and routing mail through an external spam filter (allowing us to close port 25). We also ran virus and malware scans which found nothing.
We have made updates to the website at the time that these problems started appearing, however it's really too late and too much has happened on the site that we could roll back the changes without experiencing a bigger headache than we currently are.
I'm a developer rather than a support/hosting/hardware specialist, so don't know huge amounts about server setups, but I've spent a long time going through error logs looking for some positive sign. When I've looked at the error logs around the time the site went down, there has rarely been a error - sometimes there is a warning, but nothing that looks conclusive (this could be where my server inexperience could be a problem however). I'm not ruling out there being multiple issues by the way.
I set up IIS debugging tool as I noticed a w3wp.exe error yesterday (similar to this: an unhandled win32 exception occurred in w3wp.exe), but the site has continued to go down today with nothing new in the debugger. I've debugged the site locally through VS2010 and can't recreate any issue.
So really, I'm on the point where I've run out of ideas, and almost run out of hair to pull out. Can anyone who's a bit more clued up in this area, offer me some advice or a list of things to try in order to pinpoint exactly what is happening here and what is causing it to hang? Any help gratefully appreciated
We found that there were some TableAdapters in the site that were static and shared for the class. After removing them, the problem stopped. Thanks for the help anyway folks

Ways of isolating cause of unresponsive Winforms GUI

I have a large-ish Winforms application written in C# which is periodically unresponsive. The issue seems to occur once the application has been use for an hour or so. Exact timings are difficult to gather as users often go off to work on something selse, get back to it and find it has become unresponsive.
I think a memory leak can be ruled out as I'm not seeing excessive memory usage (I've asked users to send a screenshot of the task manager and memory usagage is the same as I would see when the application is runnning normally)
Similarly, CPU usage is normal (single digit %)
As I've so far been unable to recreate the issue on mydevelopment PC I am planning on sitting next to one of the affected users and mirror every action the user performs in order to recreate this. (I'll be setting up a laptop to RDP in to my main PC)
Recreating the issue is one thing, but I'll need to find out what is actually going on in the application.
Could anyone tell me if running in debug mode (through visual studio) will be sufficient or will I need to do something different?
I've searched through a few posts and I've seen mention of profiling software, however I'm not sure if this would only help with general performance issues or memory management issues.
Alternatively, if anyone has come across similar freezing issues then do you have any suggestions of the kind of causes for this?
Some technical details: Aplication is C#, compiled against .NET 3.5, winforms GUI. There are a few external libraries (most significant is ComponentFactory Krypton Suite). Data access is to a Microsoft SQL Server 2005 database. The solution contains 39 projects, I'm not sure if that might have something to do with it?
Any suggestions/pointers would be greatly appreciated.
The application is working much more reliably now, freezing issues still occur on occasion but nowhere near as often as before.
The issue appears to be related to the endpoint security (in this case, Cisco Security Agent) present in the environment I'm working in, application has been whitelisted and has has significantly rediced the instances of application hangs. The development system I work on does not have this endpoint security present, so it didn't show up in early stages of testing.
Thanks for all your feedback, I think there are still threading and garbage collection issues that need cleaning up, hopefully this should sort out the last few issues.

Multi-Threaded applicaiton has poor performace on a machine?

I have created a multi-threaded application that runs fine on every system except for one. The system is a windows 7 home edition setup. The 2 systems is running fine on are windows 7 Ultimate. Instead of each thread running independently, they seem to run in tandem. Also it runs really slow. It is really strange. I think the system is a quad core system and not sure if that has anything to do with it. I know I don’t have any code up here, but I was hoping you all might have some ideas.
Update:
Well, it turned out someone had removed the indexes out of my database. It seemed like the applicaiton was hanging, but it really was having trouble updating the records becuase the PK was removed. Thank all for your thoughts.
I'm pretty sure Windows 7 home basic has a built in limit of a single processor.
Yup:
http://en.wikipedia.org/wiki/Windows_7_editions
Was an issue with indexes being removed fromt he database.

ASP.NET problem - Firebug shows odd behaviour

I have an ASP.NET application that does a large database read. It loads up a gridview inside an update panel. In VS2008, just running on my local machine, it runs fantastically. In production (identical code, just published and put on one of our network servers), it runs slow as dirt.
Debug is set to false, so this is not the cause of the slow down. I'm not an experienced web developer, so besides that, feel free to suggest the obvious.
I have been using Firebug to determine what's going on, and here is what that has turned up:
On production, there are around 500 requests. The timeline bar is very short. The size column varies from run to run, but is always the same for the duration of the run.
Locally, there are about 30 requests. The timeline bar takes up the entire space.
Can anyone shed some light on why this is happening and what I can do to fix it? Also, I can't find much of anything on the web about this, so any references are helpful too.
EDIT: I forgot to mention that I am using the exact same database for both local and production environments.
EDIT: __EVENTTARGET points to the timer that updates the progress.
EDIT: Timer appears to be working - I set it to a larger interval, which shows me that the local app is processing ~50000 records/second and that the production app (same database, same code!) is processing at best ~5000 records/sec.
Back to square one, mysteriously slow app. :(
My guess would be the size of the database you're using on your dev box vs. production. Is it possible there is something happening for each row of your gridview that only happens 30 times on your box becuase it has less data than production?
Systematic debugging - strip it down and add things back one at a time until you see the change.
Brandi,
Can you check the Event Viewer logs for the web server? Do you have anything failing in there?
Are you running the app in VS2008 off of IIS or the dev server?
Anytime I've experienced strange discrepancies between seemingly identical dev and prod code, I've learned to have a quick look at the machine.config file in production.
If you have access to it, you might compare it to your local copy, and specifically review these settings (although the linked post doesn't refer to your exact problem per se.)
I've come to accept that this may be a processor issue based on this other post:
ASP.NET Website Slow Performance on production server
Thanks to everyone who helped answer.

.NET Applications performance problem on Windows 2003

We have a 2 x Quad Core Xeon server with 8GB of RAM and Windows Server 2003 Enterprise installed on it. We installed our application server which is based on .NET Framework 3.5 on it. The server uses SQL Server 2005 as its database server.
When we installed the application server, it used to have ultra fast performance and everything was fine. Once we joined it into our domain, its performance decreased dramatically. For example a task that took 1 sec to complete, now takes about 30 sec. This is very strange since only .NET based applications' performance got this performance hit but the other applications still run at their normal speed.
Does anyone have any idea about why is this happening? Any help or suggestion is much appreciated.
Unfortunately, more is probably needed to answer your question. There are a host of possible reasons why this is occurring, and most of them involve your code.
Based on the symptom that you joined the domain and then things started causing trouble, I'd say you've got a lot of networking that you're doing that previously was able to be done locally on your machine and the latency is now actually causing trouble.
But that's a wild guess based on not nearly enough information.
I'd suggest you profile your code. Find out where the majority of your time is spent during execution and then post the code or a sanitized version of it here so we can help you optimize it.
I did find the answer to my question so i thought it might be good to share it here. The CLR want generate publisher evidence for assemblies with authenticode signature when it tries to load the assemblies. In our case CLR was trying to connect to clr.microsoft.com but our server's internet access was blocked so it caused huge delay whenever the application server tries to load a new assembly.
The following post describes how you can disable this feature:
Bypassing the Authenticode Signature Check on Startup
I'm going to make a guess here and think that you're talking about a web application. If this is correct, you might want to take a look at the application pools you have setup on the webserver. Your application might be getting confused about which pool to set itself in when it starts running.
Another thing to check might be your data connections and make sure that you're closing everything that's been opened.
The last thing, like Randolpho said, you're just really going to have to follow your code execution with some kind of profiler and see where things are getting tied up.
Good luck!

Categories