HairObject::Lock() access violation



  • 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



  • 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



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


Log in to reply