[issue23815] Segmentation fault when create _tkinter objects

2016-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After looking closer I found that making PyType_FromSpec() not inheriting tp_new for static types whose base class is 'object' is not an option, because this breaks examples in the documentation, and likely break some third-party code. Opened new issue26979

[issue23815] Segmentation fault when create _tkinter objects

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd25508c62fc by Serhiy Storchaka in branch '3.5': Issue #23815: Fixed crashes related to directly created instances of types in https://hg.python.org/cpython/rev/cd25508c62fc New changeset 1c6326e81c33 by Serhiy Storchaka in branch 'default': Issue

[issue23815] Segmentation fault when create _tkinter objects

2016-05-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I noticed that you reported the crash and asked for a fix or reversion on #15721 6 months ago, with no response. Hence, lets not wait longer. Looking again, I see that there were 3 rounds of patches in 2012/2013. If you want to follow up, I suggest closing t

[issue23815] Segmentation fault when create _tkinter objects

2016-05-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I called the fix a workaround because other solution may be to make PyType_FromSpec() not setting tp_new in such cases. I expect that this is common mistake when convert a static class to a heap class with PyType_FromSpec(). At least we should add warnings i

[issue23815] Segmentation fault when create _tkinter objects

2016-05-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: The news part of the patch did not apply -- best not to include such in posted patches. After recompiliing 3.5 on Windows 10, the two tkinter test cases give the 3.3 TypeErrors instead of crashing. test_tcl also runs. curses does not run on Windows. I do

[issue23815] Segmentation fault when create _tkinter objects

2016-05-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is special exception -- tp_new is not inherited for static types whose base class is 'object' (see a comment in inherit_special() in Objects/typeobject.c#4569 for explanation). After converting them to heap types they became inherit tp_new from object.

[issue23815] Segmentation fault when create _tkinter objects

2015-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before issue15721 the tp_new was NULL, and this prevented from creating instances. After issue15721 the tp_new is inherited from object. An instance is created, but all internal pointers are NULLs. Following repr() dereferences NULL. -- versions: +P

[issue23815] Segmentation fault when create _tkinter objects

2015-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyType_Ready() is called inside PyType_FromSpec(). -- ___ Python tracker ___ ___ Python-bugs-list

[issue23815] Segmentation fault when create _tkinter objects

2015-04-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Probably a PyType_Ready() missing. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23815] Segmentation fault when create _tkinter objects

2015-04-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: With 3.4.3, I get the equivalent on Windows (a 'python has stopped working' box). -- nosy: +terry.reedy ___ Python tracker ___

[issue23815] Segmentation fault when create _tkinter objects

2015-03-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In 2.7 and 3.3: >>> import _tkinter >>> _tkinter.Tcl_Obj() Traceback (most recent call last): File "", line 1, in TypeError: cannot create '_tkinter.Tcl_Obj' instances >>> _tkinter.TkttType() Traceback (most recent call last): File "", line 1, in TypeE