Problem with Object having a CCLib attribute

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
robin.algayres
Posts: 1
Joined: Thu Aug 18, 2016 2:42 pm

Problem with Object having a CCLib attribute

Post by robin.algayres »

Hello,

I am trying to make a simple program with CCLib which does not seem to work. Here is my very simple code :

#include "SimpleCloud.h"
class test
{
public:

CCLib::SimpleCloud simpleCloudObject;
test() {};
test(const CCLib::SimpleCloud & sco) : simpleCloudObject(sco) {};
~test() {};
};


int main(int argc, char** argv) {

CCVector3 v(1, 1, 1);

CCLib::SimpleCloud simpleCloudObject;
simpleCloudObject.reserve(1);
simpleCloudObject.addPoint(v);

test t( simpleCloudObject);

return 0;
}

I am only creating an object "t" of class "test" with an attribute " simpleCloudObject" which is a SimpleCloud object.
Doing this I am having this error :


"Exception raised : read access violation
this->m_points-> has been 0xFFFFFFFFFFFFFFF7."


The issue comes from SimpleCloud destructor. Yet when I do not create the object "t", the program manage to create and destroy " simpleCloudObject" without error.

Do you have any idea ?

Thank you for your consideration,

Robin Algayres
Post Reply