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

    Damaged block

    Cinema 4D SDK
    r20 c++ macos
    2
    4
    817
    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.
    • rsodreR
      rsodre
      last edited by

      Hello!

      When C4D R20 is closing while debugging in XCode, it's triggering an EXC_BREAKPOINT in the GeData destructor:

      c4d_gedata.h:333 C4DOS.Gd->Free(this);
      

      I can see this in the console...

      /Volumes/Branches/build_osx/osx-4-release/depot/release/20.0/frameworks/kernel.framework/source/memory/systemallocator.cpp(487): CRITICAL: Stop: Damaged block (or from a different allocator
      

      What should be I looking for to fix this?

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by

        Hi Roger, thanks for reaching out us.

        With regard to this issue, might it be connected to what we've already discussed here?
        Are you maybe using any approach different from those we describe in our documentation with regard to entity creation on MAXON API or classic API?

        Last but not least I also recommend to see here how memory allocation is supposed to be managed in MAXON API.

        Finally feel free to provide a snippet in order to replicate the behavior.

        Best, Riccardo

        rsodreR 1 Reply Last reply Reply Quote 1
        • rsodreR
          rsodre @r_gigante
          last edited by

          @r_gigante said in Damaged block:

          With regard to this issue, might it be connected to what we've already discussed here?

          I don't think so, tis has been happening since before that was implemented.

          I had this same issue with the String destructor. I removed the issue by replacing all std containers members I had with String (std::vector<String>) for std::string (std::vector<std::string>). That fixed the issue. I did the same for GeData, but I still have this debug breakpoint on XCode.

          @r_gigante said in Damaged block:

          Finally feel free to provide a snippet in order to replicate the behavior.

          We already have a pretty big amount of plugin code, unfortunately have no clue which GeData is giving me problems.

          It's just a breakpoint, not a real problem right now, but would be good to understand what's happening, that could be a potential error in the future.

          1 Reply Last reply Reply Quote 0
          • r_giganteR
            r_gigante
            last edited by

            Hi Roger, thanks for following up.

            Although I've run a few tests here trying to mix-up STL data-types and Cinema API ones, I wasn't able to reproduce the issue on Xcode 9.4.1 and Cinema R20.057.

            That said, where possible, we encourage sticking to Cinema 4D API related data-types in order to grant better performance and superior stability.
            In your specific case I would go for maxon::BaseArray rather than std::vector and I would have switched from std::vector<std::string> to maxon::BaseArray<maxon::String>

            Would this be an option?
            Would you like to share a portion of code to reproduce the issue?

            Best, Riccardo

            1 Reply Last reply Reply Quote 2
            • First post
              Last post