RSS/Atom feed Twitter
Site is read-only, email is disabled

GIMP plug-ins need better error checking on passed parameters.

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

GIMP plug-ins need better error checking on passed parameters. Kevin Cozens 10 Oct 05:11
  GIMP plug-ins need better error checking on passed parameters. Sven Neumann 10 Oct 12:14
Kevin Cozens
2004-10-10 05:11:05 UTC (over 19 years ago)

GIMP plug-ins need better error checking on passed parameters.

Greetings, all.

One of my side projects while working on Tiny-Fu has been creating and running a script which calls all PDB routines with bad data to see how the various routines handle the bad data. My test script passes -1 for the image, drawable, layer, channel, and all INT arguments. I also pass empty strings for all STRING arguments.

My tests turned up a few minor bugs within GIMP which have since been fixed. However, the tests of the plug-ins have shown them to be VERY bad when it comes to detecting bad data. So far, I get segmentation faults in 58 out of the 71 plug-in calls I have tested. I supect the failure rate will probably continue to be around this high in the remainder of the 135 available plug-in calls.

Admittedly my tests are harsh but they are designed to look for problems. I have found it is too easy to inadvertently pass bad data via a PDB call due to an error in a script. These errors should not cause segmentation faults which could result in someone losing work they had done on an image.

It would be nice to have these problems with the plug-ins fixed for the 2.2 release of GIMP. Improving, or adding, validation checks on passed data in plug-ins would be a nice little project for someone who wants to get their feet wet in GIMP development.

Sven Neumann
2004-10-10 12:14:37 UTC (over 19 years ago)

GIMP plug-ins need better error checking on passed parameters.

Hi,

Kevin Cozens writes:

It would be nice to have these problems with the plug-ins fixed for the 2.2 release of GIMP. Improving, or adding, validation checks on passed data in plug-ins would be a nice little project for someone who wants to get their feet wet in GIMP development.

This is certainly not important for the 2.2 release. A plug-in that crashes due to bad input parameters is just a minor problem, almost negligible. Of course it wouldn't hurt to fix this problem but it isn't worth the risk of introducing new bugs close to a release.

Sven