Post Reply 

returned no return values error

May 17, 2012, 03:37
Post: #1
returned no return values error
Hi all, new guy jumping in the deep end here.

I'm trying to write a plugin to load an obscure image format into GIMP for editing, and I'm getting an error back: "Procedure 'file-load-mtw-bif' returned no return values". My plugin runs, I can see the progress through the prog bar and printfs in the console, and my GimpRunProc finishes without crashing, so I'm kinda stumped. My GimpRunProc is returning 2 vals, a GIMP_PDB_STATUS value and a GIMP_PDB_IMAGE value, and they appear to be valid. Am I really messing up the return vals, or is this a deeper problem with a misleading error message? I'm sure the image rendering inside my plugin has bugs, I've never done GIMP programming before, would a screwed up image also return an error like this?

This is with GIMP 2.8.0, on Windows Vista 32-bit, compiled with gcc in MingW.
Find all posts by this user
Quote this message in a reply
May 17, 2012, 10:41
Post: #2
RE: returned no return values error
Better ask the real specialists:

http://mail.gnome.org/mailman/listinfo/g...loper-list

There is also an IRC channel where the same folks are available, usually around 10PM European time.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 26, 2012, 02:56
Post: #3
RE: returned no return values error
The error is not from bad return values. After stripping down the code, I can run successfully until I call gimp_layer_new(), all my GIMP calls prior do not cause an error and an image gets created (albeit a blank one).

My call looks like this:
Code:
image->imageId = gimp_image_new(image->width, image->height, GIMP_INDEXED);
gimp_image_set_filename(image->imageId, filename);
gimp_image_set_colormap(image->imageId, cmap->map, cmap->numColors);
layerId = gimp_layer_new(image->imageId,
                         frameName,
                         image->width,
                         image->height,
                         GIMP_INDEXED_IMAGE,
                         100,
                         GIMP_NORMAL_MODE);
...
Commenting out the gimp_layer_new and subsequent layer calls gets me through the plugin run function. Since I'm starting with a fresh run of GIMP, image->imageId = 1, layerId = 2. and gimp_image_set_filename/gimp_image_set_colormap return TRUE.

Do I need to set up something prior to creating layers because I'm working with an indexed image?
Find all posts by this user
Quote this message in a reply
May 26, 2012, 08:57
Post: #4
RE: returned no return values error
Between the type and opacity parameters you should have a text string with the layer name...

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
May 26, 2012, 14:02
Post: #5
RE: returned no return values error
Did that change from 2.6? My "frameName" var is the layer name, in the 2.6 API the layer name is the second param in the call.
Find all posts by this user
Quote this message in a reply
May 26, 2012, 14:44 (This post was last modified: May 26, 2012 14:53 by ofnuts.)
Post: #6
RE: returned no return values error
Hmmm. Mixed up Scheme and C Sad Forget it.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Script-Fu Error] set! function is interpreted as an illegal function image_artist 2 335 Sep 11, 2014 20:54
Last Post: image_artist
  GAP Plugin error windows 8.1gap_ decode_mplayer.exe entry point not found. thegreenman 1 678 Sep 8, 2014 11:55
Last Post: rich2005
  Getting a CMYK error trying to open a .psd DJ Vibe 3 736 Jun 26, 2014 16:13
Last Post: rich2005
  GIMP batch process script run-time error Paddy Landau 4 925 Apr 8, 2014 22:42
Last Post: ofnuts
  Need some help with returning values. oconzer 2 244 Feb 23, 2014 23:01
Last Post: oconzer

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS