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

    Crashes with update to R15 API

    SDK Help
    0
    3
    266
    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.
    • H
      Helper
      last edited by

      On 10/02/2014 at 05:45, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R15 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      This code is crashing Cinema 4D in R15 only (no problems from R10 to R14) :

      // GreeblerObj.SplitSelection  
      // - Split PolygonSelection off into new Object  
      //*---------------------------------------------------------------------------*  
      PolygonObject* GreeblerObj::SplitSelection(BaseObject* op)  
      //*---------------------------------------------------------------------------*  
      {  
        ModelingCommandData    gmcd;  
        gmcd.doc =                    NULL;  
        gmcd.bc =                    NULL;  
        gmcd.mode =                    MODELINGCOMMANDMODE_POLYGONSELECTION;  
        gmcd.flags =                MODELINGCOMMANDFLAGS_0;  
        gmcd.op =            op;  
        // Split selected polygons (tops) into new object  
        if (!(SendModelingCommand(MCOMMAND_SPLIT, gmcd) && gmcd.result))    return NULL;  
        PolygonObject*    top =    ToPoly(gmcd.result->GetIndex(0L));  
        AtomArray::Free(gmcd.result);  
        if (!top)            return NULL;  
        // Add to object iarray  
        iarray->Append(top);  
        return top;  
      }
      

      The bugreport goes like this:

          Exception  
        {  
            ExceptionNumber = 0xC0000005  
            ExceptionText = "ACCESS_VIOLATION"  
            Address = 0x00007FF6C6C53365  
            Thread = 3972  
            Last_Error = 0x00000006  
        }  
        Call_Stacks  
        {  
            Call_Stack_Thread_3972  
            {  
                CINEMA 4D 64 Bit.exe: 00007FF6C6C53365  
                modeling.cdl64: 00007FFE308CD7E8  
                CINEMA 4D 64 Bit.exe: 00007FF6C608FD4E  
                CINEMA 4D 64 Bit.exe: 00007FF6C608F9A8  
                CINEMA 4D 64 Bit.exe: 00007FF6C5C60E88  
                CINEMA 4D 64 Bit.exe: 00007FF6C5CDDBD9  
                modeling.cdl64: 00007FFE30996020  
                modeling.cdl64: 00007FFE306FC19B  
                Greebler.cdl64: 00007FFE2CC1A625 GreeblerObj::SplitSelection  
                Greebler.cdl64: 00007FFE2CC1780B GreeblerObj::PrepareThreads  
                Greebler.cdl64: 00007FFE2CC17112 GreeblerObj::Greeble_Mesh  
                Greebler.cdl64: 00007FFE2CC1602A GreeblerObj::Greeble_Tag  
                Greebler.cdl64: 00007FFE2CC1590F GreeblerObj::Generate  
                Greebler.cdl64: 00007FFE2CC214A0 GreeblerObj::GetVirtualObjects  
      

      op and iarray are (or had better be) valid!

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 10/02/2014 at 10:12, xxxxxxxx wrote:

        Not sure but may be doc need to be not NULL too ?

          
            
            
            gmcd.doc = doc;
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 11/02/2014 at 04:42, xxxxxxxx wrote:

          I have considered that, but there is no mention of a change requiring a document despite it having never needed one before.  Let's try it and see what happens. 🙂

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