Visual Studio 2008 crashes on C# unhandled exception

I just got a new box running Windows 7 64 bit Home premium. And I've 
installed VS 2008 with the feature pack and service pack. When I was making 
so changes to an existing C# forms application, I managed to generate an 
unhandled exception for a system argument. This totally locked up Visual 
Studio - I got the dialog asking me to debug or continue and then total 
freeze. I had to kill VS with the task manager.

I can't reproduce this on a Vista 32 bit system or an XP 32 bit system.

Any suggestions welcome!

Thanks....

Mike 

0
MP
3/23/2010 3:44:01 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

5 Replies
1057 Views

Similar Articles

[PageSpeed] 46

MP wrote:
> I just got a new box running Windows 7 64 bit Home premium. And I've 
> installed VS 2008 with the feature pack and service pack. When I was 
> making so changes to an existing C# forms application, I managed to 
> generate an unhandled exception for a system argument. This totally 
> locked up Visual Studio - I got the dialog asking me to debug or 
> continue and then total freeze. I had to kill VS with the task manager.
> 
> I can't reproduce this on a Vista 32 bit system or an XP 32 bit system.
> 
> Any suggestions welcome!

You'll have to do the hard work yourself.  Trim your project until the 
problem goes away.  Then add back whatever you last trimmed.  Figure out 
what, exactly, it is in the project that's causing a problem.

A likely cause is some kind of platform-dependence problem.  A project 
or dependency with the "CPU Type" set to the wrong setting (e.g. x86 
when the whole project is "Any CPU" or something like that), for 
example.  But there's really no way for any of us to suggest what the 
problem is without a concise-but-complete code example, and you can't 
provide a concise-but-complete code example without doing a lot of 
leg-work first.

For what it's worth, I use VS2008 on 64-bit Windows 7 on a semi-regular 
basis without any trouble at all.  My primary platform is still x86, but 
I know for sure VS2008 typically works fine on 64-bit.

Pete
0
Peter
3/23/2010 3:54:45 AM

"Peter Duniho" <no.peted.spam@no.nwlink.spam.com> wrote in message 
news:#BH0UyjyKHA.404@TK2MSFTNGP02.phx.gbl...
> MP wrote:
>> I just got a new box running Windows 7 64 bit Home premium. And I've 
>> installed VS 2008 with the feature pack and service pack. When I was 
>> making so changes to an existing C# forms application, I managed to 
>> generate an unhandled exception for a system argument. This totally 
>> locked up Visual Studio - I got the dialog asking me to debug or continue 
>> and then total freeze. I had to kill VS with the task manager.
>>
>> I can't reproduce this on a Vista 32 bit system or an XP 32 bit system.
>>
>> Any suggestions welcome!
>
> You'll have to do the hard work yourself.  Trim your project until the 
> problem goes away.  Then add back whatever you last trimmed.  Figure out 
> what, exactly, it is in the project that's causing a problem.
>
> A likely cause is some kind of platform-dependence problem.  A project or 
> dependency with the "CPU Type" set to the wrong setting (e.g. x86 when the 
> whole project is "Any CPU" or something like that), for example.  But 
> there's really no way for any of us to suggest what the problem is without 
> a concise-but-complete code example, and you can't provide a 
> concise-but-complete code example without doing a lot of leg-work first.
>
> For what it's worth, I use VS2008 on 64-bit Windows 7 on a semi-regular 
> basis without any trouble at all.  My primary platform is still x86, but I 
> know for sure VS2008 typically works fine on 64-bit.
>

Ok -- here's a concise example:

Create a new project (Windows Forms).
Drop a dateTimePicker on the form.
Add an event for the dateTimePicker 'Value Changed'.
In the event processing, cause an exception.

In the 'Debug/Continue' Dialog, press Debug.

I am now wedged----

Here's the code:

namespace TestExceptions
{
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }

    private void OnDateChanged(object sender, EventArgs e)
    {
      string l_csNull = null;
      string l_csBoom = l_csNull.Substring(0,1);
    }
  }
}

> Pete 

0
MP
3/23/2010 4:40:15 AM
MP wrote:
> Ok -- here's a concise example:
> 
> Create a new project (Windows Forms).
> Drop a dateTimePicker on the form.
> Add an event for the dateTimePicker 'Value Changed'.
> In the event processing, cause an exception.
> 
> In the 'Debug/Continue' Dialog, press Debug.

