This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tcl /tk on cygwin + mouse wheel event


On Sat, 07 Feb 2004 15:25:24 -0500, Mathieu Malaterre wrote in
<402549B4.4000204@nycap.rr.com>:

>Alejandro,
>	Your suggestion did get me a little further :) Now the python script 
>output 'foo' but I still get a seg fault (*). On the other hand the tcl 
>script didn't change, I still don't get anything. *But* if I start 
>startxwin.sh and then start:
>
>$ wish wheel.tcl
>
>then it works fine.

You may try rebasing your system. Download the utilities with the
network installer and read
/usr/share/doc//usr/share/doc/Cygwin/python-2.3.3.README on why you
may need to do it. 

> The problem is that you told me it is 'Cygwin's
>Tcl/Tk is in reality a set of true *native* win32 binaries'. So why do I
>need to start X11 ?

The fact that Tk needs the Xlib headers for compilation and embeding,
does not mean it is linked to the X libraries!!! It rather uses the
Win32 graphics subsystem (GDI).

Historically the tcl and tk binaries included in Cygwin have been
Win32 binaries, because there was no easy way to include the Xlib
headers in the distribution before there was a working, functional,
port of X11 to Cygwin. I am just used to that fact and always apply
the fix I mentioned earlier. 

Yet, I just examined the library dependecies of the tcl and Tk DLLs
and found to my surprise that they are now linked to cygwin1.dll. So,
the patches to have tcl/tk work under cygwin while using the GDI
subsystem instead of X11 made it upstream.

>BTW I found somebody else having difficulties with python:
><MouseWheel> causes crash on Windows2000
>https://sourceforge.net/tracker/?func=detail&atid=105470&aid=673115&group_id=5470
>http://mail.python.org/pipermail/python-bugs-list/2003-January/015756.html

That may be the case. I didn't notice it before, but the Tkinter
window dies when it loses focus while being the window in the
foreground and you send scrolling events to it both with a Cygwin
version and with a win32 native version of Python. (That would be in
my win2ksp4 system with a 1.5.7(0.109/3/2) runtime).

 I can reproduce the stack trace consistently as well. Hmmm... In my
system, using a python build that exports all symbols in the main and
extension dlls, gdb shows (included exclusively for record purposes):

(gdb) r mouse_wheel.py
Starting program: /usr/local/bin/python.exe mouse_wheel.py

Program received signal SIGSEGV, Segmentation fault.
0x006b3d59 in tcl84!Tcl_FindExecutable ()
(gdb) bt
#0  0x006b3d59 in tcl84!Tcl_FindExecutable ()
#1  0x006b289d in tcl84!Tcl_ExternalToUtfDString ()
#2  0x00743344 in tk84!TkpGetString ()
#3  0x0075a0c6 in tk84!TkBindDeadWindow ()
#4  0x0075973d in tk84!Tk_BindEvent ()
#5  0x0077e33c in tk84!TkBindEventProc ()
#6  0x0078b6ad in tk84!Tk_HandleEvent ()
#7  0x0078bdb5 in tk84!TkQueueEventForAllChildren ()
#8  0x006dd385 in tcl84!Tcl_ServiceEvent ()
#9  0x006dd666 in tcl84!Tcl_DoOneEvent ()
#10 0x66544812 in Tkapp_MainLoop (_self=0xa0e9950, args=0xa0684ec)
    at
/home/alejo/_cvscache/python-release23-maint/Modules/_tkinter.c:2536
#11 0x6b27319a in PyCFunction_Call (func=0xa0e74ec, arg=0xa0684ec,
kw=0x0)
    at Objects/methodobject.c:108
#12 0x6b2aae16 in call_function (pp_stack=0x22ebfc, oparg=1)
    at Python/ceval.c:3439
#13 0x6b2a8a43 in eval_frame (f=0x22ec08) at Python/ceval.c:2116
#14 0x00000001 in ?? ()
#15 0x0022ec08 in ?? ()

I'm not attaching a copy of 'cygcheck -svr' because there is nothing
wrong with my system that such output could show.



--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]