[issue45103] IDLE: make configdialog font page survive font failures

2021-11-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This has been (supposedly) fixed in tcl/tk 8.6.12, included with all our 
Windows installers starting with 3.9.9.

Thank you for investigating reporting to tcl/tk.  Bugfix list at
https://github.com/tcltk/tk/blob/8baf7d337ca0aab7fafb0e670927ab2c0200e80a/changes#L7869
credits you along with 'vogel': "2021-09-21 (bug)[033886] Win: hang in font 
loading (e-paine,vogel)"
https://sourceforge.net/p/tcl/mailman/message/37380142/
specifically says fixes include "" - Windows loading of the Phaistos font.".

--
resolution:  -> third party
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Bizarre.  The SO OP just reported that deleting FiraCode fixed *his* 3.10 
problem.  There must be some unobvious difference in systems.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-08 Thread E. Paine


E. Paine  added the comment:

> Did the FiraCode font work for you or merely not work without crashing?

It worked fine (other than a few missing features such as context-aware 
punctuation).

The steps I did to test were:

- Load IDLE
- Enter config dialog
- Set IDLE to use Fira Code font
- Use 'OK' button to exit config dialog
- Close IDLE
- Reload IDLE
- Enter config dialog
- Revert font

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks.  Did the FiraCode font work for you or merely not work without crashing?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-07 Thread E. Paine


E. Paine  added the comment:

I am unable to reproduce on either Python 3.9.6 (Tk 8.6.9) or 3.10.0 (Tk 
8.6.10).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-10-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A similar report, 
https://stackoverflow.com/questions/69466716/python-3-10-idle-does-not-respond-everytime-i-hit-configure-idle-from-options
but with FiraCode font https://github.com/tonsky/FiraCode.  The compatibility 
list includes IDLE as 'does not work' along with some other editors.

--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-17 Thread E. Paine


E. Paine  added the comment:

https://core.tcl-lang.org/tk/tktview/0338867c742


IMO this should be closed as third-party, since there is very little we can / 
should do (yes we could remove the offending characters from the preview if the 
user has the font installed, but this is a lot of extra code for a very rare 
issue).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-09 Thread E. Paine


E. Paine  added the comment:

It turns out the problem is a combination of the font and IDLE preview content. 
With the phaistos font installed, inserting the content of the "Devanagari, 
Tamil" or "East Asian" sections into a Tk text widget causes it to freeze. For 
example, the following will fail:

pack [text .t]
.t insert end \u0966

The reason for this still confuses me, since Tk would never default (I believe) 
to trying to use phaistos font (and therefore it's installation should not 
affect this). I will report it to the Tk team.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine


E. Paine  added the comment:

IDLE is hanging on Lib/idlelib/configdialog.py:94 (`self.wait_window()`). 
Commenting this does not solve the problem: I think it's in the Tk event loop 
somewhere, since my debugger shows the Python callback completing successfully. 
This still doesn't explain the behaviour, however, so I'll need to spend a bit 
more time tracking it down.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine


E. Paine  added the comment:

> did problems occur without displaying any emoji

I was using an unmodified version of IDLE.

> If they include one of those characters in the font name displayed in the 
> font list

This is not the case. It is listed simply as "Phaistos", when calling 
`tkinter.font.families()`.

> if we verify the report

Report verified. Behaviour is exactly as described, hanging when trying to load 
the "Configure IDLE" window. I will look into exactly which line is the problem 
soon.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If nothing else, I should amend the doc note about font problems to include 
Windows if we verify the report.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for finding what I could not.

Your previous message, referenced above, reporting a problem that remains in 
8.6.11 on linux, was ...

"For me, this is not limited to special characters. Trying to load anything in 
Tk using the 'JoyPixels' font crashes (sometimes it does load but all 
characters are very random - most are whitespace - and it crashes again after a 
call to `fc-cache`). IDLE crashes when trying to preview the font.

I believe this is what is being experienced on 
https://askubuntu.com/questions/1236488/x-error-of-failed-request-badlength-poly-request-too-large-or-internal-xlib-le
 because they are not using any special characters yet are reporting the same 
problem."

JoyPixels is an emoji font.  There are emoji in the BMP, but not in IDLE's 
initial font sample.  Did you add some, or did problems occur without 
displaying any emoji?
---

I presume that the Phaistos 'font' has glyphs for the unicode phaistos block in 
the first astral plane, U+101D0..101FD.
https://en.wikipedia.org/wiki/Phaistos_Disc_(Unicode_block)

