Visual Studio + Qt Addin, PC freeze when building - qt

this is a more unusual question so give me a hint when stack overflow isn't the right place for it. ;)
I have a problem with Visualstion 2012 where it freezes every so often when I compile my project.
I am currently working on a Qt project so the Qt add-in is installed. I am sure you can't remote-fix my problem but I would like to ask what could cause such freezes.
Here are some important infos:
the PC doens't freeze every time I compile (seems to be a bit random)
the freeze takes from 5 to 15 minutes. In most cases, it ends with the screen switching to black and then back to "normal"
I often try to open the task manager which returns an exit code after the freeze which says that the task manager couldn't start
the PC comes back to life after 5-15 minutes but many applications (incl VS) aren't responding for additional ~5 minutes.
the hardware components are fine for what I can tell. (I tested HDD and RAM, temps are fine)
I hope you can give me a hint where the cause of the freezes could be hiding. ;)

You could start by analyzing what is unique about your system.
Perhaps you are using an unusual source control system, anti-virus, network connections, mapped drives or some weird form of integration that nobody else uses. My guess is that this may be your source control integration or some server connection that is triggering an unusual locking condition.

Related

IBM Domino Designer JavaScript editor lags in virtual environment

I have installed Domino Designer in a Windows VM on VirtualBox on OS X.
When I start entering code in the JavaScript editor, Domino starts to work for every letter I type. The hourglass icon appears and the network symbol on the status bar flashes. This operation takes up to several seconds for every letter I type.
If I try to type anything before the hourglass disappears, the keyboard may hang up and the result is a long list of the same letters that I have to delete again (causing the hourglass to appear for each letter I delete again).
I have tried to disable functionality like "Content Assist", "Quick Diff" and other helpful stuff without luck.
I would really appreciate hints or tips to make this nightmare vanish...
I've not used domino designer, but first thought would be that your VM isn't handling the processing required by the designer.
What are the specs on you windows VM? Did you allocate enough RAM, for example? Make sure they match the requirements to run the designer:
http://www-969.ibm.com/software/reports/compatibility/clarity-reports/report/html/softwareReqsForProduct?deliverableId=1351628933716&osPlatform=Windows
Thanks to Joel for leading me into the right path.
I did several things, and together it now seems that I have a much better environment. I still see the hour glass from time to time, but it does not mess up my code anymore, and most of the time it does not bother me.
What I did was the following:
Changed the memory settings for Domino in this file:
[notes dir]\framework\rcp\deploy\jvm.properties
New values:
vmarg.Xmx=-Xmx1024m
vmarg.Xms=-Xms512m
vmarg.Xmca=-Xmca512k
Then I changed the virtual memory of my guest Windows install to a fixed swap file of 4096 MB.
At least I connected my Mac to a faster network using Thunderbolt to Ethernet cable adapter. I don't think the last thing did any difference, but at least I now have a faster and more reliable network connection.

Visual Studio 2015 download getting stuck at applying Microsoft ASP.net

