Jump to content

[SOLVED] WorldTriggers: Shutdown not possible without crash when reference to non-existing node


photo

Recommended Posts

Posted

Hello

 

Pseudo code:

 

WorldTrigger wtOutoing;


void init()
{
wtOutoing = node_cast("some node"));
wtOutoing.setTargetNodes((test.getActor()));
}

void shutdown()
{
// Setting an empty list, no crash
wtOutoing.setTargetNodes(());
wtIngoing.setTargetNodes(());
}

 

 

Error if not overwrite target nodes:

Unigine fatal error
engine/world/worlds/WorldTrigger.cpp:233: void WorldTrigger::removeNode(Node*): Assertion: 'isTargetNode(node) && "WorldTrigger::removeNode(): is not a target node"'
Shutdown
Aborted (core dumped)
./client.sh  45.94s user 

When shutting down all worldtriggers should be overwritten by an empty array or just ignoring their target nodes in the deconstructor (or checking for NULL).

The current behavior leads to a very complicated handling and a difficult debugging. (Nobody expects that the target nodes must be still available while deconstruction the worldtrigger)

 

  • 4 months later...
  • 4 weeks later...
Posted

I can't imagine the situation when this crash happened.

All nodes clear their triggers and triggers clear their nodes in the destructors.

A sample is required for fix.

Posted

Hi Frustum

 

Sorry for the long waiting. I will provide a sample today.

  • 2 weeks later...
  • 1 month later...
Posted

Sorry, to much work. Totally forgot about it. I finished merging of latest SDK just now. Will test it within the next hours.

Posted

Works in this release without any problems! 

×
×
  • Create New...