If they include one of those characters in the font name displayed in the font 
list (ugh), then a problem is understandable, and the fix would be to filter 
astral chars (and possibly more) out of font names.  But I won't assume this.

Please try the experiments I outlined if you are so inclined.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine


E. Paine  added the comment:

Apologies, my previous message was not clear. When the segfault occurs is not 
consistent and sometimes occurs when previewing the font (as reported in the 
linked message) but more often when clicking the "ok" button (for which the 
faulthandler details are included).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine


E. Paine  added the comment:

FTR, the issue mentioned is issue42225.

msg380227 still applies for me (with Tk 8.6.11), with segfaults when I try to 
preview the font. For some reason, however, the segfault appears to be when 
we're closing the options window:

Python 3.9.6 (default, Jun 30 2021, 10:22:16) 
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import faulthandler
>>> faulthandler.enable()
>>> import idlelib.idle
Fatal Python error: Segmentation fault

Current thread 0x7f0ca44c7740 (most recent call first):
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2580 in destroy
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2579 in destroy
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2579 in destroy
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2579 in destroy
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2579 in destroy
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2579 in destroy
  File "/usr/lib/python3.9/tkinter/__init__.py", line 2579 in destroy
  File "/usr/lib/python3.9/idlelib/configdialog.py", line 199 in destroy
  File "/usr/lib/python3.9/idlelib/configdialog.py", line 177 in ok
  File "/usr/lib/python3.9/tkinter/__init__.py", line 1892 in __call__
  File "/usr/lib/python3.9/tkinter/__init__.py", line 696 in wait_window
  File "/usr/lib/python3.9/idlelib/configdialog.py", line 94 in __init__
  File "/usr/lib/python3.9/idlelib/editor.py", line 583 in config_dialog
  File "/usr/lib/python3.9/tkinter/__init__.py", line 1892 in __call__
  File "/usr/lib/python3.9/tkinter/__init__.py", line 1858 in event_generate
  File "/usr/lib/python3.9/idlelib/editor.py", line 1185 in command
  File "/usr/lib/python3.9/tkinter/__init__.py", line 1892 in __call__
  File "/usr/lib/python3.9/tkinter/__init__.py", line 1429 in mainloop
  File "/usr/lib/python3.9/idlelib/pyshell.py", line 1572 in main
  File "/usr/lib/python3.9/idlelib/idle.py", line 14 in 
  File "", line 228 in _call_with_frames_removed
  File "", line 850 in exec_module
  File "", line 680 in _load_unlocked
  File "", line 986 in _find_and_load_unlocked
  File "", line 1007 in _find_and_load
  File "", line 1 in 
fish: Job 1, 'python' terminated by signal SIGSEGV (Address boundary error)

I do not experience any problems loading the IDLE preferences page. I will look 
into whether I can reproduce the problem described on Windows.

--
nosy: +epaine

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45103] IDLE: make configdialog font page survive font failures

2021-09-04 Thread Terry J. Reedy


New submission from Terry J. Reedy :

There were reports on a previous issue that attempting to display some 
characters from some linux fonts in some distributions resulted in crashing 
Python.  The crash reports mentioned XWindows errors about particular 
characters being too complex or something.  I did not open an issue for this 
because it seemed beyond the ability of tkinter/IDLE to predict and handle.

https://stackoverflow.com/questions/68996159/idle-settings-window-wont-appear 
reported that requesting the IDLE settings window resulting in IDLE hanging.  
The user used my print debug suggestion to determine that the problem was in 
configdialog.py at
self.fontpage = FontPage(note, self.highpage)

The user first thought the issue was with a chess font, and then determined 
that the problem font was the phaistos font from 
https://ctan.org/pkg/phaistos?lang=en.  The font has the symbols from the 
Cretan Linear A script on the Disk of Phaistos. This issue is about

1. Try to reproduce the issue by downloading and installing Phaistos.otf (right 
click on the file and click Install).

2. If successful, trace the problem to a specific line within the FontPage 
class.

3. Determine whether Python code can prevent the hang or if it is completely in 
other code.  (Either way, perhaps report to tcl/tk.)

... To remove, "open Control Panel -> Fonts then locate and select Phaistos 
Regular font then proceed with clicking Delete button."

I did not select 'test needed' because we cannot routinely install new fonts 
and I am not sure of how to do an automated test if we could.
However, I would add a note as to how to do a manual test.

font.otf = OpenTypeFont, used on Windows, Linux, macOS.
https://fileinfo.com/extension/otf
It might be good test on other systems after Windows.

--
messages: 401062
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: make configdialog font page survive font failures
type: behavior
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com