Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C4D_PLUGINS_DIR on R19.053 crash

19 REPLIES 19
Reply
Message 1 of 20
Martin_Collins
1238 Views, 19 Replies

C4D_PLUGINS_DIR on R19.053 crash

When using C4DtoA 2.3.1.1 via C4D_PLUGINS_DIR it works if it's the only path in C4D_PLUGINS_DIR

> set C4D_PLUGINS_DIR=C:\Program Files\SolidAngle\c4dtoa\2.3.1.1\cinema4d-R19\plugins
> start /b /wait "parentconsole" "cinema 4d.exe" -debug

...
Loading plugin directory: C:\Program Files\SolidAngle\c4dtoa\2.3.1.1\cinema4d-R19\plugins
...
Happy, C4DtoA loads

If however, i use multiple paths, with C4DtoA it causes a crash (this crash does not occur without C4DtoA and just multiple paths) additionally, it's fine with multiple paths when C4DtoA is installed to the C4D installation directory

>set C4D_PLUGINS_DIR=C:\Program Files\SolidAngle\c4dtoa\2.3.1.1\cinema4d-R19\plugins;C:\Temp\Plugins
> start /b /wait "parentconsole" "cinema 4d.exe" -debug

...
Loading plugin directory: C:\Program Files\SolidAngle\c4dtoa\2.3.1.1\cinema4d-R19\plugins
<CRASH>

Thanks,
Martin

19 REPLIES 19
Message 2 of 20

Thanks for reporting. The plugin tries to locate the Arnold dll to load it dynamically and that code does not expect multiple paths in the env var. I'll fix this in the next release.

Message 3 of 20

That'll be perfect, thank you

Message 4 of 20

Here's a wip build with the fix, please give it a go if you have some time:

https://safeshare.solidangle.com/index.php/s/ljxlVTXMM3eaGLz

password: c4dtoawip

Message 5 of 20

Thank you @Peter Horvath, That seems to be behaving nicely under R19.053

Message 6 of 20

It seems the body of the reply didn't get sent yesterday.

Thank you for the wip build, this seems to be behaving itself under R19.053

Message 7 of 20

Great, thanks for the feedback.

Message 8 of 20
Anonymous
in reply to: Martin_Collins

On 2.3.1.2 still the same problem, but only on Win10.

Same time on Win7 all works fine.

Message 9 of 20
peter.horvath6V6K3
in reply to: Anonymous

Yes, it will be fixed in 2.3.1.3 soon.

Message 10 of 20

The fix is now available in 2.3.1.3.

Message 11 of 20
Anonymous
in reply to: Martin_Collins

Hello Peter,

That is a very very informative thread but I have an additional question.

On OsX, the pkg file contains two folders "library" and "plugins" below the "CINEMA 4D R1x".

To which location C4D_PLUGINS_DIR should point to? "CINEMA 4D R1x" or "plugins"? If it is "plugins" what should I do with the "library" one? Does it need to be added to the DYLIB path or any other one? I do not wish to copy it inside my C4D folder structure.

Thank you for your help.

Stephan.

Message 12 of 20
Anonymous
in reply to: Martin_Collins

Hey Peter,

Nevermind, I figured it out. Declaring the path to "plugins" does the job:

setenv C4D_PLUGINS_DIR /Volumes/Seagate_3TB/C4DtoA/2.4.0.1/R19/osx/plugins

Although this mechanism works when my plugin folder is located onto a local drive, as above, it craps on me when the plugin folder is located on a NFS volume:

setenv C4D_PLUGINS_DIR /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins

This is what C4D throws at me:

--- snipsnip

Loading plugin directory: /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins

Error: OS error loading plugin volume_voxel_field.dylib. Could not load dll. Error code: dlopen(/Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_voxel_field.dylib, 6): Library not loaded: @rpath/libai.dylib

Referenced from: /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_voxel_field.dylib

