Problem with Object having a CCLib attribute
Posted: Thu Aug 18, 2016 3:05 pm
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
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