[SOLVED] expression node clone crash


photo

Recommended Posts

2.3.1 or 2.3:

1:create a expression node

2:paste to expression

{
float x=1.0f;
float y=2.0f;
}

3:clone this node by shift + mouse move

4:change the cloned expression node x value to 0.5f;

5: crash

Link to post

Hi Yang,

 

You can try to patch WorldExpression::copy(WorldExpression *node) method from source/engine/world/worlds/WorldExpression.cpp (starting from line 301):

//remove lines 301-313
node->expression = expression;
node->expression_id = expression_id;
node->constructor_id = constructor_id;
node->destructor_id = destructor_id;
	
// expression constructor
EngineExpression *expression = engine.world->getExpression();
if(expression != NULL && expression_id != -1 && constructor_id != -1) {
	Node *old_node = expression->getNode();
	expression->setNode(node);
	expression->getInterpreter()->runFunction(constructor_id,0);
	expression->setNode(old_node);
}

add (line 301):

node->setExpression(getExpression());

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to post