LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I resolve the following errors: window.cpp(2397) : DWarn: window's color depth (0) is bad, image.cpp(13176) : DWarn: GetDC failed in ISetGPort, drawmgr.cpp(2937) : DAbort: no HDC?

Have application that locks up periodically. when it does offer some clues to the lock up, the above are given. Other times it locks up tight and only power switch can release (no response to ctrl-alt-del).

Any ideas in which direction these errors point?

window.cpp(2397) : DWarn: window's color depth (0) is bad
image.cpp(13176) : DWarn: GetDC failed in ISetGPort
drawmgr.cpp(2937) : DAbort: no HDC?
0 Kudos
Message 1 of 7
(3,751 Views)
Error seems to be pointing out that there is no device context.

This link seems to be the function.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_4esj.asp

This link talks about color depth.
http://www.astropix.com/HTML/J_DIGIT/MON_RES.HTM

window.cpp(2397) : DWarn: window's color depth (0) is bad

So some application wants to draw to a window. But maybe that window does not exist? Maybe it has been destroyed(exit out)? Does your application have graphics? The color depth might be needed to determined how many colors your graphic application can use. However, DC is a window terminology.

I would try to figure out what your application is trying to do and then make sure the eviroment is there for it. Maybe update your graphics card driver?

Post your system specs. Like your hardware config, type of graphics card, OS, etc.
0 Kudos
Message 2 of 7
(3,742 Views)
Hardware Config:
HP d530 desktop
Pentium 4 2.8GHz
504mB RAM
Windows XP SP1
Intel 82865G Graphics Controller with 64MB RAM
0 Kudos
Message 3 of 7
(3,728 Views)
Communication is to local serial port (COM1)

Labview is version 7.1
0 Kudos
Message 4 of 7
(3,727 Views)
Is there something in the LABView programming environment that I could have mis-coded or mis-connected that would cause the above errors to occur, or is this something burried in the labview compiler?
0 Kudos
Message 5 of 7
(3,723 Views)
What is your program doing? What kind of application is it? What vi libraries are you using? Are you using any DLLs? What is your color resolution set to 32 bit? Did you try upgrading the drivers to your motherboard, or graphics cards?

Again, I can't tell you the exact problem. But maybe you can get some ideas where to look. That error sounds like a system problem. Your system specs look pretty good too. So try to check your system config. Check the alert logs. Is there anything there that can tell you a bit more?
0 Kudos
Message 6 of 7
(3,706 Views)
Also;

run: dxdiag

Look through there and check the version number see if that
reports any errors.

If you have an old version, try upgrading it.

You could monitor your GDI objects by using the task
manager. Go under view, select columns, and pick GDI objects.

If you see a lot of GDI objects(like 10,000 or more) then,
there is a problem with memory.

Just more stuff to try.
0 Kudos
Message 7 of 7
(3,701 Views)