Corrupt node material?

A file I’ve been working on today has suddenly started crashing Cinema 4D instantly when it loads. I tried updating C4D and V-ray to the latest builds (nightlies for VR), but that didn’t fix it. I rolled everything back to C4D r25.113 and V-ray 5 Update 2, but that didn’t help, either.

I believe the problem is in a node material. If I merge the file into a new document that is in the Standard node space, it imports fine. If I then change the node space to V-ray, it crashes instantly.

I can merge the file into a new document in Standard node space, copy and paste everything into a new document, and then change the node space to V-ray and it seems to work ok, but that appears to be due to the fact that all the node-based materials have been completely blanked out, wiping out hours of work.

It might be worth noting that the file was working ok earlier this morning, then I started experiencing crashes while lighting it. That’s when I tried initially updating everything, and when it first started crashing on me when it loads the file.

Any help or ideas would be appreciated.

So far it appears that I can open the file and work in it pretty normally in C4D r24 (V-ray 5 Update 2)…

Hello @GMTJay ,

Do yo experience this issue with a specific scene only or it also happens on a fresh scene? Please let me know what OS are you using? Also, can you send us a fresh crash dump file from the crash? You can check how to collect a dump file here.

Hi @GMTJay , can you try clearing (deleting) your node materials cache in the preferences to see if the crash would still persist? These node material caches are located in these two directories (for C4D S24):


<Preferences>/dc/
<Preferences>/description.db/

Where the <Preferences> is the directory you can find from the bottom of the preferences dialog:

Just DMed you.

Hi Deyan,

I tried deleting the Chaos files in those folders, but C4D would still quit immediately when it was opened. I then deleted the entire Maxon prefs folder, and then the file opened normally and I was able to render it.

A couple of additional notes in case their useful:

  • I tried saving out just the materials to their own file. This file would also quite C4D immediately.
  • While I was able to open it and work in it normally in C4D r24, as I was experimenting with it today r24 began crashing on it, as well.
  • While deleting the Maxon prefs folder seems to have fixed it for r25, r24 is now still crashing on it.

Thanks,

Jay

Hello @GMTJay ,

Could you open a terminal and execute the following command (it checks what is your current limit for open file handles by a process).
launchctl limit maxfiles

Please let me know what is the output once you execute the command.

Aleksandar,

Terminal returned this:

maxfiles 256 unlimited

Hello @GMTJay ,

The maximum limit of file handles is low, and this could be the cause of the crashes.

Could you open a terminal and execute the following code to set your limit higher and to see if C4D will crash again:
sudo launchctl limit maxfiles 16000 2000000

Then try to run Cinema4D again. Keep in mind that this is only for testing and changing the limits that way will not be persistent and will only last for the current session. Restarting your machine will reset this limit.

I ran that code and was able to open the both the full scene file as well as the materials only file in the r24 (note: r25 has been running better since deleting the Maxon prefs folder). I ran it again and changed it back to 256 unlimited, tried to reopen the file, and it immediately quit again.

Spoke too soon, r25 started crashing on the scene again. I re-ran that code you sent and then it opened fine.

Hello @GMTJay ,

Could you please clarify if setting the limit higher resolves the issue as I didn’t quite understand if it crashes when you set the limit back to 256 or when you increase it? Thank you.

I’ve had exactly this problem in the past when testing node materials, which is why i’m staying away from them till they’re more stable. I can’t afford to lose scenes like that. Luckily I used the same solution as you of opening in r24 and deleting the node material.

Setting the limit higher seems to have helped in both r24 and r25.

Initially, deleting the whole Maxon prefs folder did something so that r25 would open the file, but after a while of working in it it started quitting again opening the file. Running the code you provided appears to fix it or, at least, allows it to open.

Hello @GMTJay ,

Could you please observe if the issue will appear again and let me know? Thank you.

Deyan,

I just ran into a problem where a completely different project began crashing when I started a production render. Aleksandar’s trick of increasing the max file count didn’t help, but deleting the node material caches did.

Jay

Hi @GMTJay , thanks for letting us know this. We will be working on implementing automatic cleaning of this caches between V-Ray versions in the future. We also contacted Maxon about this cache problem, and they will also provide a way of doing this in the future, but probably this will be implemented first in their next major version (after R25).