Intel Visual Fortran Compiler Freezes During Compilation - visual-studio

When I try to build my Intel Visual Fortran Project (Intel Parallel Studio XE 2015 [15.0.1.148] and Visual Studio 2012) my build process hangs on one specific file and will not finish compilation and yields no errors messages.
Yesterday was the first time I encountered this problem, and it was easily fixed, by manually ending the build process in visual studio and then end fortcom.exe process from task manager. I then tried to build again and it completed. Today, it happened again only I've tried multiple times to do what worked before to no avail. I've also restarted Visual Studio and tried again, and restarted the computer and tried again.
There have been no project or solution setting changes I'm aware of recently, and I've checked back through, but I can find no problem. I've also tried commenting out the newest code I've added, but have gotten no change.
I can't post the project in question as it is proprietary. I understand it is not likely someone could tell me what the issue is from this, but I'm hoping someone can direct me into how to find the issue because I don't know what else to look at.

The answer to my problem ended up being unsatisfactory. I commented out a lot of code in the offending file and then slowly uncomment it. Sometimes I would uncomment out too much and it would freeze during compilation again. Eventually when I thought I was narrowing down to the problem line, but eventually there were no lines left and no problems and it built properly.
If anyone has any ideas as to what might be the underlying issue, I'll still give that credit for the answer.

Related

Visual Studio - how to reverse optimized code

I need some help. I have put in dozens of hours into a VB.NET project, it has been built in release mode and distributed. Now I have to make some changes to it, and I am unable to debug it properly. My code changes result in behavior where my code is not even recognized.
Also, I installed Visual Studio 2013 recently (moving from 2010), but this project behaves the same in both environments.
I believe that my code has become 'optimized'. The error window tells me that code is being skipped over, and that my code is optimized and JIT is checked.
I have turned off JIT, and I have tried everything to make this project work again that I could think of. I am desperately wanting to know how I can get this project to be in a state where it will debug each line of code again when I make changes.
I can even purposely write bad code, and the debugger does not see it.
This project is now in debug mode, not release. I have checked and followed threads on every thing that other people have done to solve this issue, but nothing works for me.
Either my project launches and works properly as it is coded, or if I change any code only the form launches with no code being run - at all.
please help.
I finally figured it out. The applications that I was struggling with were all built in Visual Studio 2010 on Windows 10. I was trying to work with these in Visual Studio 2013 on Windows 7.
Once I tried to work with them on Windows 10 (visual Studio 2013 this time), they started working and debugging just fine.
I think it may have been DLL assembly paths? Took me more than a week, but I figured out my issue by moving from Win7x64 to Win10x64.

Potential Visual Studio Issue: Can't resolve symbol but works fine?

I feel like either this is an issue in Visual Studio or I'm crazy.
Ingredients
I'm using:
Visual Studio Professional 2012 (11.0.61030.00) Update 4
ReSharper 7
xUnit for tests
FluentAssertions in my test code.
The Issue
Just recently, resharper showed me an issue:
I navigated to the file, and sure enough, there seemed to be the issue in the code.
But I'm referencing FluentAssertions:
And if I clean and rebuild the entire solution, I get no errors:
And all of the tests even run correctly:
Questions
Why would this just start showing up after installing Visual Studio Update 4?
What can I do to make it go away?
Is there actually a problem with something, or if tests & code run fine and no errors appear, is it not an issue at all?
First time I've seen anything like this so I'd appreciate any insight.
This could be for several reasons, such as NuGet package restore - if the packages (and therefore the assemblies) weren't there when the solution was opened, ReSharper will mark them as undefined. It's usually pretty good at noticing and reindexing when the assemblies are added, but perhaps it missed them here. Sometimes opening the file again will cause the errors to be reindexed, sometimes it requires the solution to be closed and reopened.
Alternatively, and what is probably the most likely way to fix, is to go to ReSharper -> Options -> General and click Clear Caches. ReSharper will rebuild the solution cache, and should reindex everything and get rid of the errors.
In this case, the solution appears to be the old "Restart the PC" trick.
If anyone knows how an issue such as this could be resolved without restarting the PC, I'm happy to award you the answer.
Check you don't have any old missing references, just noticed on my solution the same issue removing old missing references did the trick for me.

Visual Studio project execution stopped shortly after starting

