Closed AriaSalvatrice closed 1 year ago
Following your advice on Discord, I looked into the possibility it chokes on a font and figured out it was this one:
https://www.dafont.com/comickbook.font
Looking what CQ-editor is up to with procmon64 or process hacker shows that it loads fonts alphabetically, the last it attempts to load is the one that causes a crash.
Both TTF files of the family cause a crash. It's a popular and relatively modern font (2009), so it's likely many other fonts can cause the same issue.
The fonts are defective. Bad characters in the name table (results in required names missing). OS2 table structure broken. Missing anchors on many characters. Wrong directions on some contours. Etc., etc. Kinda surprising they work at all. I would replace them with something better.
@kenmcd To be clear, this was a random font on the user's system -- and has nothing to do with CQ-editor. Launching CQ-editor apparently caused this font to be "scanned" in some way that caused the whole application to crash. In my opinion, a defective font should not cause fonttools to crash.
In my opinion, a defective font should not cause fonttools to crash.
I agree.
Oddly I used the fonttools
ttx
feature to dump the fonts and it succeeded but with some errors noted in the output.
What version of fonttools
are you using?
(Sorry, I was trying to figure-out the connection with the fonts and did not understand they are user fonts.)
We are using fonttools=4.40.0 (also previously tried 4.39.4, same behavior)
In my opinion, a defective font should not cause fonttools to crash.
Fonttools was not designed to handle defective fonts gracefully. You may want to reformulate as "a defective font should not cause my application to crash". Perhaps guard against fonttools throwing exceptions.
@justvanrossum The point is that a random font on a user's system caused the whole application to crash and also did not provide any indication as to the fact it was (A) a corrupt font that caused it, and (B) which font it was. Per the discussion at the issue above, this was considered to be an unlikely occurrence in the real world. That was in March.
Since you did not bother to check, my application does not directly depend on fonttools; it depends on cadquery, which in turn depends on ezdxf, which in turn depends on fonttools. Hypothetically speaking, what is easier -- having every package which has some dependency guard against edge cases for that package or just providing better behavior upstream?
Closing this issue as it is fixed in ezdxf 1.1.0b4
Very little useful additional info I can think of providing besides the traceback. This windows install is far from pristine so there might be some weirdness going on on my system not present on a fresh install. Old mainline CQ Editor release works normally on this same machine.