I'm currently on my third attempt trying to install Visual Studio 2015 on this computer. I have tried rebooting, hard shut downs, canceling setup and restarting, etc. Each time, it gets stuck at applying Microsoft ASP.net. I have tried leaving it overnight (12 hours). My download speed is 50-60 MBPS according to Ookla Speedtest. I am running Windows 10. I did do a "custom" installation and added C++, Python, and the Git extension. If I am not mistaken it said 7 GB size. Why is it doing this? Please help!
I don't understand why this isn't working because I installed VS 2015 for my laptop (a different computer) just a few days ago on a relatives WIFI and their speed was 3-7 MBPS.
(Note: The installer is not technically frozen since the loading dots on the bottom are moving.) However, bar hasn't filled up at all for like 6 hours.
EDIT:
Do I need ASP.NET (for C#, Python, and maybe C++)? Can I uncheck certain features for installation so that it wont try to install this? Also, when I cancel installation it never cancels and just stays there so I have to kill the installer with the task manager. This is getting incredibly frustrating.
Fixed it...
Easiest way is "threaten" to shut down the computer. Go into Power, restart system. You will be warned that there is a logging program which will not let the system reset. Cancel that program and then do NOT restart.
Installer immediately went on to next part and finished install after having been stuck for 6 hours...
I got it to work, it wasn't perfect, but here is what I did: It was getting stuck at very certain points, most notably ASP.NET. I did a little research and got an idea from something I read (I unfourtunetly can't find the source again). Sometimes windows opens invisible "confirm" type windows or installer windows that get stuck. When the installer got stuck I opened up task manager -> details, than checked On the visual studio process by right clicking then clicking analyzing wait chain. This showed me what process the VS install was waiting for. Then, I'd just kill the process. Messy, I know, but better then nothing. I had to do that 2 or 3 times. Afterward it said it installed correctly with 2 components that had warnings. ASP.NET was included. But everything else worked fine (c#, C++) Later I went back and did a repair. That worked pretty smooth. Finally, I installed the Python Tools successfully. (that part is sort of irrelevant but the point was that everything is now working fine).
edit, found another source: Visual Studio 2015 Community Edition Installation Stuck In Windows 10
Yes i had this problem too. To solve this open task manager and go to details tab then search for TiWorker.exe, right click on it and choose analyzing wait chain it will display many instances of the process that are in waiting mode , check all those processes and terminate them after doing this the installer will go to the next step.
To avoid this problem, you have to install IIS first.
Go to Control Panel -> Programs -> Turn Windows features on or off -> Select "Internet Information Services" -> OK
I had this problem a couple of hours before writing this answer and what worked for me was:
I opened other programs at least two or three and went to power and clicked on restart as usual it will warn you about open programs that need too be closed before shutdown or programs that are currently active I then clicked on force close and it closed the first program that I recently opened then I quickly clicked on cancel. Two minutes later instalation was back on track
Press Ctrl+Shift+Esc, then go to Tiworker.exe and terminate all the waiting processes.
I found a solution to this headache of a process to install Visual Studio. If you have tried everything and nothing seams to be working for you even by trying the command line shell then try this.
Go open task manager while running the installer and kill wusa.exe. It will kill the process to search for the update and continue the installation. You may have to kill some other processes as well if they get stuck. Its not great but it seams to be working.
wusa.exe seams to be the task that is the problem that prevents the installer from moving to the next step. This could be because your computer can not reach the update server.
This seams to be the case for both the Community and Enterprise Version of Visual Studio.

How to determine cause of DirectX 11 driver hang

I am working on a QT application for which I've integrated DirectX 11 into a custom widget. The application renders a scrolling display - a graphical representation of data being read from a file. The user can speed up and slow down the scrolling speed.
For the most part, this is working great. The DirectX 11 rendering is presented to my custom widget just as I'd expect. The problem is that the graphics driver randomly hangs and crashes my program. I say "random" because I have been testing this with the same data file and it never seems to crash at the same point in the file, after a specific amount of time, or at a specific scrolling speed (the faster the scrolling speed, the more work being done by the GPU per frame).
When the application hangs, my screen freezes for a moment, goes black, then returns with a nice message from NVidia that it has recovered from a driver crash. The Debug Output in Visual Studio contains the following:
D3D11: Removing Device.
D3D11 ERROR: ID3D11Device::RemoveDevice:
Device removal has been triggered for the following reason
(DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of
time to execute its commands, or the hardware crashed/hung. As a
result, the TDR (Timeout Detection and Recovery) mechanism has been
triggered. The current Device Context was executing commands when the
hang occurred. The application may want to respawn and fallback to
less aggressive use of the display hardware). [ EXECUTION ERROR #378:
DEVICE_REMOVAL_PROCESS_AT_FAULT]
I have discovered that by simply commenting out the IDXGISwapChain1::Present call, the application will run through the file at blazing speed. Graphics-wise it is still pushing data to the GPU and drawing to render targets, it just never gets displayed to my window.
What I'm hoping for is help with ideas of what types of things cause driver hangs. My shaders are incredibly simple - basically just positioning my vertices using a projection matrix. And considering what I described in the above paragraph, shaders should still be cranking through vertices and pixels even when Present isn't being called, yes?
I was suspicious that this could be a compatibility issue with Qt - I know DirectX isn't officially supported by Qt. So I tried creating a separate window using CreateWindowEx and using that for my swap chain instead of the custom Qt widget. It rendered to that window but also hung the driver just like before.
I was also suspicious of a driver bug in my laptop, so I tried running the application on a beefier desktop PC that regularly runs another DirectX 11 application (non-Qt) without a hitch (worth mentioning that this other application renders similar data in a scrolling display as well, using shaders that are a lot more complex). But my QT application hangs the driver on that PC as well.
Anyone know of a way I can get a more detailed description of what is causing the driver to hang?
Thank you in advance for any help you can offer.
UPDATE: 2013-08-01 17:16 CST
I am currently investigating a possible thread syncing issue that may be the culprit. Will continue tomorrow morning and post if I solve this on my own.
After some testing today, it appears to have been a threading issue. I have run several times today with no graphics crash. So my problem must be fixed, unless I've just been getting lucky with my tests today (or unlucky, rather - if this shows its ugly face again in a day or two).
I was aware that the immediate device context is not thread safe. Rather than using deferred contexts, though, I was using critical sections to sync my threads and coordinate use of the device context. What I did not realize is that it is not safe to call IDXGISwapChain1::Present while another thread is using the device context. Makes sense, but since it is not call directly from the device context itself, I overlooked it. I literally moved my Present() call a few lines up into my critical section block, and it hasn't given me a crash since.