Your "example" is not complete, lacking some important details. 
However, I was able to confirm the problem.  It appears to be mainly not 
a problem with VS, but a problem with the DateTimePicker control 
specifically.

Note also that this isn't a "crash" as you report, but a hang (i.e. VS 
becomes "unresponsive").  You can get VS to recover simply by 
force-closing the process being debugged.

Doing a little research, I found an existing bug report from about six 
months ago, describing this specific problem.  I've added my own 
comments to the report, which you can read here:
https://connect.microsoft.com/VisualStudio/feedback/details/490277/

In there, you'll note that I also found that if you explicitly set your 
project to run as x86 (i.e. 32-bit), the problem does not occur.  You 
can also see from the original report that you don't need an exception; 
simply setting a breakpoint in the event handler is sufficient.  But you 
_do_ need to interact with the DateTimePicker in a specific way; 
changing the current value using just the arrow keys doesn't cause a 
problem.

Probably the one thing that makes this bug so bad, in spite of the 
relatively narrow repro case, is that it's still there in VS2010!

The bug is marked as "closed", which is of course completely bogus.  My 
understanding is that if there is activity on the bug report, someone 
still has to review it, and presumably the bug will get reopened.  At 
the very least, you (and anyone else interested) should vote in favor of 
fixing the bug, as well as confirming that you can reproduce the 
problem.  If you have additional comments to add to the report, you 
should do that too.

Pete
0
Peter
3/23/2010 8:10:19 AM
I have similar issues with Vs2008 on Win 7 64 bit. It happens to me 
while building a large solution. The frequency is low though. I maybe 
see it once every week or two. I have tried lots of different options 
but have found nothing that works. For now i just kill VS with task 
manager and restart the build. Like you, I have absolutely no problems 
at all on Vista or XP.



On 3/22/2010 10:44 PM, MP wrote:
> I just got a new box running Windows 7 64 bit Home premium. And I've
> installed VS 2008 with the feature pack and service pack. When I was
> making so changes to an existing C# forms application, I managed to
> generate an unhandled exception for a system argument. This totally
> locked up Visual Studio - I got the dialog asking me to debug or
> continue and then total freeze. I had to kill VS with the task manager.
>
> I can't reproduce this on a Vista 32 bit system or an XP 32 bit system.
>
> Any suggestions welcome!
>
> Thanks....
>
> Mike

0
Leon
3/23/2010 8:58:35 AM

"Peter Duniho" <no.peted.spam@no.nwlink.spam.com> wrote in message 
news:#yIOIBmyKHA.2012@TK2MSFTNGP04.phx.gbl...
> MP wrote:
>> Ok -- here's a concise example:
>>
>> Create a new project (Windows Forms).
>> Drop a dateTimePicker on the form.
>> Add an event for the dateTimePicker 'Value Changed'.
>> In the event processing, cause an exception.
>>
>> In the 'Debug/Continue' Dialog, press Debug.
>
> Your "example" is not complete, lacking some important details. However, I 
> was able to confirm the problem.  It appears to be mainly not a problem 
> with VS, but a problem with the DateTimePicker control specifically.
>
> Note also that this isn't a "crash" as you report, but a hang (i.e. VS 
> becomes "unresponsive").  You can get VS to recover simply by 
> force-closing the process being debugged.
>
> Doing a little research, I found an existing bug report from about six 
> months ago, describing this specific problem.  I've added my own comments 
> to the report, which you can read here:
> https://connect.microsoft.com/VisualStudio/feedback/details/490277/
>
> In there, you'll note that I also found that if you explicitly set your 
> project to run as x86 (i.e. 32-bit), the problem does not occur.  You can 
> also see from the original report that you don't need an exception; simply 
> setting a breakpoint in the event handler is sufficient.  But you _do_ 
> need to interact with the DateTimePicker in a specific way; changing the 
> current value using just the arrow keys doesn't cause a problem.
>
> Probably the one thing that makes this bug so bad, in spite of the 
> relatively narrow repro case, is that it's still there in VS2010!
>
> The bug is marked as "closed", which is of course completely bogus.  My 
> understanding is that if there is activity on the bug report, someone 
> still has to review it, and presumably the bug will get reopened.  At the 
> very least, you (and anyone else interested) should vote in favor of 
> fixing the bug, as well as confirming that you can reproduce the problem. 
> If you have additional comments to add to the report, you should do that 
> too.
>
> Pete

