On Fri, Jan 30, 2004 at 05:02:25AM -0800, Artur de Sousa Rocha wrote:
> Sometimes when I launch my script under Cygwin, I get strange error
> messages like:
> 
>       2 [win] python 1912 Winmain: Cannot register window class
> 
> Sometimes all of the threads run OK, otherwise after the "correct"
> ones finish the console stops responding anyway. No problems directly
> under Windows, and /lib/python2.3/test/test_threading.py works fine
> too. What is wrong?

I don't know, but I have some more (albeit not much more) information to
contribute.  If I patch Cygwin with the attached, then I get the
following:

    8 [win] python 2144 Winmain: Cannot register window class, Win32 error 1410

We also have the following:

    $ fgrep 1410 /usr/include/w32api/winerror.h 
    #define ERROR_CLASS_ALREADY_EXISTS 1410L

<WAG>
So, it seems that Cygwin is calling RegisterClass() with the same
WNDCLASS more than once.
</WAG>

Does the above ring any bells?

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
Index: window.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/window.cc,v
retrieving revision 1.28
diff -u -p -r1.28 window.cc
--- window.cc   14 Dec 2003 07:09:22 -0000      1.28
+++ window.cc   3 Feb 2004 19:14:59 -0000
@@ -97,7 +97,7 @@ Winmain (VOID *)
 
   if (!RegisterClass (&wc))
     {
-      system_printf ("Cannot register window class");
+      system_printf ("Cannot register window class, %E");
       return FALSE;
     }
 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to