X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <46E03EFD.3040806@kleckner.net> Date: Thu, 06 Sep 2007 10:55:09 -0700 From: Jim Kleckner User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Threading issue in cygwin python 2.5.1-2 ? References: <46D8A577 DOT 1060908 AT kleckner DOT net> <46DF52B8 DOT 7000509 AT kleckner DOT net> <46DF9CAD DOT 6000503 AT kleckner DOT net> <46E01E3C DOT 7000506 AT cygwin DOT com> <46E02134 DOT 3030400 AT kleckner DOT net> In-Reply-To: <46E02134.3030400@kleckner.net> Content-Type: multipart/mixed; boundary="------------030104060801020504010301" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------030104060801020504010301 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Jim Kleckner wrote: > Larry Hall (Cygwin) wrote: >> Steve Holden wrote: >>> Igor Peshansky wrote: >>>> On Wed, 5 Sep 2007, Steve Holden wrote: >>>> >>>>>>> Running the example on the above Python system I just see the >>>>>>> command >>>>>>> prompt return with no program output whatsoever: >>>>>>> >>>>>>> sholden AT bigboy ~/Projects/Python >>>>>>> $ /usr/bin/python test03.py >>>>>> So it fails, but doesn't bring up the exception dialog. >>>>> That's right: nothing at all. But note I compiled this particular >>>>> version >>>>> myself, so I guess it's possible I didn't enable threads. >>>> >>>> What's the exit code? The behavior sounds suspiciously like a >>>> missing DLL >>>> case... >>> >>> sholden AT bigboy ~/Projects/Python >>> $ /usr/bin/python test03.py >>> >>> sholden AT bigboy ~/Projects/Python >>> $ echo $? >>> 0 >>> >>> So, what does this tell us? >> >> >> Everything is just perfect! ;-) >> >> The value would be non-zero if it couldn't find a needed DLL. >> >> > > I also get 0 exit code even though there is a dialog box with the > application error codes mentioned before. > > [jim AT kleckner2 ~]$ python aspn-threading-tkinter.py > [jim AT kleckner2 ~]$ echo $? > 0 > [jim AT kleckner2 ~]$ Ok, so I downloaded the python source and built a debug version with: export EXTRA_CFLAGS="-DPy_DEBUG -DPy_REF_DEBUG -DPy_TRACE_REFS -DPYMALLOC_DEBUG -DCOUNT_ALLOCS" ./configure --with-pydebug --prefix=$Prefix --mandir='${prefix}/share/man' Now I run the example and similar to Steve it just exits with no dialog box. With some extra print statements, it seems to disappear at the line: self.master.after(100, self.periodicCall) Running this under gdb gives: (gdb) run aspn-threading-tkinter.py Starting program: /usr/bin/python.exe aspn-threading-tkinter.py Loaded symbols for /cygdrive/c/WINDOWS/system32/ntdll.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/kernel32.dll Loaded symbols for /usr/bin/cygwin1.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/advapi32.dll Loaded symbols for /cygdrive/c/WINDOWS/system32/rpcrt4.dll Loaded symbols for /usr/bin/libpython2.5.dll Program exited with code 030000000005. (gdb) Running it with idle does give the exception dialog. I can't seem to grab hold of anything to get a traceback. Suggestions? --------------030104060801020504010301 Content-Type: text/plain; name="aspn-threading-tkinter.py" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="aspn-threading-tkinter.py" IyBGcm9tIGh0dHA6Ly9hc3BuLmFjdGl2ZXN0YXRlLmNvbS9BU1BOL0Nvb2ti b29rL1B5dGhvbi9SZWNpcGUvODI5NjUNCiIiIg0KVGhpcyByZWNpcGUgZGVz Y3JpYmVzIGhvdyB0byBoYW5kbGUgYXN5bmNocm9ub3VzIEkvTyBpbiBhbiBl bnZpcm9ubWVudCB3aGVyZQ0KeW91IGFyZSBydW5uaW5nIFRraW50ZXIgYXMg dGhlIGdyYXBoaWNhbCB1c2VyIGludGVyZmFjZS4gVGtpbnRlciBpcyBzYWZl DQp0byB1c2UgYXMgbG9uZyBhcyBhbGwg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RoZSBhc3luY2hy b25vdXMgSS9PLiBGb3IgZXhhbXBsZSwgaXQgbWF5IGJlDQogICAgICAgIGEg J3NlbGVjdCgpJy4NCiAgICAgICAgT25lIGltcG9ydGFudCB0aGluZyB0byBy ZW1lbWJlciBpcyB0aGF0IHRoZSB0aHJlYWQgaGFzIHRvIHlpZWxkDQogICAg ICAgIGNvbnRyb2wuDQogICAgICAgICIiIg0KICAgICAgICBwcmludCAid29y a2VyVGhyZWFkMSINCiAgICAgICAgd2hpbGUgc2VsZi5ydW5uaW5nOg0KICAg ICAgICAgICAgIyBUbyBzaW11bGF0ZSBhc3luY2hyb25vdXMgSS9PLCB3ZSBj cmVhdGUgYSByYW5kb20gbnVtYmVyIGF0DQogICAgICAgICAgICAjIHJhbmRv bSBpbnRlcnZhbHMuIFJlcGxhY2UgdGhlIGZvbGxvd2luZyAyIGxpbmVzIHdp dGggdGhlIHJlYWwNCiAgICAgICAgICAgICMgdGhpbmcuDQogICAgICAgICAg ICB0aW1lLnNsZWVwKHJhbmQucmFuZG9tKCkgKiAwLjMpDQogICAgICAgICAg ICBtc2cgPSByYW5kLnJhbmRvbSgpDQogICAgICAgICAgICBzZWxmLnF1ZXVl LnB1dChtc2cpDQoNCiAgICBkZWYgZW5kQXBwbGljYXRpb24oc2VsZik6DQog ICAgICAgIHByaW50ICJlbmRBcHBsaWNhdGlvbiINCiAgICAgICAgc2VsZi5y dW5uaW5nID0gMA0KDQpyYW5kID0gcmFuZG9tLlJhbmRvbSgpDQpyb290ID0g VGtpbnRlci5UaygpDQoNCmNsaWVudCA9IFRocmVhZGVkQ2xpZW50KHJvb3Qp DQpyb290Lm1haW5sb29wKCkNCg== --------------030104060801020504010301 Content-Type: text/plain; charset=us-ascii -- 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/ --------------030104060801020504010301--