I voted and commented - Thanks Pete-

Mike 

0
MP
3/23/2010 1:29:24 PM
Reply:

Similar Artilces:

Office for Mac 2008 and 2004
Why doesn't this product ever include Access? What Microsoft product for the Mac is compatible with Access? Gail@officeformac.com <Gail@officeformac.com> wrote: > Why doesn't this product ever include Access? What Microsoft product for > the Mac is compatible with Access? Microsoft was rather late to the game with Access. By the time they developed it for Windows, FileMaker was so well-entrenched in the Mac market that Microsoft decided not to try and compete. So to answer your question: look into FileMaker Pro. -- Adam Bailey | Chicago, Illinois adamb@lull.org | Fi...

A problem occur after changing OFFICE from C: to D:
Considering my C:\ is nearly full, I unstall my office from C:\ and then install my Office to D:\ After this, OFFICE runs well except EXCEL has a warning messege when I open it. The problem is: When I open EXCEL, it jump up an alert messege: [Unable to find C:\Program Files\Microsoft Office\Office10\Library\Analysis\ATPVBACS.XLA] 1. Can anyone tell me how to solve this problem? 2. If I don't solve this problem, what will be the result? Thanks! Martin 2007-07-04 > The problem is: > > When I open EXCEL, it jump up an alert messege: > [Unable to find C:\Program Fil...

Viewing MDI files in Office 2008?
How do you view MDI files in Office 2008? I am a new Mac user so please simplify it for me! MDI files can only be viewed in Microsoft Office Document Imaging, and that application is not available on the Macintosh. On 18/02/08 4:18, in article ee8dd44.-1@webcrossing.caR9absDaxw, "Mac_Newbie@officeformac.com" <Mac_Newbie@officeformac.com> wrote: > How do you view MDI files in Office 2008? I am a new Mac user so please > simplify it for me! -- Michel Bintener Microsoft MVP Office:mac (Entourage & Word) *** Please always reply to the newsgroup. *** Additional to...

Use Stored Procedure developed in C# in a SQL Query
I created a Stored Procedure by selecting a SQL Server Project in Visual Studio 2008 using C#. It receives a SqlString as a parameter and return how many times a specific character was found. I deployed the procedure to a SQL Server database and can see it listed under the database. One caveat is that it has a small lock icon on it. I have a select query where I want to use the stored procedure. I am thinking this is doable in a select query but can't seem to get it to work. What I want to do is to have a select statement listing some fields and one of the fields being th...

MFC String-table in C# ?
Hi, maybe a bit OT for this newsgroup, but I know that people here use C#, too. So, does anyone know how the MFC string-table technique map to C#/WinForm? I initially thought about using an integer->string map in C#, but is there some built-in mechanism to manage that? Thanks, Giovanni "Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> ha scritto nel messaggio news:ugqw1g7LJHA.1736@TK2MSFTNGP03.phx.gbl... > So, does anyone know how the MFC string-table technique map to C#/WinForm? ....after some web search, it seems that C# has a ResourceManager class ...

Publisher 2007 will not open my old files
What to do? All of a sudden, my Publisher 2007 will not open any of my publisher files, even others done in publisher 2007. It crashes EVERY TIME. I have run Office Diagnostics twice, with no result. I have uninstalled and reinstalled Office 2007 TWICE, still no change. Do I just abandon it and go back to Publisher 2003? I've run virus scans, defragged, tried other versions of these files, tried files done by others - NOTHING works. it will start a new project, but will not open an old project without crashing. Can I install Publisher 2003 and use it even though I have Office ...

SBS2008 RRAS service causes other servcies to crash
Would be VERY grateful if there is an expert eye that can be cast over my problem. I have an SBS2008 server which has been working fine for about 3 months. Just before christmas RRAS stopped So I manually started it and it stopped again. Then had a critical email notice saying all these services stopped The Application Experience service has been stopped. The Background Intelligent Transfer Service service has been stopped. The Network Policy Server service has been stopped. The IKE and AuthIP IPsec Keying Modules service has been stopped. The IP Helper service has been stoppe...

