function plotter crash during live preview...

Bug #590079 reported by Daniel J Blueman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

When using the Inkscape function plotter with live preview enabled, during typing the function, python raises an exception when the equation has syntax failure (momentarily when typing the equation), thus reporting a crash.

The crash signature is:

Traceback (most recent call last):
  File "/usr/share/inkscape/extensions/funcplot.py", line 274, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 207, in affect
    self.effect()
  File "/usr/share/inkscape/extensions/funcplot.py", line 256, in effect
    self.options.drawaxis)))
  File "/usr/share/inkscape/extensions/funcplot.py", line 74, in drawfunction
    f = eval('lambda x: ' + fx.strip('"'))
  File "<string>", line 1
    lambda x: exp(-x*x+)
                      ^
SyntaxError: unexpected EOF while parsing

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

The attached patch addresses this by catching SyntaxError exceptions and returning an empty array of points to plot, allowing typing in and editing of equations with live preview enabled.

Kris (kris-degussem)
tags: added: extensions-plugins
Alvin Penner (apenner)
Changed in inkscape:
status: New → Confirmed
Alvin Penner (apenner)
Changed in inkscape:
status: Confirmed → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

inkscape trunk: r9631

Changed in inkscape:
milestone: none → 0.49
su_v (suv-lp)
tags: added: backport-proposed
Revision history for this message
jazzynico (jazzynico) wrote :

Committed in the 0.48.x branch, revision 9794.

Changed in inkscape:
milestone: 0.49 → 0.48.2
tags: removed: backport-proposed
Ted Gould (ted)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.