Qt IDE c/c++Debugger mode is Very Slow?

I'm using the Qt for developing the c/c++ application,while i try to debug the app with static library it is very slow and takes much time step over (r) in..
can any one suggest me to make the debugger fast as like vs2008..
regards
VS
It is likely you are having this behaviour because the debugger retrieves required debug info for system libraries from the internet each time - or it doesn't find the requested info at all. If so, it will display something like that in the Debugging Window.
Follow these steps to set up a symbol cache which will allow caching debug symbols:
http://doc.qt.io/qtcreator/creator-debugger-engines.html#setting-cdb-paths-on-windows
This might still make it slow for the next time you debug, but it should get quite fast from the second time on.
If you do not have internet access though, you will need to manually download these symbols from here:
http://msdn.microsoft.com/en-us/windows/hardware/gg463028.aspx
and place them in the symbol cache folder you specified.
it has nothing to do with windows and debug symbols server
this is happening when libqt has debug symbols and it happens even (directly) in gdb/cgdb!
it has to do with dwarf (still looking into this one)
regressed on windows (8), ubuntu (13.04), fedora (19-rc) & mac (10.8.5 & 10.9) -> obviously has little to do with os or library

windbg cant load sos clr

I'm not sure that windbg is the right tool, but that's what I'm trying now
my asp.net app seems to have a memory leak, it keeps on growing by about 3 MB almost every time a page loads (then it goes back down...)
I want to read the entire process memory and see exactly whats being stored that is unnecessary.
So I run windbg, attach to the webserver40.exe process
then I try
.loadby sos clr
and I get
The call to LoadLibrary(C:\Windows\Microsoft.NET\Framework\v4.0.30319\sos) failed, Win32 error 0n193
"%1 is not a valid Win32 application."
Please check your debugger configuration and/or network access.
It seems that I have this sos.dll in Framework AND Framework64
I tried both using
.load C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos
but nothing loads
I don't understand why its looking for a vaild 32bit app. im on a 64bit pc with 64bit windows.
How can I get this sos thing to load?
Also when I start I get this warning
WARNING: Process 7240 is not attached as a debuggee
The process can be examined but debug events will not be received
I also tried loadby sos mscorwks it didn't work, but I understand that was discontinued. I'm in asp.net 4
I also read somewhere that the code should be stopped in debug before loading sos, that just hangs VS 2010.
Thank you very much.
Again, if there's another tool that could better help me, I'm all ears :-)
WebDev.WebServer40.exe is a 32 bit executable. To debug that you need to use 32 bit WinDbg. Visual Studio, as well as Callipso server are still executing in 32 bit mode.
For your other question. Yes, WinDbg is a great tool to investigate memory leaks in managed code. This blog will get you started. However in your case I would not be so sure you have a memory leak.
You are saying that memory goes down eventually. This means it is not a memory leak, because a leaked memory never gets released.
Do not waste your time investigate memory problems in Callipso. There are a lot of differences between IIS and Callipso that would make your findings not applicable in production environment. Even if you find that Callipso is in fact leaking does not mean that IIS would be.

Resources