Python tag or Python node in Xpresso crash Cinema 4D
-
Hi. Why does the Python tag or Python node in Xpresso crash Cinema 4D and how can I fix it?
I created a crystal generator project where I use the Python tag to randomly assign generator and spline parameters, and use the Python node in Xpresso to assign the Redshift material(Crystall 1) parameter values (I can't access these parameters via the Python tag). Certain SEED values ("Кристалл 1" user data) crash Cinema 4D.
PROJECT - cryst.c4d
BugReport - [_BugReport.txt](You have uploaded too many files at one time. Please try again later.) -
Hello @SmetK,
Thank you for reaching out to us. Your file is not crashing for me, and you did not actually include your crash report. Please follow our Support Procedures regarding reporting Bugs and Crashes.
Please also note that this is actually reserved for bugs and crashes caused by our API and not by user code. It is of course not out of question that this is caused by a bug in our API, but by for example violating threading restrictions, your code could also be easily the culprit. Please also understand that we do not run a debugging service here, you cannot just give us your code and expect us to figure out where and why it crashes. We expect some form of work on your side which pinpoints the problem to: "When I do this, Cinema 4D crashes, why?".
Cheers,
Ferdinand -
@ferdinand Thanks for the reply. I'll keep that in mind.
-
Just to be clear: I did not want to imply that we do not want to help you. But we need a little bit more from you. I would suggest to try to upload the crash report again. What is even better, is when you tell me a date and time (and your timezone) when you did submit a crash report (or a unqiue message you have put into the crash message).
-
@ferdinand I just now noticed that the file attached incorrectly. At the time of publication, it's 6:00 PM(time of crash cinema 5:57PM), October 18th, Vladivostok time (UTC+10 (GMT+10)). The program crashes on random seed values. Am I correct in understanding that I can't change material parameter values using the Python tag?
_BugReport.txt -
Hey @SmetK,
hm, weird, I could not find your submitted crash report. Neither when I search by date nor by
Call_Stack_Thread_24992
. But I did insert your crash report myself and below are the last lines of the stack trace for the crashing thread (this is being read bottom to top, i.e.,SplitIntoNgons
is where it crashed). I did resolve this for the build2026_0_0_db12fb68d6ba_2004155263
. Which is not unimportant information, as using a wrong build to resolve crash offsets can lead to wildly inaccurate results. You can find out the build you are using by opening theHelp > About
window and there right clicking the build number.Call_Stack_Thread_24992 c4d_objects.xdl64 = maxon::boolean::OutlineSplitter::SplitIntoNgons c4d_objects.xdl64 = maxon::boolean::OutlineSplitter::SplitOutline c4d_objects.xdl64 = maxon::boolean::CutObject::<lambda_0>::operator() ... internal API gibberish, nothing semantically relevant here ... c4d_objects.xdl64 = maxon::boolean::PreProcessInput c4d_objects.xdl64 = cinema::BooleanGenerator::GetVirtualObjects c4d_base.xdl64 = cinema::PluginObject::GetVirtualObjectsNew c4d_base.xdl64 = cinema::BaseObject::CreateVirtualObjects ... (more lines) ...
So, as already indicated by your
bug_report.txt
itself, this is crashing in one of major modules of Cinema 4D (c4d_objects.xdl64
) and not one of our Python modules (python.xdl64
orpython_vm.xdl64
). So neither your direct Python code nor the Python VM are the culprit. But it could still be that you are indirectly causing the crash, by for example deleting a scene element off main thread. AndSplitIntoNgons
then tries to access that object and everything goes up in flames.The crash happens while trying to build the output of the new Boolean object. I briefly talked with the dev of the new Booleans, and he said he did not see crash stack trace yet, so this is not a known bug. It seems to choke on some n-gon input in particular. Maybe this does ring a bell for you, in the context of what you are doing?
Your scene does not crash in my local Cinema 4D 2026.0 (Win) nor the one from the Booleans developer, are you sure you are using the most recent build? Maybe you could try to manually recrate one of your setups (i.e., without Python) and see if that crashes too? Without us being able to reproduce the crash, it will be impossible to help you. See our Support Procedures: Examples for how to report crashes in a more effective way.
Cheers,
Ferdinand -
@ferdinand Thank you very much for your reply. I currently have the latest version of the program (screenshot).
The program crashes when the cloner is in object mode (circle spline) with cubes placed inside a new Boolean and subtracted from the main geometry( 1st object under boolean). Reproduction: 1. Open project in Cinema 4D. 2. I play the timeline and after a couple of seconds the program crashes. 3. I restart the program and the project. I remove the nested Boolean objects one by one (Sweep, Cube, and Cloner with Cubes). 4. Deleting the cloner in object mode (a spline circle) with cubes inside solves the crash problem. Result: 1. Program crashes Versions: NOK 2026.0, Windows 11
-
Hey @SmetK,
Thank you for the reproduction steps, this makes it much easier for us. The added information is that you must play back the timeline. I am, however, still unable to reproduce your crash. But I am still using on Windows a very late beta version of the 2026.0.0 RC, I will try to squeeze in some time this week to install the actual customer RC. I also checked macOS, where I have already 2026_0_0_db12fb68d6ba_2004155263 installed, i.e., your build, and the build the crash report was resolved for, and nothing is crashing there either.
I also had a look at your scene setup and all in all this is all very tame, especially Python-wise; this should not crash. What is a bit iffy, is that you use both a Python tag and a (Python) Xpresso setup to set scene parameters, and have them both set to the same priority. But the worst this should be able to lead to is race conditions. But since you seem to be able to reproduce this reliably, while we cannot, I would ask you to:
- Test if this also crashes when you (a) disable the Python tag, (b) disable the Python tag AND the Xpresso tag, and (c) if it still crashes if you only disable the Xpresso tag.
- Test if this still crashes if your make the priority of the Python and Xpresso tag more verbose, i.e., set your Python tag to something like this:
Overall, this does not strike me as something that is Python induced, as all you do is set parameters.
Cheers,
Ferdinand