"failed to register the window class"

Questions and Answers : Windows : "failed to register the window class"
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile Richard Babylon

Send message
Joined: 20 Dec 99
Posts: 7
Credit: 842,661
RAC: 0
United States
Message 1064586 - Posted: 8 Jan 2011, 7:18:06 UTC

Hi everyone,

This may be the first question I've posted in my eleven years with SETI@home.

I'm running BOINC on a Windows 7 machine with 12 GB of RAM and a 6-core Intel processor. The NVIDIA graphics card is CUDA compliant. In BOINC Manager under Activity, I've selected Run Always and Use GPU Always. (I can provide my other settings if needed.)

To my delight, the system usually seems perfectly able to handle these settings; I'm able to watch TV, do malware scans and use my browser while typically running 13 tasks at a time (SETI, Rosetta, & Einstein). But for the last several weeks I've been getting a strange message... a small box in mid-screen that's likely to appear if I've been away from the computer for more than a few hours, and which says simply, "failed to register the window class."

When I slide the mouse to click OK, it vanishes before I can even click it (only to come back after I've walked away again). But after I've seen it, many programs fail to work, including Windows Live Mail, Paint, my TV application and more. I have to reboot to get normal functioning back. IE and Firefox seem unaffected.

I suspect, but am not sure, the problem is caused by SETI@home because I've seen some strange behavior on the screen when the SETI screensaver is running... another message that blinks on and off repeatedly and too quickly to read, but which appears to say, "too many errors have occurred..." If memory serves, it alternates (very rapidly) with the screensaver, as if they're fighting for dominance.

Another clue: it all seems to have started around the time I attached BOINC to SETI. (I'd already been attached to Rosetta and Einstein, and don't recall this issue then.)

Could I be right about SETI causing this strange message? And what can I do about it? It's become an almost-daily routine.

Thanks so much.
ID: 1064586 · Report as offensive
Profile Jim-R.
Volunteer tester
Avatar

Send message
Joined: 7 Feb 06
Posts: 1494
Credit: 194,148
RAC: 0
United States
Message 1064591 - Posted: 8 Jan 2011, 7:29:13 UTC - in response to Message 1064586.  

It sounds like you might be having a problem with the screensaver. I just got back on after a year or so of absense so I'm "new" at running the current apps, but I recall a problem with an earlier app when using the graphics as a screensaver. Try turning off the screensaver and see if your problem goes away. In that case if you are not already running an optimizized app you might try running one without the graphics. (If they still have them compiled without the graphics. Haven't checked to find out since I've been back online.) This would solve your problem and let you crunch more at the same time.

Maybe one of the developers will come by in a little while and have more of a clue what your problem might be.
Jim

Some people plan their life out and look back at the wealth they've had.
Others live life day by day and look back at the wealth of experiences and enjoyment they've had.
ID: 1064591 · Report as offensive
Profile Richard Babylon

Send message
Joined: 20 Dec 99
Posts: 7
Credit: 842,661
RAC: 0
United States
Message 1064600 - Posted: 8 Jan 2011, 8:45:48 UTC - in response to Message 1064591.  

Thanks Jim,

You know, that hadn't occurred to me, even though I had disabled the screensaver on at least one previous computer. I've taken your advice and have disabled BOINC as a screensaver -- opting for "Ribbons" instead. :-) Like you, I seem to recall a screensaver issue with an earlier version of BOINC, or even the original S@home application.

Time will tell if that solves my problem, and I'm still eager to learn more, so more input is welcome.

I also thought about suspending SETI for a while, but for whatever reason haven't gotten around to trying that. I guess I'm hesitant to stop processing data for the length of time it might take to be sure I'd found the cause (two or three days, I figure, to be certain). Probably a lame reason... but anyway I like your idea better.

Oh, and what is an "optimized" app?
ID: 1064600 · Report as offensive
Profile Jord
Volunteer tester
Avatar

Send message
Joined: 9 Jun 99
Posts: 15184
Credit: 4,362,181
RAC: 3
Netherlands
Message 1064608 - Posted: 8 Jan 2011, 10:03:20 UTC - in response to Message 1064586.  

The error you see is not a BOINC or Seti error, but a Windows (MFC or Microsoft Foundation Class Library) error.

From How to create a window?
A Window class holds the information about the type of window. This class needs to be registered with a particular set of attributes such as icon, background colors etc which are defined in WNDCLASSEX struct. The window class also holds a pointer to the Procedure(or function) which controls the behaviour of the windows. Once registered , any number of windows can be created with the same attribs without specifying the same all over again.

The RegisterClassEx(WNDCLASSEX&) function which takes the address of a window class struct , attempts to register it and returns a non-zero value if it is able to do so. Else it returns 0.

           MessageBox(NULL , "Failed to register window class" ,
                        "Error" , MB_ICONEXCLAMATION | MB_OK );

If the registration fails , A message is displayed using the MessageBox function. After running the program you'll understand how the MessageBox(...) works so it doesn't need much explanation.

