Synfig Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report #198  -  Incorrect error message
Posted Dec 23, 2012 - updated Jan 05, 2019
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Fixed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Fixed
  • Assigned to
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     Imported User
  • Owned by
    Not owned by anyone
  • Category
    Not determined
  • Resolution
    RESOLVED
  • Priority
    Not determined
  • Targetted for
    icon_milestones.png Not determined
  • Tags
    icon_customdatatype.png Not determined
  • Difficulty
    icon_customdatatype.png Not determined
Issue description
gballintijn:

When selecting the canvas and filename parameter in the parameters panel, an error message is printed on stderr. It reads "error: EXCEPTION: bad type: Bad type for curves". An examination of the code (src/gtkmm/widget_curves.cpp, lines 222 and 397), reveals however that nothing is wrong, and that this condition is subsequently ignored.

The problem originate from the fact that neither filenames nor canvasses can be drawn as a curve, so they should be (and are) ignored by the curves widget. The method of ignoring them, i.e. the exception thrown and caught, results however also in the printing of an error message, and this is wrong.

Attached is a patch that consistutes probably the easiest way to avoid this problem. Another solution would be to introduce a new exception, that doesn't also constitute an error, e.g. type_not_supported, or move the condition in the if-statement to the Curve Struct class, to enhance encapsulation.
Steps to reproduce this issue
Nothing entered.

#2
Comment posted by
 Imported User
Dec 23, 05:21
A file was uploaded. curves-1.patchicon_open_new.png
#3
Comment posted by
 Imported User
Dec 23, 05:21
gballintijn:

Slightly improved version (more explicit) that uses a method call.

A file was uploaded. curves-2.patchicon_open_new.png
#4
Comment posted by
 Imported User
Dec 23, 05:22
pabs3:

Patch looks good, apart from the unrelated change in the 3rd hunk (reformatting a catch statement).

Please apply it to SVN, IIRC you should have access.

In addition, please list yourself in the AUTHORS file.
#5
Comment posted by
 Imported User
Dec 23, 05:22
gballintijn:

Fixed in r2033.
#6
Comment posted by
 Imported User
Dec 23, 05:25
A file was uploaded. curves-3.patchicon_open_new.png This comment was attached:

gballintijn:

Add the rest of the types of value nodes that should be ignored by the curves panel. This patch extends r2033
#7
Comment posted by
 Imported User
Dec 23, 05:25
genete:

I see the patch useful. Please apply it.

In the future a message in the curves dialog can appear telling that the selected parameter hasn't graph representation. Maybe someone invents a graphical representation for some of the Value Node Type (for example the canvas can be represented by a small frame strip, like cinelerra does)
#8
Comment posted by
 Imported User
Dec 23, 05:25
gballintijn:

Fixed in r2343.