Proposed Answer Invalid access to memory location

  • Tuesday, December 13, 2011 1:56 PM
     
     
    After upgrading to tools v1.6 i get random "invalid access to memory location" error when deploying my application to local emulator, anyone has idea about how to fix it?
    Corrado Cavalli [Microsoft .NET MVP-MCP]
    UGIdotNET - http://www.ugidotnet.org
    Weblog: http://blogs.ugidotnet.org/corrado/
    Twitter: http://twitter.com/corcav

All Replies

  • Tuesday, December 13, 2011 3:39 PM
     
     
    I did see this occasionaly on 1.5 but on 1.6 it is driving me crazy!
    Karin, Stockholm
  • Tuesday, December 13, 2011 4:42 PM
     
     Proposed Answer

    Yes, absolutely annoying...

    Hope someone has a workaround/fix for that...


    Corrado Cavalli [Microsoft .NET MVP-MCP]
    UGIdotNET - http://www.ugidotnet.org
    Weblog: http://blogs.ugidotnet.org/corrado/
    Twitter: http://twitter.com/corcav
    • Proposed As Answer by Pat TormeyMVP Thursday, December 15, 2011 3:20 PM
    •  
  • Wednesday, December 14, 2011 9:02 AM
    Moderator
     
     

    Hi,

    I'm involving another engineer to have a look at this issue. We'll get back to you if we find anything. In the mean time please provide additional information such as the callstack of the exception, OS information to help us investigate.


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Wednesday, December 14, 2011 3:48 PM
     
     

    Hi Allen,

    Here's the message

    I'm running VS2010 SP1 on Windows 7 64bit running all updates, i worked a lot with version 1.4 and never got issues, it all started when working on the project again after upgrade to v 1.6.

     


    Corrado Cavalli [Microsoft .NET MVP-MCP]
    UGIdotNET - http://www.ugidotnet.org
    Weblog: http://blogs.ugidotnet.org/corrado/
    Twitter: http://twitter.com/corcav
  • Thursday, December 15, 2011 5:07 AM
     
      Has Code

    Corrado

    Could you clairfy more about this issue? The Error dialog is pop up by DEVENV.exe process or dfMonitor.exe etc?

    You can use task manager to locate the detail process. select the UI in the Application catagory and right click the mouse and select go to process.

    If the problem occured in the DEVENV.exe, I suppose we miss some components for the Visual Studio Add-in here.

    Could you complete remove the previous SDK such as 1.4 and SDK 1.6. Then reboot and reinstall the latest SDK1.6?

    If the problem occur again, could you immediately go to task manager and find the process DEVENV.exe process and right click to generate a dump file? Then share you dumps link here.

    By the way, I found there is potential issue if you machines is out of memory. Since the DEVENV.exe is still 32 bit process and it will run out if

    when use more than 2 GB user mode memory. You may check from memory usage in the task managers. It if is close to 2G we can enable

    devenv.exe  large address aware.

    1. Be sure to backup DEVENV.exe
    2. Using the Visual Studio command prompt, navigate to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
    3. execute the following command:
           editbin /LARGEADDRESSAWARE devenv.exe

    Thanks

    Leo Lin

     

     

  • Thursday, December 15, 2011 3:24 PM
     
     

    Not sure if this helps but I shut down the Compute and the strorage instances on the Dev platform and then wait for a few minutes (cache assumed).

    The again maybe running around the parking lot for a few minutes would do as much(g).

     

    Pat NH USA


    Pat Tormey PE MVP Client App Dev
  • Thursday, December 15, 2011 4:30 PM
     
     

    For me it's enough to shut down Compute and wait for a while, but that still takes too long.

    I'm on VisualStudio Ultimate 2010 SP1, Window 7 64b. My previous vSDK version was 1.5, but now I'm on 1.6. I did some memory woodoo found in another post and I haven't been running much today but when I get it the next time I'll check memory consumption and take a dump.

    Edit: Yep now it's back. The process is just 1 GB. I have taken one dump and I'll uninstall / reinstall the SDK and test again.


    Karin, Stockholm
    • Edited by Karin P Friday, December 16, 2011 2:28 PM
    •  
  • Monday, December 19, 2011 7:02 AM
     
     
    Reinstalled everything and doing some tests now... I'll post results here...
    Corrado Cavalli [Microsoft .NET MVP-MCP]
    UGIdotNET - http://www.ugidotnet.org
    Weblog: http://blogs.ugidotnet.org/corrado/
    Twitter: http://twitter.com/corcav
  • Tuesday, December 20, 2011 12:42 PM
     
     

    I also reinsatalled the Azure SDK (only). It worked for a day before I say the error message again. It is not failing all of the time :-)

    I do have dump files but they are 400 MB each and that's a bit too much for SkyDrive so I'm not sure how to make them available.


    Karin, Stockholm
  • Wednesday, December 21, 2011 9:14 AM
     
     

    I haven't seen the out of memory message anymore but sometimes i can deploy to emulator because some project dlls are locked, closing the emulator fixed it but is very boring.

    Other times i have an error stating that a role took to much time to start.

    Really weird since never had any issues with 1.4 :-S


    Corrado Cavalli [Microsoft .NET MVP-MCP]
    UGIdotNET - http://www.ugidotnet.org
    Weblog: http://blogs.ugidotnet.org/corrado/
    Twitter: http://twitter.com/corcav
  • Thursday, December 22, 2011 8:21 PM
     
     
    I am seeing the same problem. On V1.6 with Win7, VS2010SP1. It worked for the first day, and now I have this issue. Very annoying. Please resolve quickly.
  • Tuesday, December 27, 2011 2:03 AM
     
     
    This is a really frustrating issue. Is there any progress on this yet?
  • Thursday, January 05, 2012 4:17 AM
     
     

    I am having this issue as well. As far as I can tell this is from devenv.exe that is throwing the error

  • Friday, January 20, 2012 9:16 PM
     
     

    Allen,

    I am also having this problem.  It occurs when I try to start debugging.  The status bar says, "Deploying Service Packge to the Windows Azure compute emulator..."

    No stack trace or call stack, no exception.  Win 7 64.  Devenv.exe = 907Mb ram.  Happens most frequently when you make a small change and then run, then make a change, then run, etc.  If you shut down and wait a while, then it'll work better.

    This is REALLY annoying.

     

    Robert

  • Monday, January 23, 2012 6:45 PM
     
     

    Same here :(


    Rok Bermež

    • Edited by A_t_AMVP Monday, January 23, 2012 6:45 PM
    •  
  • Tuesday, January 24, 2012 4:42 PM
     
     

    Happens very consistently among my whole team with 1.6.  Stopping the local emulators and pausing has helped us move forward but it's a definite drain on our time (and patience) just to get anything to run.   We have plenty of memory and the process isn't using that much and it's a bug that is very reproducible.

    Anybody else find a workaround?

    Kevin Grossnicklaus

    CAD MVP

  • Tuesday, February 07, 2012 2:53 PM
     
     

    For anyone that is willing, I would love to help troubleshoot this issue.  Can you please create a support case for us to look at this.  That will also give us an easy way to get a dump file to us.  You can create a support case at:

    https://support.microsoft.com/oas/default.aspx?&c1=501&gprid=14928&&st=1&wfxredirect=1&sd=gn

    Hope someone is willing to do that.  It is free.  After you do that and get a case number, send me an email and I will take the case and help you.  My email is tomchris @microsoft.com

    Tom


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Thursday, February 09, 2012 4:25 AM
     
     

    I was consistenlty running into the same issue but only with one particular VS Azure project. Other existing Azure projects or newly created VS project would work fine.

    I reinstalled Azure SDK but not luck. Finally, repairing Visual Studio fixed the problem for me.

    • Proposed As Answer by Martin__J Friday, February 17, 2012 2:44 PM
    • Unproposed As Answer by Martin__J Friday, February 17, 2012 2:44 PM
    •  
  • Thursday, February 16, 2012 3:34 PM
     
     

    Any update on this?  Still seems to be a major issue to us.  We've tried all the recommendations below from reinstalling the SDK to reparing VS2010.  Even set VS as a 64bit process.   Still, we get Invalid Access to Memory Location errors about every other build.

    I can't believe this isn't a major bug for more than just the people in this forum.   My entire team and client's get this error.  Is anyone else using Azure?

  • Sunday, February 19, 2012 12:51 PM
     
     

    I've been getting it too this month, on two machines and three different windows installs.

    To get rid of it I have to close VS, run CCleaner and then reopen, start debugging again.

    It seems to happen roughly every other time I debug so I can't run the debugger much as it just takes too much time.
  • Monday, February 20, 2012 7:29 AM
     
     

    For us it's enough to simply restart the emulator. Still annoying..

    I opened a support case and I'm in contact with Microsoft about this. And hopefully many others too, so we can get rid of this bug soon.

  • Monday, February 20, 2012 10:20 AM
     
     
    Restarting Visual Studio may help sometimes. But can't find any solution to fix this issue.

    Jake Lin

  • Tuesday, February 21, 2012 3:36 AM
     
     
    Seeing it to for node.js project, seems to be happening more frequently now.
  • Tuesday, February 21, 2012 8:08 AM
     
     

    I've also tried all the recommendations. Reinstalling, reparing VS2010. Nothing works. I have to restart VS2010 and I get the error more or less every other run.

    My collegue has the same error but not as frequent as I.


    Karin, Stockholm

  • Tuesday, February 21, 2012 2:52 PM
     
     
    Just started to get the same problems here, VS2010 Win7 64bit latest of everything. Could it be something with addins? I got more than a few of them, recently got nDepend installed but it's not used in the Azure project.

    /Johan

  • Friday, March 09, 2012 4:36 PM
     
     
    I also get this problem 4/5 times when I try to debug my Azure application - impossibly frustrating!
  • Tuesday, March 13, 2012 8:01 AM
     
     
    5 Developers here in a team, all getting this error more often than not. Update is sorely required
  • Tuesday, March 13, 2012 8:57 AM
     
     

    I'm getting it too. Win 7 64bit, quad core, 12Gb ram, 80Gb SSD.

    Error appears and shortly after locks up the machine for 5 minutes. Only way to get machine running properly again is to force task manager up and kill visual studio. Am getting the problem on another machine also.

    Please issue a fix asap!!!

  • Tuesday, March 13, 2012 9:08 AM
     
     

    Raised a support ticket

    https://support.microsoft.com/oas/default.aspx?st=1&as=1&iid=328&iguid=814d1923-0ea5-4844-8847-c09bb37f8fa4_1_1&x=8&y=9&sd=gn&oaspstatus=complete&c1=501&c=SMC&ln=en-gb&incno=112031332812705

  • Tuesday, March 13, 2012 2:16 PM
     
     

    I've seen this problem few times and often i found the root cause to be with some 3rd party software, VS add-ins, etc. For testing purposes, try disabling all Anti Virus softwares, 3rd party softwares , disable VS add-ins and see if the problem can still be reproduced.

    I'm working with pete on this issue and we are unable to reproduce the issue as of now. While discussing with Pete, i've realized that he might have stopped some services,apps that resulted in issue to go away!

  • Monday, March 19, 2012 2:45 AM
     
     
    I can't see that support ticket, but I have posted my workaround that allows me to avoid having to recycle the IDE - http://www.neovolve.com/post/2012/03/19/Workaround-for-Azure-SDK-Invalid-access-to-memory-location-error.aspx
  • Tuesday, May 01, 2012 5:34 PM
     
     

    Also getting this and wasting and lot of time. Any fixes?

    Did anyone find improvements using the devenv.exe  large address aware fix?


    CTO of Hard Medium Soft Ltd. and Independent Developer

  • Wednesday, May 23, 2012 7:16 AM
     
     Proposed Answer

    Hi there. I had the same issue and it was driving me insane... The problem turned out to be the development storage database. It appears that the Azure Emulator uses Sql Express for the storage db and something went horribly wrong with that. If you change the storage db to your normal Sql instance it should clear up the issue....

    Thus go: Start > All Programs > Windows Azure SDK > 'Run as Admin' the Azure Command prompt

    Then command is: DBInit /sqlInstance:<whateveryoursqlinstancenameis>

    If you have default instance use '.' instead of localhost for some reason thus

    DBInit /sqlInstance:.

    Hope this helps you all..

  • Wednesday, May 23, 2012 7:43 AM
     
     Proposed Answer

    What also can happen is that if the debug session ends unexpectantly, like if you stop the application via Visual studio that it leaves a dangling connection to the emulator storage db that screws with the Azure Emulator. In that case runs the following script against the storage DB which will put in a usable stage again. The Azure team must make changes to the emulator to assume that developers will end session expectantly and handle the condition better.... 

    USE master
    GO

    ALTER DATABASE <DevStorageDB>
    SET OFFLINE WITH ROLLBACK IMMEDIATE
    ALTER DATABASE <DevStorageDB>
    SET ONLINE

     
  • Wednesday, May 23, 2012 8:46 AM
     
     Proposed Answer
    Gosh. So even with both the previous strategies it can still happen. In that case clean the azure project and rebuild it. It will do a hard reset of Emulator and get rid of whatever is being locked...
  • Wednesday, May 23, 2012 3:44 PM
     
     

    I tried this and it did not work. I find this error occurs when Visual Studio has been open or running a debug session for a long time. Sometimes just closing VS and the Emulator and starting again clears the problem.


    CTO of Hard Medium Soft Ltd. and Independent Developer

  • Wednesday, May 23, 2012 3:52 PM
     
     

    I tried this and it did not work. I find this error occurs when Visual Studio has been open or running a debug session for a long time. Sometimes just closing VS and the Emulator and starting again clears the problem.

    This is exactly what happens to me. Then I try three or four time and then (maybe) it works.

    It's very frustrating and cause loss of time.


    Fabio Cozzolino
    Microsoft MVP Connected System Developer
    Blogs: http://dotnetside.org/blogs/fabio http://weblogs.asp.net/fabio
    Windows Azure. Programmare per il Cloud Computing - http://bit.ly/l5An4P
    Professional WCF 4 - http://bit.ly/avD3xE

  • Thursday, May 31, 2012 3:12 PM
     
     
    Damn it! Same here! Reinstalled every Azure bit but still get this annoying error! And need to restart VS every time!
  • Friday, July 06, 2012 11:41 AM
     
     

    The bad news. This bug isnt gone with azure tools 1.7 :/

    it just looks a bit different.


    Holger

  • Thursday, August 23, 2012 12:28 PM
     
     

    Just to weigh in - same problem here with SDK 1.7. A fix for this would be very much welcomed MSFT!

  • Thursday, August 23, 2012 3:17 PM
     
     

    With us this bug increased in happening when using ReSharper.

    Do the other people with this problem here use ReSharper?

  • Friday, August 24, 2012 1:59 AM
     
     

    Hi,

    I faced the issue as u did. But the issue what i found was the startup script in the running when u run in emulator. I had a batch file which would download JRE from my blob and install it. during that time i usally get the error "invalid access to memory location" and the emulator itself would hang for a while. 

    When i comment it out and ran again i did't get this error. 

    I hope this is the error you are facing.

    Regards

    Madan

    dmadan.wordpress.com

  • Thursday, August 30, 2012 10:01 AM
     
     
    Yeah, I'm getting this error and am using ReSharper. I  get it both in vs 2010 and 2012
  • Thursday, November 22, 2012 3:55 PM
     
     
    Hi, just Exit from Azure Emulator and debug again. Works for me.