Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16606 Discussions

Refresh Problems Opening Several Schematics

Altera_Forum
Honored Contributor II
1,374 Views

Has anyone experienced this problem or found a fix for it ? 

 

Using Quartus II Web Edition ( any version from 5 to 7, I've always had this problem ): 

 

If several schematics are opened in Quartus ( could be as few as 3 ), any attempt to open any new dialogs, schematics, etc. will not refresh ( draw ) properly - usually only drawing the new tab for that window and it's frame, but the page or dialog box never fills in ( looks transparent ). Windows will also have problems drawing graphics, for example the "Start" button will not open, or Windows Explorer will not draw completely, or other programs will crash with "Can't Draw Object" errors etc. 

 

This is definitely related to graphic resources, not a Quartus bug, but I still can't find a fix. I am running Windows XP, with dual 1600x1200dpi monitors on a PC with dual-core 2.4GHz processor and 2GB of RAM. 

 

I have tried 5 different video cards, including ATI and Matrox cards ranging from 128MB to 512MB with no change, so it is not video memory or drivers. I also have 3 different computers from different manuefactures with similar setups ( dual hi-res monitors, XP, 256MB+ video cards ) that choke with Quartus open. Rebooting doesn't help. I have rebuilt my systems several times over the years ( Format C:\ ) and have always had this problem, even with only Quartus and one two other minor programs installed on a fresh Windows re-build. 

 

The only things that help this problem are: 

 

- Using only a single monitor 

- Reducing the resolution on one or both monitors 

- Reducing the color depth ( 16-bit vs true color ) 

 

With Quartus closed, I can open countless programs without problems including numerous graphic editors, schematics, PCB layout designs, web pages, and other graphic intensive programs. Once I open Quartus, I start having problems all over Windows if multiple *.bdf or *.bsf files are open. 

 

There must be some Windows graphic resource that Quartus is hording that is NOT related to video memory. Maybe limitations on GDI resources that I am not familiar with ( number of handles, number of device contexts, physical drawing space ? ) 

 

Being a Hardware / PLD / Embedded Firmware / Windows Software developer, this is insanely frustrating, since I am often opening and working with PCB Layout, Schematics, PLD Logic, embedded code, and Windows software development all at the same time.  

 

Everything is fine until Quartus starts. I have talked with Altera, ATI and Matrox. No one knows what the problem is. 

 

Any ideas ? 

 

Thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
646 Views

I am seeing something very similar to this. Did you have any luck figuring out how to get around this problem? 

 

Sean.....
0 Kudos
Altera_Forum
Honored Contributor II
646 Views

Yes – after significant research, I figured out what was happening: 

 

The problem was related to the "Desktop Heap", which is a little known aspect of Windows that coordinates the resources for all of the menus, hooks, strings, windows, fonts, and printer data that is related to the desktop ( all visible applications ).  

 

Windows allocates a relatively small fixed amount of memory to coordinate all graphical references and handles for the desktop. It doesn't matter how much system or video memory the PC has, if one or more applications consume all of the available desktop heap memory, then Windows cannot instantiate any more graphical objects. This can be due to a number of applications that are each consuming large amounts of desktop heap memory, or to a single program that has a desktop heap resource memory leak ( never releasing resources ). 

 

The available desktop heap memory cannot be viewed in any native system resource monitoring utilities, including the Task Manager. In fact, my understanding is that is not possible to ask Windows directly for the desktop heap memory status, through API calls or otherwise.  

 

Microsoft created a single tool that can show the status of the desktop heap, called the “Desktop Heap Monitor”, currently version 8.1. This utility actually installs a kernel mode driver that gives Windows the ability to report on the heap status. It is a DOS utility that I personally couldn’t get to work. 

 

The solution is to change a registry setting that increases the size of the desktop heap, which will slow down Windows some, but at least the programs will keep running. After increasing the heap size, my new quad core PC is a little more sluggish, but I haven’t seen the problem since, and now I can be really abusive and open as many programs or Quartus schematics as I want, without a problem.  

 

The Windows XP registry path is: 

 

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ SubSystems 

 

The “Windows” key has a very large string in it, that looks something like this: 

 

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16 

 

The setting “SharedSection=1024,3072,512” is what designates the size of the desktop heap. I changed mine to “SharedSection=1024,4096,512”, and that solved my problems. 

 

Information on the problem and solution can be found here: 

 

http://www.techarp.com/showarticle.aspx?artno=238&pgno=0 

 

or here: 

 

http://www.w-tweaks.com/html/xp-desktop-heap-tuning.html 

 

or search for “Desktop Heap” in Google. 

 

The Desktop Heap Monitor utility is here: 

 

http://www.microsoft.com/downloads/details.aspx?familyid=5cfc9b74-97aa-4510-b4b9-b2dc98c8ed8b&displaylang=en 

 

I hope that helps. This has been a major headache for me for a long time. I’m glad there was a fix, even if it was totally unobvious.
0 Kudos
Altera_Forum
Honored Contributor II
646 Views

Thank you for the update, it didn't solve the problem I was seeing but did point to the problem. The heap was the tip, there is a /3Gb switch you can pu tin the boot.ini to unlease >2G in windows for Quartus to utilize installed memory. This switch was causign the heap problem. 

 

thanks for the help! 

 

Sean....
0 Kudos
Reply