Jump to content

[SOLVED] Problem Occurs when Unigine::Vector Destruct


photo

Recommended Posts

Found a problem recently: 

 

if Unigine::World::get()->getIntersection(P0, P1, vecObjects) was called, vecObjects will the program collapse. 

 

This problem has never happen on PC, but on almost every kind laptops(Alienware don’t have this problem).

 

We also found if we make the variable global or static, that means avoid the calling of its destructor, would be all right.

 

Is that a problem?  or any elegant way can we do to solve this?

Link to comment
You can try this:

1 Operation System: windows 10 64 bit

2 Use laptop.

3 Call World::get()->getNodes(cNodesVec), make sure the parameter cNodesVec is a local variable.

4 Compile as Release/64

There is a great chance that the program will collapse when entering Unigine::Vector’s destructor.

Link to comment

Hi liu.yan,

 

As a temporary workaround, you can try to call reserve() on Vector before passing it to the engine.

It's hard to say how much memory you should reserve in general, but it has to be "enough" for each case.

 

Sorry for the inconvenience caused.

Link to comment
×
×
  • Create New...