DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0031320

TObj - method TObj_Object::GetFatherObject() is not protected against deleted object

Open CASCADEOCCT:Application Frameworkclosed9 public notes

Search issues

Description

Method TObj_Object::GetFatherObject() will cause access violation if called for an object that has been removed from the document (i.e. whose method IsAlive() returns false).

Steps to reproduce

bugs caf bug31320

Public activity

9 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: mpv
Date: Mon Aug 31 18:24:59 2020 +0300

    31320: TObj - method TObj_Object::GetFatherObject() is not protected against deleted object
02Commenter 2
03Commenter 3
+puts "OCC31320"

Could you please add a full bug description to the test? E.g.
+puts "0031320: TObj - method TObj_Object::GetFatherObject() is not protected against deleted object"

   Handle(TObj_Object) aFather, aSon(this);
 
+  if (myLabel.IsNull())
+    return aFather;

tip: maybe it would be better moving this check before creating an unused aSon(this) handle...

04Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mpv
Date: Tue Sep 1 11:40:14 2020 +0300

    # minor changes due to KGV notes

05Commenter 5
Done in the same branch CR31320. No re-testing is needed.
06Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
07Commenter 7
Reviewed.
08Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17319.18000000012 / 17284.370000000214 [+0.20%]
Products
Total CPU difference: 12059.670000000087 / 12007.590000000067 [+0.43%]
Windows-64-VC14:
OCCT
Total CPU difference: 18776.390625 / 18770.796875 [+0.03%]
Products
Total CPU difference: 13251.640625 / 13222.90625 [+0.22%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
09Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]