vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
542 stars 90 forks source link

xasy crashed when clicking on the grid button #353

Closed hpreusse closed 1 year ago

hpreusse commented 1 year ago

This is Debian Bug 1023920

When I launch xasy without any argument and click on the "Toggle grid" button, xasy crashed instantly. Then I obtain the following message:

Traceback (most recent call last):
  File "/usr/share/asymptote/GUI/Window1.py", line 2233, in btnDrawGridOnClick
    self.quickUpdate()
  File "/usr/share/asymptote/GUI/Window1.py", line 1868, in quickUpdate
    self.preDraw(self.mainCanvas) # coordinates/background
  File "/usr/share/asymptote/GUI/Window1.py", line 2026, in preDraw
    self.drawCartesianGrid(painter)
  File "/usr/share/asymptote/GUI/Window1.py", line 1953, in drawCartesianGrid
    preCanvas.drawLine(Qc.QLine(xCoord, -9999, xCoord, 9999))
TypeError: arguments did not match any overloaded call:
  QLine(): too many arguments
  QLine(QPoint, QPoint): argument 1 has unexpected type 'numpy.float64'
  QLine(int, int, int, int): argument 1 has unexpected type 'numpy.float64'
  QLine(QLine): argument 1 has unexpected type 'numpy.float64'
Abandon
jamievlin commented 1 year ago

https://github.com/vectorgraphics/asymptote/pull/354 should fix this bug