Something is trying to create a window and not being able to. Perhaps due to bad parameters, or due to your system being out of memory. Yes, even with 12 GB of RAM your system can be out of memory. Check in the System Resource Monitor (Windows Task Manager->Performance->Resource Monitor...->Memory) during such a run whether you actually have memory left over.

Whatever it is that cannot create a window, it should register its error in the Windows Event Viewer. So check there for whatever errors and faults there are (Start->Administrative Tools->Event Viewer->Windows Logs->System and Application logs. Anything with a yellow or red marker.
ID: 1064608 · Report as offensive
Profile Richard Babylon

Send message
Joined: 20 Dec 99
Posts: 7
Credit: 842,661
RAC: 0
United States
Message 1064683 - Posted: 8 Jan 2011, 17:28:11 UTC - in response to Message 1064608.  

Thanks Ageless, that certainly sounds applicable. I had searched that error phrase on Google but wasn't able to find anything as useful as the info you sent.

Right now (as I'm again running 13 tasks) there's about 6300 MB of available RAM. But I'll check it from time to time, especially after the error appears, if I can... I think even Ctrl-Alt-Del once failed to respond at that point.

Haven't yet checked any system logs. Oh, and yeah, I'm under no illusion that even 12 GB of memory can never run out -- especially the way I multitask! :-)

I also noticed that Einstein, not SETI, is using my GPU right now. It's quite possible that this happens only when SETI is using the GPU.

Anyway, several hours have passed (overnight) without incident, so I'm hopeful that the change of screensaver took care of it. Still watching and waiting...
ID: 1064683 · Report as offensive
OzzFan Crowdfunding Project Donor*Special Project $75 donorSpecial Project $250 donor
Volunteer tester
Avatar

Send message
Joined: 9 Apr 02
Posts: 15691
Credit: 84,761,841
RAC: 28
United States
Message 1064805 - Posted: 8 Jan 2011, 23:55:34 UTC

I think the bigger issue here is that you were running the SETI screen saver while running CUDA, which uses your GPU to run intense calculations.

I'd be willing to bet that Jord's answer ties in with the graphics subsystem not being able to create graphical windows due to these intense calculations only when the screen saver kicks in, thus causing the rest of the system to malfunction afterward.

The answer, of course, as Jim-R. stated, is to not use the SETI screen saver since it conflicts with CUDA processing.
ID: 1064805 · Report as offensive
Profile Richard Babylon

Send message
Joined: 20 Dec 99
Posts: 7
Credit: 842,661
RAC: 0
United States
Message 1064989 - Posted: 9 Jan 2011, 17:35:15 UTC - in response to Message 1064805.  

$o |>0/|/3, how many people address you by your "name"? :-P

I agree, but apparently didn't say it, that the issue seems to be CUDA vs. SETI (to oversimplify for brevity). Interestingly though, I don't recall seeing this issue when Einstein uses CUDA. Maybe just because it's a less complex graphics job (or so it seems to me).

Unfortunately I haven't been able to further test with the BOINC screensaver disabled, because it's been very windy around here lately and I'm afraid to leave the computer on when I'm away for long periods -- too often the power goes out, and I have no UPS. When the weather returns to normal (or when I get a battery backup) I'll be back to running 24/7 and can see if my change removed the problem.

Thanks[/i]
ID: 1064989 · Report as offensive
Profile skildude
Avatar

Send message
Joined: 4 Oct 00
Posts: 9541
Credit: 50,759,529
RAC: 60
Yemen
Message 1065026 - Posted: 9 Jan 2011, 19:23:58 UTC - in response to Message 1064989.  

most of us know he's Ozzfan. He's changed his name to protect the children of Gotham city


In a rich man's house there is no place to spit but his face.
Diogenes Of Sinope
ID: 1065026 · Report as offensive
Profile Jord
Volunteer tester
Avatar

Send message
Joined: 9 Jun 99
Posts: 15184
Credit: 4,362,181
RAC: 3
Netherlands
Message 1065038 - Posted: 9 Jan 2011, 20:11:48 UTC - in response to Message 1064989.  

Interestingly though, I don't recall seeing this issue when Einstein uses CUDA. Maybe just because it's a less complex graphics job (or so it seems to me).

The first round of BRP3s (Binary Radio Pulsar) at Einstein used more GPU and less CPU than the previous ABPs (Arecibo Binary Pulsar) did. But still less GPU than when you run Seti, where the CUDA tasks take around 5% CPU and 95% GPU (full load).

BRPs run at around 20% CPU and 75% GPU. The first series then did.
There's a newer version out that uses different percentages of its resources. See this Einstein thread for more details. Essentially, they'll try to go for less CPU and lots of GPU use (95-100%).

When they do manage that, you'll not be able to run any screen saver anymore at the same time. Well, probably a simple 3D one, but not an OpenGL one.

As for Ozzfan or So Done, some of us know his real name, but have been sworn to ultra-secrecy. Breaking that vow will costs us our heads. ;-)
ID: 1065038 · Report as offensive

Questions and Answers : Windows : "failed to register the window class"


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.