Yesterday I wanted to continue working on a project of mine, so I started Visual Studio and asked it to run the project to remind myself, what was already implemented and what wasn't.
The project got built and started, but seemed to quit right away. No error message, nothing.
No matter what I did, whether I rebuilt the project or cleaned it, nothing changed.
This didn't make sense, since the last time I tested the project, it worked perfectly (and I didn't modify anything in the code since then)
So, I assumed I had a hidden bug somewhere in the code, that just didn't show up previously.
I put a Breakpoint somewhere near the beginning of the code, and ran the project.
As expected, Visual Studio paused the execution at the Breakpoint and highlighted it.
I decided to set another Breakpoint somewhere later in the code and continue execution, but before I could even move my mouse, the project stopped.
Restarting Visual Studio didn't help, but restarting the PC did. Therefore, I'm assuming that something on my system was terminating my project, shortly after execution begun.
Now my question is: What exactly happened, and especially: why did it happen?
The problem came back while I was writing this question. I don't feel like restarting my PC every couple of hours...
I really appreciate the time you took reading this and I look forward to your answers.
I'm aware that I'm answering my own question, but since I've solved it myself, I thought others might want to know how I did it (for the sake of future generations)
The thing is: I've recently added Visual C++ to Visual C# before Visual C# started having problems.
So I deduced, that maybe the installer for Visual Studio messed up with something and decided to reinstall Visual Studio.
Problem solved.
So: if your projects stop without warning even while paused on a Breakpoint and you've changed something in your Visual Studio installation (like added Visual C++ in my case), you might need to reinstall the whole thing.
Luckily, the Visual Studio installer offers a "Reinstall" option, so you don't need to uninstall and reinstall manually.
I found about this solution, after talking to a more experienced colleague. I just wish I asked him first. Still appreciate your efforts in the matter, though.
EDIT:
I recently noticed a similar bug acting up for C++ programs this time, where the window border would be outlined in red. The thing is: it's not Visual Studio's fault, but in fact Avast Antivirus' fault. More specifically, its Sandbox mode.
So, if for any reason, you notice programs quitting without crashing, shortly after starting and their window border having a red outline, you're very likely using Avast Antivirus and should deactivate the Sandbox mode.
Happens to me from time to time.
Sometimes closing and opening VS helps, sometimes you have to restart the computer.
I assume it must be related to some DLL or something that is loaded into memory and corrupt, or something like VS loosing the reference to it, and not unloading it correctly/replacing it.
I also once had this strange bug, where I started VS, just like any other day, and my project crashes instantly with some H_RESULT error (some DLL related Error) upon run. After having spent around 1hour searching for the source of the problem, I went into the reference section, and what did I see there : the worst possible circular reference ever : my business project had a reference to ... itself ! The kind of stuff you could not do if you wanted to.
The weirdest part of this, must of been that VS managed to compile the project, and it only crashed while trying to run it ...

Visual Studio 2010 debugger skipping

Occasionally during debugging the debugger skips forward randomly. Sometimes I Step into a function inside of another function and instead of going to the next line it skips through to a seemly random place in the future. sometimes to a line partway through another function.
It always seems to respect breakpoints though, i.e. if a breakpoint is set in the future it never will skip past it.
I'm running 64 bit Win 7 and visual studio 2010 ultimate. I'm not using threads. This never happened for me in visual studio 2008. How can I fix this?
Do you have optimizations turned on? If the program is highly optimized, the order of execution can be thrown off, and things can be expanded or rearranged in ways that are not always clear.
I'm running into similar problems debugging a C# program with Visual Studio 2010 on an XP machine. The debugger just randomly skips to some other line or the next break point.
It seems that Microsoft has released a Fix for this in the SP1.
Are you sure that the assembly your code calls has debug symbols? You maybe referencing a dll that was compiled in release mode.
This can happen when the debugger is running against pdb files that don't match the source code you are looking at. Make sure the bin (or where you are running from) is up to date and was built from the same source code you are running in the debugger.
Are you using threads or background workers? When debugging I believe that all threads are paused so it could be switching between them. Otherwise you may have out of date debugging information, Delete your bin and obj directories and do a clean build.
This can also happen when your Debug solution configuration is up to date, but you try to debug the program in Release configuration (if that is not also up-to-date)... or vice versa.
You can switch back and forth between running in Debug or Release configuration using the drop-down next to the green 'play' arrow at the top of the screen.
I had a similar problem in Visual C++ 2008 on Windows 7 32-bit recently. Several minutes before the problem first appeared, a system dialog window “VC.exe encountered a problem and needs to quit” was displayed but the Visual C++ window seemed to survive.
After the problem first appeared, I tried several ways to getting it back to work like rebuilding the solution or restarting Visual Studio. However, it continued to behave strange: It failed to link with an object file I hadn’t touched for weeks, displayed “The breakpoint will not currently be hit. The source code is different from the original version.” etc.
Nothing helped until I rebooted the computer and finally rebuilt the solution (twice, actually).
Click Rebuild Solution.

Visual Studio 2005 macros won't run

I'm trying to run the Visual Studio 2005 sample macro that attaches the debugger to calc.exe. Neither it nor any other macro seem to do anything when I run them. Calc.exe is running. "Tools->Options->Add-in/Macros Security->Allow macros to run" is checked. The error list shows no errors.
I had this same problem just happen to me. Macros in VS2005 were working fine, and then suddenly stopped one day. I checked permissions, that macros were enabled, etc. I ran the VS2005 setup program and repaired my installation, and none of this fixed it. Finally I uninstalled all the Windows updates that came in the last update cycle. This fixed the problem for me. I uninstalled a bunch at once, so I don't know exactly which update caused the problem, but I know it was at least one of these:
KB2916036
KB2912390
KB2911501
KB2909921
KB2909210
KB2901112
KB2898857
KB2862973
KB2843630
as I uninstalled all of these, and then the macros started working again. All of these Windows updates happened for me on Feb 13, 2014.
Hope this helps someone else.
Mark
P.S. I later discovered it was KB2898857 and you can leave it installed if you edit a few config files, as described here:
http://visualstudioextensions.vlasovstudio.com/2014/02/13/visual-studio-2010-macros-stop-working-after-february-2014-windows-update/#Update
Sounds like your Visual Studio 2005 instance is flaky, or that your Visual Studio 2005 installation is broken. If restarting VS2005 doesn't help, run the VS2005 setup and choose repair. Hope this helps.
Regards,
Sebastiaan
I had this problem too (but in Visual studio 2010).
After multiple attempts to fix it. I discovered it was a stupid problem.
I had another macro in another module that didn't compile (I had semi-colons at the end of lines).
Even though I was running a macro in a different module it didn't seam to matter.
If you are having this problem an easy thing you can check is looking in the error list for any errors in your code. It's very easy to put semi-colons at the end of your lines out of habit.

Resources