Reason: image not found. (file:///Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_voxel_field.dylib) [osx_dll.cpp(89)]

Error: OS error loading plugin volume_tfd.dylib. Could not load dll. Error code: dlopen(/Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_tfd.dylib, 6): Library not loaded: @rpath/libai.dylib

Referenced from: /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_tfd.dylib

Reason: image not found. (file:///Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_tfd.dylib) [osx_dll.cpp(89)]

Error: OS error loading plugin c4d_noise_shader.dylib. Could not load dll. Error code: dlopen(/Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/shaders/c4d_noise_shader.dylib, 6): Library not loaded: @rpath/libai.dylib

Referenced from: /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/shaders/c4d_noise_shader.dylib

Reason: image not found. (file:///Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/shaders/c4d_noise_shader.dylib) [osx_dll.cpp(89)]

Error: OS error loading plugin c4dtoa_shaders.dylib. Could not load dll. Error code: dlopen(/Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/shaders/c4dtoa_shaders.dylib, 6): Library not loaded: @rpath/libai.dylib

Referenced from: /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/shaders/c4dtoa_shaders.dylib

Reason: image not found. (file:///Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/shaders/c4dtoa_shaders.dylib) [osx_dll.cpp(89)]


Bonjour found: 765.50

WARNING | node "cryptomatte" is already installed

WARNING | node "cryptomatte_filter" is already installed

--- snipsnip

Any idea why C4D would have difficulties loading those libraries? They are there. That can be tested with a simple "ls"

 %>ls -la /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_voxel_field.dylib

-rw-r--r--1 rootwheel34736 Aug 13 06:13 /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/procedurals/volume_voxel_field.dylib

That might a question for Maxxon but maybe you have an idea. I cannot imagine that I'm the first one to try to achieve that kind of thing.

Thank you for your help.

Cheers,

Message 13 of 20

Library not loaded: @rpath/libai.dylib


Maybe add arnold/bin to DYLIB_LIBRARY_PATH



// Stephen Blair
// Arnold Renderer Support
Message 14 of 20

Yes, the C4D_PLUGINS_DIR has to point to the plugins folder.

The library folder contains material preview scenes, material presets and scripts. I'm not sure if they work next to your plugins folder specified via C4D_PLUGINS_DIR. If not, you might have to copy this to your local application data folder ($HOME/Library/Preferences/MAXON/...).

About the loading errors, I think you have two options:

  • Setup the DYLIB_LIBRARY_PATH as Stephen suggested.
  • Copy the arnold folder next to your plugins folder, because that's the relative path set in the dlls to look for. Actually if you run the installer and change the install folder to /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx, then it should install the arnold and plugin binaries properly.
Message 15 of 20
Anonymous
in reply to: Martin_Collins

Hello Stephen, hello Peter,

Thanks to both of you for your suggestions.

Adding /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/arnold/bin to the DYLIB path did the trick. C4D registers the plugin and everything works well but for the material previews, as foreseen by Peter

I however do not understand why it's necessary to do so when the folder structure resides on a NFS volume and not when it is on a local drive. Both folder structures are the same so the relative path trick should work in both cases. Not a Big deal, I'm just curious.

Local Structure:

2239-c4dtoa-local.png

NFS Structure:

2240-c4dtoa-nfs.png

Regarding the content of the library folder

I was able to get the material in C4D's content browser by adding the location of the .l4d file to the C4D_BROWSERLIBS env. What's interesting is that the materials that I drag from the content browser get a preview thumbnail even if the material preview scenes are not where they should be.

It seems that the content of the materialpreview folder is the only thing that needs to be copied in the C4D installation folder of User's home folder in order to get a preview of the material created with material editor.

I also had to add the scripts folder to C4D_SCRIPTS_DIR in order to be able to run the cryptomatte setup utility.

Anyway, thank you again for your help and suggestions. Your input is always very stimulating.

Have a nice weekend.

Cheers.

Message 16 of 20

I'm glad you have solutions for most of the issues.

> I however do not understand why it's necessary to do so when the folder structure resides on a NFS volume and not when it is on a local drive.

Good question, I'm not sure either. Maybe locating shared libraries relatively (@loader_path) does not work on an NFS mounted filesystem. I did not find anything related on the net though.

> What's interesting is that the materials that I drag from the content browser get a preview thumbnail even if the material preview scenes are not where they should be.

I think that's because the image is cached in the preset. It should disappear once you change the material (at least I would be surprised if not).

Message 17 of 20
Anonymous
in reply to: Martin_Collins

Hello Peter,

More food for thought.....Everything was perfect until I tried to launch C4D/C4DtoA on one of our newer Mac running High Sierra/10.13.6 (Most of our fleet still runs on Sierra/10.12.6).

I then got this:

Loading plugin directory:
    /Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins
    Bonjour found: 878.70
    WARNING | rendering with watermarks because the skip_license_check
    option was enabled
    WARNING | rendering with watermarks because the skip_license_check
    option was enabled
    Symbol resource error: Couldn't open file.
(file:///Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/res/description/aipoints.h)
    [iofilehandler_impl.cpp(497)] 
      Cause: Errno #2: No such file or directory
    [iofilehandler_impl.cpp(497)]
    Symbol resource error: Couldn't open file.
(file:///Volumes/Software/SolidAngle/C4DToArnold/2.4.0.1/R19/osx/plugins/C4DtoA/res/description/aipoints.h)
    [iofilehandler_impl.cpp(497)] 
      Cause: Errno #2: No such file or directory
    [iofilehandler_impl.cpp(497)]

I was able to find the file but it wasn't named as expected. Instead of AIpoint.h the fie is named aipoints.h.

I was able to workaround that by creating a symbolic link though. I wasn't sure about the res file so I applied the same treatment:

aipoints.h -> ./AIpoints.h
aipoints.res -> ./AIpoints.res

All the other files in the folder start with lower case.

I'm wondering what makes HighSierra so case-sensitive. The volume that is mounted with NFS is case-sensitive but it didn't seem to bother Sierra.

Cheers.


Message 18 of 20

Thanks Stephan. To avoid any similar cases in the future it's probably better if I rename those files to lower case.

Message 19 of 20
Anonymous
in reply to: peter.horvath6V6K3

Indeed. 🙂

Message 20 of 20
Anonymous
in reply to: Anonymous

Indeed.

Thank you. 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report