Agent Install on EBS 2008 Failing
I am running DPM 2007 on Windows Storage Server 2003 (Dell DP600 appliance) and trying to protect EBS 2008 which is virtualized. However, I followed the technet article here to setup things: http://technet.microsoft.com/en-us/library/cc512491(WS.10).aspx But I am unable to successfully install the agent on the EBS 2008 servers and get them to talk to DPM. I followed the last part of - To install a DPM protection agent. The agents appear to be installed on the Management, Security and Messaging servers, but cannot seem to attach properly to the DPM server. They show in Err...

Visual Basic sub routine command??
Can anyone tell me what the command is to call another macro from within an existing macro? I am using Excel 98 for Macintosh For example, I am running Sub Macro (9) and I want to run Sub Macro (10). I have tried recording a macro and selecting Tool Macro Macros.. ...

Idiots amd Noddys guide to Visual Basic for applications
Hi, Can some one recommend a website/book an idiots guide, real nodd explanations for beginners learning Visual Basic for applications, fo somone who know's nothing about visual basic leading them through step by step process. A web site - that can get you stated from very beginning, with ver concise explanations. Walking before you can run style!!!!!! Many thanks, -- grphillip ----------------------------------------------------------------------- grphillips's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1595 View this thread: http://www.excelfor...

Microsoft Word 2008
Every time I log off WORD 2008 I receive this message:- <br><br>"A file error has occurred. Check your network connections or make sure the disk is properly inserted and not defective. (Normal.dotm)" <br><br>What does this mean? > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3283514393_6152539 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: 8bit Hi owalston, Did you by chance specify a network path in Prefs | File Locations ...

Yahoo mail messages cause Outlook to crash
Some recent messages from Yahoo have caused my Outlook (Office 2003) to crash. I try to open the message, nothing happens for a while and then I get the window that says sorry, Outlook has to close, would I like to send an error message to Microsoft. Has anyone else had this problem? A friend noted that the Yahoo messages now include Yahoo! Messenger with Voice which seemed to be an embedded attachment and contains and HTML divider bar. No hidden graphic elements, however. Can somebody suggest a change of Outlook parameters that will prevent a crash? Thanks, Bill Edelstein Schenectady, NY ...

Passing a C++ 6.0 MFC File stream into a Visual Basic 6.0 dll func
Hello All, I am stuck trying to find a way to open a file in a C++ MFC application (using a stream), write data into it, then call a Visual Basic dll function and pass to it the file stream (or a file stream pointer or a file handle somehow) so that the VB dll functions can write their own data into the same open file. The problem is that Visual Basic 6.0 has no such thing as a file stream. There might be a way to do this using COM, but I do not know much about COM. Are there any guru's reading this that know a way I can pass a stream for an open file back and forth between MFC C...

Can't auto-add override in C#
In the VS.NET 2003 IDE, I can usually type "override" in the code editor and then select from a list of virtual properties and methods in the base classes. However, this occasionally stops working. If I try to add the override via the Class View, sometimes my class's base classes are not shown (under the "Bases and Interfaces" node), and when they are shown, sometimes I can't get the "override" flyout menu pick. Also, when the IDE is in this state, many of my classes do not appear in the Class View. Does anyone know what's going on here? Any help is...

Money cannot creare a temporary file in 'C:\Documents and Settings\[USER]\Local Settings\Temp'
Hi, I just started to get this kind of error message when I make bakups with my Money 2003 Deluxe: "Money cannot creare a temporary file in 'C:\Documents and Settings\[USER]\Local Settings\Temp'". I checked the folder mentioned and my WinXP user account has the privilges on that folder (as it is supposed to have). How I can solve it? Thank in advance. Di Fresco Marco > I just started to get this kind of error message when I make bakups with my > Money 2003 Deluxe: > "Money cannot creare a temporary file in 'C:\Documents and > Settings\[USER]\Local...

DTM Studio
I am using 1.57565 and have created a Test Pool in Job Monitor to which I have added a machine, but I cannot see the Test Pool in the Device Console. The Device Console is empty. What am I missing? -- adburger Either restart the machine dtm controller machine and restart DTM studio or restart dtm controller service. Regards, Anand Choubey On Sep 3, 3:23=A0am, adburger <adbur...@discussions.microsoft.com> wrote: > I am using 1.57565 and have created a Test Pool in Job Monitor to which I > have added a machine, but I cannot see the Test Pool in the Device Consol= e...

