Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Python tag or Python node in Xpresso crash Cinema 4D

    Cinema 4D SDK
    python 2026 windows
    2
    7
    71
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SmetK
      last edited by ferdinand

      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.)

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @SmetK
        last edited by

        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

        MAXON SDK Specialist
        developers.maxon.net

        S 1 Reply Last reply Reply Quote 1
        • S
          SmetK @ferdinand
          last edited by

          @ferdinand Thanks for the reply. I'll keep that in mind.

          1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand
            last edited by ferdinand

            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).

            MAXON SDK Specialist
            developers.maxon.net

            S 1 Reply Last reply Reply Quote 0
            • S
              SmetK @ferdinand
              last edited by SmetK

              @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

              ferdinandF 1 Reply Last reply Reply Quote 0
              • ferdinandF
                ferdinand @SmetK
                last edited by ferdinand

                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 build 2026_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 the Help > 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 or python_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. And SplitIntoNgons 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

                MAXON SDK Specialist
                developers.maxon.net

                S 1 Reply Last reply Reply Quote 0
                • S
                  SmetK @ferdinand
                  last edited by

                  @ferdinand Thank you very much for your reply. I currently have the latest version of the program (screenshot).Снимок экрана 2025-10-20 211817.png

                  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
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post