Jump to content

[SOLVED] Editor2 crashed after editing NodeReference if you references nodes from it in update


photo

Recommended Posts

Hi,

I observed that Editor2 (SDK 2.6.1) crashes at the moment of applying edit of NodeReference by Apply button in editor in the case of using nodes from such NodeReference somewhere in UnigineScript in update function e.g.:

void update() {
...
nodeFromReference.getWorldPosition();
...
}

Here nodeFromReference is not nulled at this time so I can't prevent it.

As I see is a Editor issue.

Edited by Klimczak.Jan
Link to comment

Hi,

Unfortunately, I can't reproduce your issue.

When I using nodes from NodeReference in UnigineScript, Editor 2 working properly.

Please give us more detailed step by step description of your problem.

  • Like 1
Link to comment
15 hours ago, grmmvv said:

Hi,

Unfortunately, I can't reproduce your issue.

When I using nodes from NodeReference in UnigineScript, Editor 2 working properly.

Please give us more detailed step by step description of your problem.

Hi,

As I see the problem is not obvious. It's happens in more advanced scenarios.

 

That's why I send you a PM with a project where you can replicate the problem.

It is not happens every time as you do:

1. Open GalacticTanks world,

2. Select "czolg_1" reference node,

3. Click "Edit" button in Reference part of the Parameters node,

4. Then edit reference or just click "Apply" button to save reference node,

This sometimes crashes Editor2, if not you can then repeat 4 and 5 steps a few times until it will crash Editor2.

 

Here is other possibility to crash Editor2 like that:

1. Open GalacticTanks world,

2. Select "czolg_1" reference node,

3. Click "Edit" button in Reference part of the Parameters node,

4. Then edit reference or just click "Apply" button to save reference node,

5. Reload world.

This will crash Editor2 each time (after clicking Yes or No for question about saving changes). 

Sometime you can just select an node in World list or in the scene instead a reloading world to crash Editor2.

 

 

Link to comment

Hi,

Thank you for detailed description and test project.

I've successfully reproduce both cases and added it in our internal bug tracker.

There is problems in joints that you create in init method and use in update method.

There is two ways for a workaround:

  • Like 1
Link to comment

Hi Jan,

The actual issue is that you are forget to call class_remove() on the following line:

JointWheel joint = new JointWheel(n0.getBody(), n1.getBody());

 this line should look more like this:

JointWheel joint = class_remove(new JointWheel(n0.getBody(), n1.getBody()));) 

It is required to use class_remove() for created bodies, shapes or joints to release the script ownership.

Please, refer to this article about memory management: https://developer.unigine.com/en/docs/2.6.1/code/fundamentals/memory_management

Thanks!

  • Like 1

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

Link to comment
  • silent changed the title to [SOLVED] Editor2 crashed after editing NodeReference if you references nodes from it in update
On 15.01.2018 at 12:13 PM, grmmvv said:

Hi,

Thank you for detailed description and test project.

I've successfully reproduce both cases and added it in our internal bug tracker.

There is problems in joints that you create in init method and use in update method.

There is two ways for a workaround:

Thanks! It seems to work :)

Jan

Link to comment
3 hours ago, silent said:

Hi Jan,

The actual issue is that you are forget to call class_remove() on the following line:


JointWheel joint = new JointWheel(n0.getBody(), n1.getBody());

 this line should look more like this:


JointWheel joint = class_remove(new JointWheel(n0.getBody(), n1.getBody()));) 

It is required to use class_remove() for created bodies, shapes or joints to release the script ownership.

Please, refer to this article about memory management: https://developer.unigine.com/en/docs/2.6.1/code/fundamentals/memory_management

Thanks!

Hi, You are right, that was my mistake. With class_remove() I don't see any crashes at the moment :) 

Link to comment
×
×
  • Create New...