[Bf-committers] Re: Fix: Using Yafray for background rendering

Melchior FRANZ bf-committers@blender.org
Thu, 12 Aug 2004 11:50:58 +0200


* Gregor Mückl -- Thursday 12 August 2004 10:43:
> [...] but it tells me that the plugin interface is not reliable.

Problems with the plugin interface here, too: I compiled both yafray & blender
(both stable and HEAD) with same glibc & compiler under Linux.

When I activate yafray and disable xml in Blender, then click Render, it says
this on the console (among other stuff):

  Error loading yafray plugin: blender: undefined symbol: getYafray


Otherwise nothing happens. No yafray rendered image. When I click Render again,
I get a crash:


  (gdb) bt
  #0  0x0824c5f8 in yafrayPluginRender_t::writeMaterialsAndModulators() (this=0x86404c0)
      at source/blender/yafray/intern/export_Plugin.cpp:722
  #1  0x08238291 in yafrayRender_t::exportScene() (this=0x86404c0)
      at source/blender/yafray/intern/yafray_Render.cpp:51
  #2  0x082361e1 in YAF_exportScene () at source/blender/yafray/intern/api.cpp:13
  #3  0x082104cf in yafrayRender () at source/blender/render/intern/source/initrender.c:757
  #4  0x08211208 in RE_initrender (ogl_render_view3d=0x0) at source/blender/render/intern/source/initrender.c:1188
  #5  0x08192ae9 in do_render (ogl_render_view3d=0x0, anim=0, force_dispwin=0) at source/blender/src/renderwin.c:865
  #6  0x08192c93 in BIF_do_render (anim=0) at source/blender/src/renderwin.c:930
  #7  0x08209f52 in do_render_panels (event=0) at source/blender/src/buttons_scene.c:513
  #8  0x081a0d83 in winqreadbutspace (sa=0x8813654, spacedata=0x8814d2c, evt=0x0) at source/blender/src/space.c:2787
  #9  0x081a3b6f in scrarea_do_winhandle (area=0x8813654, evt=0xbfffef80) at source/blender/src/spacetypes.c:140
  #10 0x081474e3 in scrarea_dispatch_events (sa=0x8813654) at source/blender/src/editscreen.c:530
  #11 0x08147fbf in screen_dispatch_events () at source/blender/src/editscreen.c:905
  #12 0x0814834b in screenmain () at source/blender/src/editscreen.c:1134
  #13 0x08103514 in main (argc=2, argv=0xbffff074) at source/creator/creator.c:602


which isn't really surprising after the plugin had apparently not been found or
was broken. Now, when I trace the whole thing I see this:

  gettimeofday({1092301719, 808444}, {0, 0}) = 0
  stat64("/usr/local/lib/libyafrayplugin.so", {st_mode=S_IFREG|0750, st_size=212948, ...}) = 0
  stat64("/usr/lib/libyafrayplugin.so", 0xbfffeaa0) = -1 ENOENT (No such file or directory)
  write(2, "E", 1E)                        = 1
  write(2, "r", 1r)                        = 1
  write(2, "r", 1r)                        = 1
  write(2, "o", 1o)                        = 1
  write(2, "r", 1r)                        = 1
  write(2, " ", 1 )                        = 1


So, it has found the plugin in /usr/local/lib (where it actually is) but then
searched it again in /usr/lib, where it is *not*. Then it complained (and later
crahed).

  $ ls -ld /usr/local/lib/{libyafray*,yafray}
  -rwxr-x---    1 root     root       396517 2004-08-12 11:41 /usr/local/lib/libyafraycore.so
  -rwxr-x---    1 root     root       212948 2004-08-12 11:42 /usr/local/lib/libyafrayplugin.so
  drwxr-x---    2 root     root         4096 2004-08-12 11:44 /usr/local/lib/yafray

  $ ls -ld /usr/lib/{libyafray*,yafray}
  /bin/ls: /usr/lib/libyafray*: No such file or directory
  /bin/ls: /usr/lib/yafray: No such file or directory


Of course, /usr/local/lib/libyafrayplugin.so does contain getYafray:

  $ nm /usr/local/lib/libyafrayplugin.so|grep getYafray
  0001a210 T getYafray

m.