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

    HairObject::Lock() access violation

    SDK Help
    0
    3
    302
    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 12/06/2015 at 13:17, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R15.063 
      Platform:      
      Language(s) :

      ---------
      When I call HairObject::Lock(), I end up jumping to address 0x0000000000000000() and get an
      access violation. I have no idea what the cause of this could be.  Tested in R15.063 only.

      	auto lib = (HairObjectLib* ) CheckLib(LIBRARY_HAIR, 0, nullptr);
      	CriticalAssert(lib != nullptr && lib->Lock != nullptr);
      	hair->Lock(doc, nullptr, false, 0);
      	// lib->Lock(hair, doc, nullptr, false, 0);
      

      Unfortunately, using HairObject::GenerateHair() without locking the object first causes an access
      violation as well (although we didn't change the stack pointer).

      Thankful for any hints,
      Niklas

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

        On 15/06/2015 at 07:19, xxxxxxxx wrote:

        Hello,

        your code is strange, you handle the hair library. Why are you doing this, there should be no reason to do this.

        Also, could you post some more complete code that reproduces the problem? What are you actually trying to do?

        best wishes,
        Sebastian

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

          On 15/06/2015 at 09:39, xxxxxxxx wrote:

          I added the first two lines to check if there is something wrong with the hair library, and I can say at least
          that the function pointer is not null, so it must be something inside the hair library function.

          Unfortunately I can not reproduce it in a CommandData plugin, but the problem occurs during the
          export process of a SceneSaverData plugin which calls functions from a DLL which in a shared library
          which in turn calls functions from from the Cinema 4D plugin shared library. It's hard to help here, I
          guess, unless you have a mind blowing idea or look at the whole project. Confused

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