Microsoft CRM Unhandled Error 06-07-06
Started recieving this error message when trying to perform searches... ================================= Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin ...

Error message when retriving a string from my xml file in C#.net a
I created the following code in my C# program but it's giving me error message at run time of : XML.XPATH.XPATHEXCEPTION : Namespace Manager or XSLTContext needed. This query has a prefix, variable or user defined function. Can someone see what I'm doing wrong? Thanks, Alpha private XPathDocument unityMessages = new XPathDocument("UnityMessages.xml"); unityMsgNavigator = unityMessages.CreateNavigator(); string query = @"/trans-unit[@id=""m1""]/target[@xml:lang=""fr""]"; XPathExpression queryM1 = unityMsgNavigator.Co...

Remote Desktop in SBS 2008
We Have been using remote desktop to connect remotely to an application running on a Windows Server 2003 machine and are about to move everything to a new SBS 2008 box. I am having trouble finding information on how to set this up so that a remote user can login to a remote desktop session on the server. Does the application have to be installed on the server? I think you will find that most people in here will advise against having users access the server. Unless I am misunderstanding you. "Tim" <Tim@discussions.microsoft.com> wrote in message news:339605...

Money crashes when Investment Portfolio is selected
Whenever I select the Investment Portfolio, Money crashes with a message: "Microsoft Money has encountered a problem and needs to close. We are sorry for the inconvenience." I've tried removing the application (Money 2001) and re- installing it but the same problem occurs. The data is still there because I can see the amounts in the Reports section. But I can no longer access the Investment Portfolio to make changes or updates. In microsoft.public.money, Lynn W wrote: >Whenever I select the Investment Portfolio, Money crashes >with a message: "Microsoft Money...

Windows 2008 R2 Group Policy preference settings
I have installed a windows 2008 R2 dc in our windows 2003 AD. I want to use the windows 2008 r2 group policy preferences such as for local users setting, power and printer preference settings. I want them to be applied to my window XP SP2 and SP3 desktops. With my domain can i apply these group policy preference settings to my xp machines, or do I need to install anything extra on my w2008 R2 DC or my XP machines. Hello guv, To use GPP you have to install the client side extensions on the XP machines or higher: CSE XP 32bit: http://www.microsoft.com/downloads/details...

C:\WINDOWS\system32\ieframe.dll\1
Hello, if you have problems with VB6 - C:\WINDOWS\system32\ieframe.dll\1 1. open regedit 2. search for: C:\WINDOWS\system32\ieframe.dll\1 3. change to: C:\WINDOWS\system32\ieframe.dll 4. save regedit finished :) ---------------------------------------------------------------------------= ---------- Hallo, wenn ihr Probleme mit VB6 habt - C:\WINDOWS\system32\ieframe.dll\1 1. =F6ffnet regedit 2. sucht nach: C:\WINDOWS\system32\ieframe.dll\1 3. =E4ndern zu : C:\WINDOWS\system32\ieframe.dll\ 4. speichert regedit fertig :) "netbase4web" <netbase4web@web.de&...

Outlook Crashs Sending email
When on the contact page, in a contact file and choosing the send email icon, I get: Runtime Error! C:ProgramFiles\MicrosoftOffice\Office10/OUTLOOK.EXE This also happens at other times, any ideas? ...

Maintenance plan in sql server 2008 management studio
Hi, when I right mouse click on a certain maintenance plan and choose Modify, The follow error popped up in a dialogue box. --------------------------------------------------------------- Unexpected error: service 'Microsoft.VisualStudio.Designer.Interfaces.INVSDDesignerService' is not available. Make sure that the product is installed properly. (mscorlib). ---------------------------------------------------------------------- Also on the server machine, we installed management studio for 2008, when we expand the management menu, there is no 'Maintenance Pla...

How to create an access database programatically in C#
I have created access databases in VB6, but now I am working in C#. I am trying to create a Microsoft Access Database programatically in C#, but can't figure out how to do it. Can anyone give me any pointers? You'll probably have more luck asking in a C# newsgroup. Most of us here work from within Access, not from outside it. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Brian Kitt" <BrianKitt@discussions.microsoft.com> wrote in message news:34A1AD65-1C1D-4000-83F1-17FD907027EB@microsoft.com... >I have created access d...